psav=....conquering/understanding puppy boot command(s)

Using applications, configuring, problems
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#41 Post by rufwoof »

Fatdog usb multi-session works well the way you want. Boot from usb, loads saves from the same usb, unplug the usb once booted. You do however have to set the Save Session Interval to zero (only save on demand, never automatically/timed). To save, re-attach USB and click the Save desktop icon.

Code: Select all

title Fatdog
kernel /vmlinuz pkeys=uk waitdev=5 basesfs=ram:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/fd64.sfs savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::
initrd /initrd
I've also set up a 16GB encrypted swap partition on HDD for the times when I do something like downloading a massively large iso or music/video file into /root. I don't save that however, move it elsewhere (HDD/server). When swap does get used it runs fine. I did comment out a swapoff in /etc/rc.d/rc.local however as with that left in it could stall during shutdowns/reboots.

Mostly I just boot, use, shutdown (no saving). Except when a new Chrome version comes out when I boot, install chrome, save. So clean system and browser at each reboot. For bookmarks I use tilda drop down terminal (F1 toggles showing/hiding it) and tilda highlights all urls (just click a url to open chrome on that web page). So I have tilda auto-loaded with editing a text file containing my bookmarks so that they're easily accessible at any time (press F1 to show/hide) and easily edited.

I have previously experimented with setting up swap early - within initrd and prior to the saves being loaded, so even with large saves if you have the swap space it would load into ram + swap. Worked OK, but was like a full install i.e. HDD read/write delays rather than running totally in ram.

I've yet to get a Puppy working in a manner where you can boot from usb/load saves from usb/unplug usb once booted. The way Fatdog does that is its like a CD/DVD multi-session, but using usb instead. And instead of save files it uses sfs's. Each new save creates another sfs and on bootup they get loaded into /aufs/pup_multi, whilst changes get stored in /aufs/pup_save. A trick is to boot, delete all of those save sfs's and then run a save action, which in effect re-writes the /aufs/pup_multi content to a single new sfs save file - sort of like defragmenting multiple save sfs's into one . When there are multiple save sfs you can use boot parameters to not load n number of previous saves, or just simply delete/rename them.

Multi-saves are nice when you want to change things, reboot and try them out, but then rollback to undo that (i.e. delete the most recent save sfs and reboot again).

That boot main sfs and saves from usb/unplug usb feature is one of the main reasons I run Fatdog, having your MBR, grldr, vmlinuz, main sfs and save sfs's all on a disconnected usb once booted is very comforting/secure.
Last edited by rufwoof on Wed 31 Jul 2019, 09:05, edited 2 times in total.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#42 Post by Flash »

You might not have to delete the offending saved session to not use it. If Fatdog really works like a multisession DVD, there is a boot option that you can enter to make Puppy skip certain saved sessions. It's been a long time since I used it, so I forget what it is.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#43 Post by rufwoof »

Hi Flash

In Fatdog, you just append the number of last saves you want to skip being loaded to the end of the savefile kernel boot parameter, i.e. my previous example grub4dos (menu.lst) boot code of

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::

becomes

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::2

if you want to skip loading of the two last saves.

I believe the last two colons in the savefile parameter aren't actually required when the values they separate are null (empty) i.e. it could be just

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6

But I leave the two colons there purely as a reminder of where the skip n saves value should be added.

I used uuid's for disk identification as that's more static (uuid's are revealed by running "blkid" command). Using sda1 or sda2 or whatever type names can otherwise see those change at bootup if other block devices such as a usb have been inserted. If for example your HDD is usually /dev/sda1, but you have a usb inserted during another boot, then the kernel could allocate that usb as being /dev/sda1 and your hdd as /dev/sdb1. That's random, and at another reboot it might be back to the hdd being sda1 and usb as sdb1. Even uuid's can change however, but tend to do so less rarely under usual/general usage.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#44 Post by rufwoof »

drunkjedi wrote:Savefolder works great with Fatdog.
Here's my syslinux.cfg entry for Fatdog to load the folder from my hdd to RAM, the base sfs is also loaded in ram but in expanded state which makes it slower to boot but faster in work, Libreoffice, gimp start in an instant and work fast.

Code: Select all

label fatdog
linux /fd64/vmlinuz
initrd /fd64/split/initrd
append rootfstype=ramfs waitdev=0 basesfs=expand:device:sda7:/FD64-710/fd64.sfs savefile=ram:device:sda7:/fd64save 
menu label Fatdog64 
text help
Start Fatdog normally with small initrd.
endtext
(Belated) thanks drunkjedi

If you're less concerned about the filesize of fd64.sfs, then swapping it to use lz4 compression knocks quite a bit off the boot time.

unsquashfs fd64.sfs
mv fd64.sfs fd64.old.sfs
mksquashfs squashfs-root fd64.sfs -comp lz4
rm -rf squashfs-root

Under grub4dos/menu.lst, booting from usb (small initrd - with no fd64.sfs contained within that) with multisession saves back to usb, but with swap and fd64.sfs on hdd

Code: Select all

title Fatdog 
kernel /vmlinuz rootfstype=ramfs pkeys=uk waitdev=5 basesfs=expand:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/fd64.sfs savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::  
initrd /initrd
Boots reasonably quickly, htop shows low memory utilisation, and once booted the usb and hdd can both be unmounted (ensure save session interval is set to zero).

Now making that my default boot settings for my fatdog usb multisession :)
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

Post Reply