Grasshopper;
that write up is not for the Debian Jessie, which I have on my photobooth.
Will it work on it?
My photobooth does a lot of writing to the SDCard.
If a USB stick is not plugged in, it defaults to saving photos and videos to the SDCard.
Also, the program keeps a log file while running and it is saved to the SDCard, as well as all the settings for the photobooth, in a text file, but it only reads that file. The setup program only writes to it.
I am tossing around the idea of making the sdcard read only and require that a dedicated usb stick be plugged in with program and everything else on it.
Appreciate your thoughts on this.
I don't really need this facility right now, but just as a proof of concept, I decided to try and make one of my Retropie images read-only. I followed the tutorial here:
https://github.com/janztec/empc-arpi-linux-readonlyI took a risk and didn't bother backing up the image. However, I did take copies of the cmdline.txt and config.txt files on the boot partition. I believe these are the only important files that get changed, and as the boot partition is readable from Windows, I figured it would be easy to restore them if something went wrong.
It turned out that my Retropie image was also based around Jessie (which I didn't realise). The installation script detected this and stopped with an error message. So I took another chance and commented out the lines in the script that detect the kernel and linux versions, and then re-ran the script.
I'm pleased to report that it appears to have worked!
As a test, I booted the image and then changed a few settings like the Emulation Station theme, and the video shader being used. I then rebooted, and all the settings I had changed had reverted back to what they were before.
I also created a dummy file in the /home/pi directory. When I rebooted the file had gone.
I then checked the status of the two partitions on the SD card by running the following command:
mount | grep /mmcblk0
I got the following output:
/dev/mmcblk0p2 on /ro type ext4 (ro,relatime,data=ordered)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
So it does appear that the root partition is now read-only. The boot partition is still read/write but that's easily fixed.