Ruggedize the microSD card

Ordinarily, turning off a running computer without a proper shutdown can cause file corruption, which can lead to big problems later. "Ruggedizing" the microSD card will solve this problem.

So how do we ruggedize the microSD card? We make the filesystems on the microSD card read only, and use RAM disks for everything that needn't be persisted from one boot to the next. We'll be able to quickly and easily switch between read-only and read-write filesystems, so maintenance and upgrades won't be a hassle.

  1. sudo bash -c "$(curl -L -o - https://jbv1.cc/carputer/jbv1-carputer-ruggedize.sh)"

  2. sudo reboot

  3. Wait 30 seconds before trying to reconnect via ssh.

πŸŽ‰ The microSD card is ruggedized! πŸŽ‰

From this point forward, the filesystems stored on the microSD card will be in read-only mode by default. When you ssh to the carputer, the command prompt will have (ro) at the end, indicating the read-only status. If you need to create or update any files stored on the microSD card, you'll need to switch to read-write mode first:

rw

The command prompt will now have an (rw) at the end, indicating read-write status. When you're done making changes, switch back to read-only mode:

ro

To minimize the chance of file corruption, please try not to leave your carputer in read-write mode when you turn it off, unless you do a proper shutdown first:

sudo shutdown -h now

Last updated