Page 1 of 1

How to make a "DIY" Immutable Pup installation

Posted: Sun Oct 08, 2023 4:59 pm
by peebee

Lots of chatter in the Linux world about Immutable distros.........
e.g. https://itsfoss.com/immutable-linux-distros/

Puppy Linux is by design mainly immutable but this topic is to provide advice on How-To make a fully immutable install of Puppy Linux. It assumes a modern Woof-CE built version of Puppy Linux (e.g. with bdrv support). This is a "DIY" guide - i.e. it involves a number of manual steps - it does not produce an "Immutable OS" only an "Immutable Installation" of Puppy.

The How-To will be expanded / edited from any comments received.

How-To make an Immutable installation of Puppy Linux

  1. make a normal frugal install of Puppy
  2. edit the boot stanza to include pmedia=ataflash (or usbflash)
  3. boot into the new Puppy and make any configuration changes you need: e.g. location, timezone, keyboard, wifi, firewall, sound levels etc.
  4. load any extra sfs you require, but rename the sfs to have version independent names - e.g. chromium.sfs, thunderbird.sfs so they can be replaced with later versions without breaking immutability.
  5. using System -> Event manager -> Save session - set the Save interval to 0 and tick "Ask at shutdown whether to save session"
  6. reboot and create a save folder

then from another install of Puppy, or the same install but booted with pfix=ram

  1. rename the save folder to bdrv_****
  2. using pcompress (right click on bdrv folder), create a bdrv_****.sfs
  3. create an empty save folder with the name noted at 1.
  4. reboot into your new immutable system
  5. do various activities
  6. reboot but "Do not save" session
  7. check that the empty save folder remains empty

if you need to make additional configuration changes (3.), reinstate the bdrv folder as the save folder, boot into the system, make the changes, reboot saving the changes, remake the bdrv.sfs with pcompress


Re: How to make an Immutable Pup

Posted: Sun Oct 08, 2023 4:59 pm
by peebee

reserved


Re: How to make an Immutable Pup

Posted: Sun Oct 08, 2023 4:59 pm
by peebee

reserved


Re: How to make an Immutable Pup

Posted: Sun Oct 08, 2023 5:33 pm
by williwaw

a worthwhile look into how puppy can be made more immutable, thanks.

does compressing the renamed savefolder make it read only?

9. create an empty save folder with the name noted at 7.

does the empty save folder have to be recoginized by the init as a save folder? If so, doesn't it have to follow certian naming conventions?
a different example of naming besides bdrv_**** could be more instructive


Re: How to make an Immutable Pup

Posted: Sun Oct 08, 2023 6:18 pm
by dimkr

A typical immutable distro allows atomic update, rollback and other things. You can't market a live boot Puppy as an immutable distro unless it gains these features.


Re: How to make an Immutable Pup

Posted: Mon Oct 09, 2023 6:11 am
by peebee
dimkr wrote: Sun Oct 08, 2023 6:18 pm

A typical immutable distro allows atomic update, rollback and other things. You can't market a live boot Puppy as an immutable distro unless it gains these features.

update = replace any of the sfs with an updated version
rollback = revert any of the sfs to a previous version


Re: How to make an Immutable Pup

Posted: Mon Oct 09, 2023 6:28 am
by dimkr

That's a "poor man's immutable distro" or a "DIY immutable distro" with bad user experience :)


Re: How to make an Immutable Pup

Posted: Mon Oct 09, 2023 10:15 am
by Dry Falls
dimkr wrote: Mon Oct 09, 2023 6:28 am

That's a "poor man's immutable distro" or a "DIY immutable distro" with bad user experience :)

Curious. Can you explain what you mean by "bad user experience"? Sounds like a trite dismissal to me. There are lots of ways built into puppy (as you are well aware) to run in ram with personal configurations built in. Rootfs used in fatdog with drives unmounted at boot is another. Taersch and NicOs have offered similar solutions to the above. Perhaps you only have an objection to the word "immutable". If you want to be Aristotelian, true stasis does not exist in nature so those big (respectable?) distros are also misusing the term.

df


Re: How to make an Immutable Pup

Posted: Mon Oct 09, 2023 10:33 am
by dimkr

Immutable distros have an update tool that updates the OS on reboot, a tool that allows a user to roll back an update on reboot, applications running inside containers, and so on. You can achieve all these things in a "read-only" installation of Puppy, but only if you do this manually: you need to boot with pfix=copy, create a backup of your SFSs and swap SFSs to update, back up your save file/folder all the time (so you can roll back both OS updates and changes to the persistent parts of the OS), install Flatpak, and so on.

People who want an immutable distro and find Puppy because it's described as a lightweight immutable distro will be disappointed because it doesn't have any tools for these things, and some core principles of an immutable distro (like read-only /usr) don't apply Puppy.

(I know what "immutable" means, and yes, a live boot Puppy is "immutable". What I'm saying is, the thing people expect when they hear "immutable distro" is not a "live distro": it's a distro that allows atomic updates, etc'. Ask yourself which features listed in https://fedoraproject.org/silverblue/ and https://vanillaos.org/ are also provided by your save-less Puppy.)


Re: How to make an Immutable Pup installation

Posted: Mon Oct 09, 2023 11:53 am
by peebee

thread title changed


Re: How to make an Immutable Pup installation

Posted: Mon Oct 09, 2023 12:52 pm
by Marv

Since I haven't run anything other than Puppy for the last decade at least the distinction was lost on me. Just a DIY chap here. I like to scrutinize changes and not commit til I'm happy with the changes when I'm updating/changing something in my working OS so manually updating SFS, portables, kernel, desktop configuration, symlinks etc. and saving the result to a y (or b) drv when I'm comfortable with the result works for me. I still run pups with savefiles for some of my users but my daily for quite a while now is a 'poor mans immutable'.