Read-only Filesystem on Raspberry PI
This is the most useful guide that I’ve found on how to set up a read only filesystem on the raspberry PI:
http://blog.pi3g.com/2014/04/make-raspbian-system-read-only/
Once you’ve done this, if you need to modify files under /etc, such as /etc/network/interfaces, here’s how to do that (as root):
- mount -o remount,rw /
- mount -o remount,rw /etc_rw
- cd /etc_org/network
- vim interfaces
- make whatever changes are necessary
- reboot
Your changes should now be permament.
If you try just editing /etc/network/interfaces directly, your changes won’t “stick” over a reboot because you’re just changing a file in a ramdisk.