3 ms·
I don't usually do full read only, what I'll do is run a script that turns off stuff that does not need to be writing to the disk all the time. Unfortunately,
by eternityforest 3y ago
I don't usually do full read only, what I'll do is run a script that turns off stuff that does not need to be writing to the disk all the time.
Unfortunately, some software is database-oriented and likes to write to disk for every tiny thing, so the approach doesn't work with stuff like Home Assistant unless you carefully configure logging.
The basic simple stuff doesn't really cause any user-level noticable changes:
https://github.com/EternityForest/KaithemAutomation/blob/master/scripts/linux-sd-protect.sh https://github.com/EternityForest/KaithemAutomation/blob/mas...
After that, I disable and mask apt-daily (The Debian auto updater), and purge dphys-swapfile.
My full set of assorted tweaks can be found here, some might not be relevant for you:
https://github.com/EternityForest/KaithemAutomation/blob/master/scripts/linux-tweaks.sh https://github.com/EternityForest/KaithemAutomation/blob/mas...
Next, I often run Chromium as a kiosk, and Chromium likes to hammer the SD card, so I set the XDG folder environment variables to make it put it's stuff in RAM. My embedded chrome stuff can be found here:
https://github.com/EternityForest/KaithemAutomation/blob/master/scripts/setup-kiosk-mode.sh https://github.com/EternityForest/KaithemAutomation/blob/mas...
With all these tweaks, a Pi will have excellent reliability without losing the benefits of a writable FS. If you need true industrial grade perfect reliability, you probably need an industrial card and maybe true a read-only system.