3 ms·
Most modern Debian/Ubuntu installations support overlayfs : sudo apt install overlayroot #edit the setup script vars sudo nano /etc/overlayroot.conf overlay
by Joel_Mckay 2y ago
Most modern Debian/Ubuntu installations support overlayfs :
sudo apt install overlayroot
#edit the setup script vars
sudo nano /etc/overlayroot.conf
overlayroot="tmpfs:swap=1,recurse=0"
#set different role contexts for grub
sudo nano /etc/default/grub
GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved
GRUB_TIMEOUT=3
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT
GRUB_TIMEOUT_STYLE=menu
GRUB_TERMINAL=console
GRUB_CMDLINE_LINUX_READONLY="quiet splash i915.tuxedo_disable_psr2=1 i915.enable_psr=0 "
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.tuxedo_disable_psr2=1 i915.enable_psr=0 overlayroot=disabled fsck.mode=force fsck.repair=yes "
#etc...
#then insert an auto menu item for the read only OS boot up
sudo nano /etc/grub.d/10_linux
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ];
then
linux_entry "${OS}" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
linux_entry "${OS} READ ONLY OS" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_READONLY}"
#etc...
#and finally enable the role selection with your current kernel
sudo update-grub
sudo update-initramfs -u
For systems that have enough ram and cheap SSD it ensures the flash memory will last longer. Additionally, running /home on F2FS for workstations can improve long-term hardware health, as Desktop users do not require the OS to be writable in many use-cases.
It is not a perfect approach, as silly things done as root can always bork the backing partition.
Best of luck =3
- _joel 2y agoYes, quite trivially...
- Joel_Mckay 2y agoDocker "/var/lib/docker" images may be placed on a mounted mutable partition path: https://www.digitalocean.com/community/questions/how-to-move-the-default-var-lib-docker-to-another-directory-for-docker-on-linux https://www.digitalocean.com/community/questions/how-to-move... Hardly the epic task it once was... =3
- _joel 2y agoI'm referring to this https://garden.glennstovall.com/notes/build%20your%20own%20dropbox%20fallacy/ https://garden.glennstovall.com/notes/build%20your%20own%20d...
- Joel_Mckay 2y agoIndeed, some products gain traction for unfathomable reasons: https://en.wikipedia.org/wiki/Pet_Rock https://en.wikipedia.org/wiki/Pet_Rock Have a great day =3
- _joel 2y agoYou too!
- deleted 2y ago[deleted]
- smallerfish 2y agoDo you happen to know if the overlayfs bug that upset the firejail developers has been fixed yet? https://github.com/netblue30/firejail/discussions/4178 https://github.com/netblue30/firejail/discussions/4178 Perhaps firejail is dead? There's been no releases in 18 months.
- Joel_Mckay 2y agoPersonally, most projects outside the kernel are not really a priority for monitoring. The packaging ecosystem has always been a bit messy, but I would recommend sending the Debian and or Canonical admins a request to revoke the developer signing key to purge the problem/abandoned firejail application package moving forwards. Best regards, =3