On 2023-05-03 11:40, Roger Oberholtzer wrote:
On Wed, May 3, 2023 at 9:13 AM Per Jessen <> 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.
Have a look at how the XFCE Rescue image is setup. <http://download.opensuse.org/distribution/leap/15.4/live/openSUSE-Leap-15.4-Rescue-CD-x86_64-Build31.329-Media.iso> As it is, it writes to a secondary partition in the remainder of the USB stick, which is created on the first boot. You could instead use a ram disk. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)