As you know, the raspberry (and computers in general) needs to shut down properly. I you simply disconnect the raps the sd card could be crashed.
I use my rasp in headless mode (without screens), so there are a lot of times that my rasp is turned off in the bad way.
To prevent this problem i have found this script:
It is an script that converts you rasp in a Read only system… so the disk is not writted, the sd card could not be corrupted and you can disconnect the rasp safely.
In the instrucctions says that it works fine with clean raspbian installations, and some custom changes can be incompatible with this script.
Has anyone knows if Patchbox Os is compatible with this readonly script?
Give it a go? Looks like it’d be ok…
But be aware, my experience with this is many apps will need a bit of tweaking - for various reasons but most common is they write settings to the home directory.
Two examples i know off the top of my head are tightvnc and Pd.
( Pd only really requires write access the first time it’s run and configured)
It’s also really useful to have scripts to switch the rootfs between read only and writeable for
There is alternative approach which is to use overlayfs - i think this would be more compatible with more apps - but not got around to playing with it yet
rpi-readonly has 2 commans for this purpose.
“rw” and “ro”. In any time you can launch rw, write some file and launch ro again.
I have not probe it because I have only one rasp with this OS, and I cant crash it . I must make an image backup of my rasp and try this script.
Been a while since the original post, but I thought I’d add I just tried this on a fresh and up to date installation of the latest stable Patchbox (2020-03-14), and it worked perfectly for my requirements. I backed up the image, checked out the repo and ran the setup script.
Only issue I’ve found is switching back to ro from rw, I found it said the disk was busy, so I rebooted and then it returned to ro…it’s possible this was an anomaly, but regardless was easy to workaround. I should also add that I’m only using amidiauto (I’m setting up the pi as a headless usb midi host) and haven’t tested anything else.
Hope this helps anybody else heading down this route.
sync command that’s supposed to wait while all the data is committed to persistent storage. Maybe running it before the switch would help.