On Wed, May 3, 2023 at 9:13 AM Per Jessen <per@opensuse.org> wrote:
Roger Oberholtzer wrote:
I have Leap on a Raspberry PI. I think my question, however, is generic to all Leaps.
I would like to make the OS image read-only, with any changes being in RAM and discarded when the system is restarted.
I have seen things where people collect all the writable files to a RAM disk and then replace them in the OS with symbolic links to the RAM disk. While doable, this seems like a fragile way to do this.
Is it possible to change how the existing file systems are mounted (/etc/fstab), and add a RAM file system that gets all the changes?
I think this is how e.g. Knoppix works/ed - a fixed image and a ram file system, combined with unionfs. Probably also how our Live images work.
I've looked at overlayFS, and it seems to be what I need. I'm just not sure how to set it up in fstab. Something like: Mount the current / somewhere (/lower) Make a ram fs (/upper) Make an overlay of the two. I'm not sure how to set up the 'work' area needed by the overlayfs in only fstab. -- Roger Oberholtzer