Comment by ad404b8a372f2b9
5 years ago
Yes, the read-write disk partition also holds my files.
No docs I'm afraid and I set it up too long ago to remember the exact details. I used overlayroot, there are some really good resources on google to set it up like this. If I remember correctly it's just a matter of setting the overlayroot.conf file to:
overlayroot_cfgdisk="disabled"
overlayroot="tmpfs:swap=1,recurse=0"
And then a grub option to mount the base in read-only:
linux /boot/vmlinuz-5.3.0-51-generic root=UUID=... ro $vt_handoff
Then you add your mounts in fstab for persistent stuff.
I think this blog post describes it well: https://spin.atomicobject.com/2015/03/10/protecting-ubuntu-r...
For modifications to the base, installing or modifying software, etc I have a grub option to disable the overlay system and mount the base partition in read-write so it can be used normally. So I reboot into this option, do my changes, then reboot immediately in overlay mode.
linux /boot/vmlinuz-5.3.0-51-generic root=UUID=... rw overlayroot=disabled $vt_handoff
It took me about a month to get used to it, sometimes I'd apt-get something then the next day I'd facepalm after realizing I had done it in overlay-mode and had to do it all over again. I haven't lost any personal files though, it's pretty easy to remember to avoid saving them to your home and instead go to the persistent partition.
No comments yet
Contribute on Hacker News ↗