SD card formatting for SmartServer IoT

The SmartSever IoT includes a 32 GB SD card which is critical for the operation of the CMS, logging, and Update functions.  If it is determined the SD card has failed, it is replaced by carefully following these instructions.   At this publication date (June 2026) these are recommended replacement devices:

Brand

Memory Family

Mfg. PN

Samsung

Pro Endurance 64 GB

MB-MJ64KA/APC

Kingston

High Endurance 32GB

SDCE/32GB

Sandisk

Ultra 32GB

SDSQUNR-032G-GN3MN


The Smartserver requires the SD card to be formatted as EXT4 file system.  Windows does not provide a direct path to use EXT4 format.  

This procedure assumes that a USB flash drive containing the required firmware image files is attached to the SmartServer.  Follow these steps.  Steps 16-20 below are only required for SmartServer firmware published after June of 2024 and before firmware version 4.60.038:


  1. Use putty.exe to connect to the SmartServer console with serial USB  (11500 8-N-1) connection or SSH as user root.
  2. Edit the fstab file: nano /etc/fstab
  3. Comment out each line that contains /media/sdcard with ‘#’.
  4. Save the file: Ctrl+o
  5. Exit nano: Ctrl+x
  6. Edit the file apollo-config: nano /sbin/apollo-config
  7. Find the line that starts with ‘sdcard-check’: Ctrl+w sdcard-check
  8. Add a ‘#’ comment character to the start of the line ‘sdcard-check’.
  9. Save the change: Ctrl+o
  10. Exit nano: Ctrl+x
  11. Reboot the SmartServer: reboot
  12. After the system starts up, login to the console as root.
  13. Verify that /media/sdcard is not mounted by running df
  14. Verify the SD card is detected by the system. ls /dev/mmcblk2* If no matching device is listed, the SD card may be defective or not properly detected and cannot be formatted.

    Warning: Formatting the SD card will erase all existing data on the card. Verify that /dev/mmcblk2p1 is the correct target before continuing.

15. Format the SD card partition by running: mkfs.ext4 /dev/mmcblk2p1
16. Create each of these folders [logging, backups, updates, download] in /media/sdcard. For example: sudo mkdir /media/sdcard/updates
17.  Change ownership: sudo chown apollo:apollo /media/sdcard/update
18. sudo chown apollo:apollo /media/sdcard/backups
19. Set the permissions: sudo chmod 755 /media/sdcard/updates
20. sudo chmod 755 /media/sdcard/backups
21.  Re-image the SmartServer: /media/usb0/re-image.sh