I immediately noticed terrible corruption problems when I was using the SD Card or NAND flash on my system (Arria 10 SoC Dev Board with prebuilt Angstrom Linux from rocketboards). Even with virtually no filesystem activity, if I just turned the power switch off without doing a ‘shutdown now’, the chances of successfully booting again went way down. I could probably only boot a couple more times.
So I began investigating a read-only root filesystem and what is required to pull it off. It looked like I would have to create a bunch of symlinks from the read-only side to a writable mount like a RAM disk, or use an overlay filesystem, or … (bunch of possibilities).
In a moment of “what if?”, I just decided to change the line in /etc/fstab from
/dev/root / auto defaults 1 1
/dev/root / auto defaults,ro 1 1
To my complete amazement, it worked perfectly. It seems that 100% of the Linux functionality is in place.
Has anyone tried a read only filesystem before and what method did they use to do it? Same as mine? Overlay filesystem or something else?
Are there any problems with what I’ve done. It sure doesn’t seem like it to me.