Multi-session live-CD/DVD

Under development: PCMCIA, wireless, etc.

Moderator: Forum moderators

Post Reply
user1111

Multi-session live-CD/DVD

Post by user1111 »

In the prior forum, multi-session live CD/DVD was a sub-section forum under cutting edge http://www.murga-linux.com/puppy/index.php?f=6

At least a few I believe still do boot using DVD's/multi-session. Whilst I boot my (Fatdog) laptop using multi-session but saving into HDD folders (separate sfs files), my (also Fatdog) desktop file/rsync/ssh/vpn server still boots via DVD multi-session.

A combination of programs that works well for that setup are 1. isomaster to 'tweak' the main iso (I use that to change the grub.cfg file so that the default (timeout) boot choice is the multi-session choice). 2. peasydisc for blanking/formatting a prior used RW DVD, and for burning the fatdog iso to that ... and then run a 'save'

When there are many saves having been made, I tend to do that boot, then blank/format the disc just booted from and 'save' to consolidate (defragment, compact or whatever you prefer to call it) all of the changes into a single save file on the 'newly created' DVD.
Last edited by user1111 on Mon Sep 21, 2020 1:25 pm, edited 1 time in total.
User avatar
Flash
Moderator
Posts: 897
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 46 times
Been thanked: 105 times

Re: Multi-session live-CD/DVD

Post by Flash »

I still run Puppy exclusively from a multisession DVD. For some years I haven't been able to tell if a new Puppy can do multisession. For instance, Barry's latest, Easypup, doesn't have a 'Save' icon on the desktop. Possibly there will be an option to save to DVD when I shut down. If not, I can't back out; I'm committed to shutting down without saving anything.
Chaos coordinator :?
tallboy
Posts: 36
Joined: Fri Aug 14, 2020 5:41 am
Been thanked: 6 times

Re: Multi-session live-CD/DVD

Post by tallboy »

Hi guys, I guess I am one of the few still playing around with the shiny platters.
Flash, if you run EasyPup live from the DVD, you will be asked if you want to save back to the DVD at shutdown, and if you do that, a Save icon will appear on the desktop after the next bootup. Even after you have the icon, which let you perform immediate saves during a session when clicked, you will still be asked about saving at each shutdown. EasyPup acts just like the good 'ol Puppys in that respect too, it is the best (non)Puppy for years!

Edited: remember to be patient when you save at shutdown, it can take some time to sort and save the latest files only, and you must totally ignore the blue text on the screen, that says you can press Enter if it takes too long! No, no, noo! Go make a cup of coffee while it saves. If you press Enter while the process is running, it may quit on you! Just let it finish by itself.

I remember that you also saved books to the multisession disc, as separate storages that you could upgrade and access at any time, on the same disc that was used for the live Puppy. I have done the same with programs. I see no need to have large programs that see infrequent use, using extra time to boot and filling up the RAM, when I can have them installed in seconds from the shiny disc, when needed. The original programs install from the disc to the live Puppy in RAM just as fast as an .sfs load, and use much less space. BTW, at times some funny things happened when I upgraded those programs on the R discs, they responded just as if they were on a HDD, or in RAM, the files from the old version disappeared. I know it is not possible, but still...

I actually found a screenshot the other day, of the procedure we used then, the commands to move stuff from system to disc and the result from the disc, see below. There you see the large programs saved to the disc that I used, which also held the Puppy .iso that I booted from. The dot-file .gramps could not be saved to the base of the disc, but had to be renamed to dot-gramps - which the disc transfer program understood, and saved into a folder. The Gramps program was acually activated by running that dot-file. The screenshot is from 2011, time flies...

rufwoof, you use DVD-RW, so you can blank them, I only use cheap DVD-R, or CD-R with older Puppys. I have a few of them laying around...

growisoscreen.png
growisoscreen.png (338.13 KiB) Viewed 1934 times
user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

tallboy wrote: Mon Sep 21, 2020 4:22 am rufwoof, you use DVD-RW, so you can blank them, I only use cheap DVD-R, or CD-R with older Puppys. I have a few of them laying around
Hi Tallboy

I have a small stack of RW's that can be blanked/reused afresh. Been using the same couple now for years without any problems of reusage, in contrast USB sticks have come and gone multiple times due to failures. I have a tall stack of R's from where I used to use those for all sorts of things. At the time the price of the RW was much the same as R's IIRC, so that stack of RW's turned out to be a much better choice. But not as secure I guess when running with RW - but equally anyone who was trying to (dark) hack around that nowadays would be insane.

I'm suspecting that a couple of RW's could outlive the DVD drive.
user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

tallboy wrote: Mon Sep 21, 2020 4:22 am Hi guys, I guess I am one of the few still playing around with the shiny platters.
Flash, if you run EasyPup live from the DVD, you will be asked if you want to save back to the DVD at shutdown, and if you do that, a Save icon will appear on the desktop after the next bootup. Even after you have the icon, which let you perform immediate saves during a session when clicked, you will still be asked about saving at each shutdown. EasyPup acts just like the good 'ol Puppys in that respect too, it is the best (non)Puppy for years!
Just downloaded and fired EasyPup up Tallboy. Incredibly clean. Using it and the chrome sfs to post this and the font clarity is fantastic.

s.jpg
s.jpg (110.33 KiB) Viewed 1897 times

Using frugal boot from hdd (grub4dos) though, so that saves as it goes. Will have to try the DVD based choice as I prefer not to save things after I've initially configured the system. Yes, I know, you can have continual saving of changes and mess around with snapshots of the savefile etc. I couldn't find a 'save session interval' option to set that to zero (only save on demand). So looking like DVD/multi-session might be the way to go.
Clarity
Posts: 3270
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1347 times
Been thanked: 438 times

Re: Multi-session live-CD/DVD

Post by Clarity »

Preference is Multi-Session for "many" reasons and until recent 2020 PUP ISOs, I have and still do for some older desktops, use my DVDs and CDs.

My experiences with most every PUP distro until 2020, was to download the ISO and create media. I'd boot the media to desktop. Firstly, immediately after FirstRUN, desktop tailoring, and reboot, then at the conclusion of runnings when there was something significant added to the system apps I would save the session. In MOST cases, my system remain running unless there is a need to shutdown. In some of my past cases, Lighthouse for example, it ran for 2 years continuously before a shutdown-reboot.

Since 2020, with all of the WoofCE and the Dogs of Puppy Linux, I merely download and boot the ISOs using the practice announce here. In the case of Fatdog (FD) 810+, I save my sessions to HDD, via edit of the 3rd option from "sr0" to "sdax". ALL of my ISOs are kept in a central root folder "/BOOTISOS" and the SG2D boot finds and presents them at each system start.

Barry's PUP ISOs do NOT conform to the GRUB2-EFI standard that the DOGS and PUPs of 2020 now use, thus it cannot be found by the SG2D boot utility. So, I am forced to burn the ISO to disc to evaluate, test, and use. I only have 1 remaining 32bit PC that is 20 years old, thus I now work exclusively with 64bit PUPs and DOGs.

I have been recently reviewing @Rufwoof's approach. This is because there is not a clear way to do multisession with the PUPs as we have with FatDOGs. I have found some efforts by a past member named @TedDog, but, it is not clear if a PUP booted from ISO or DVD can be "encouraged" to save sessions to local media.

Everything published on this thread is accurate and I have used most of what the members, here, have shared.

Thanks
user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

Clarity wrote: Mon Sep 21, 2020 5:39 pm My experiences with most every PUP distro until 2020, was to download the ISO and create media. I'd boot the media to desktop. Firstly, immediately after FirstRUN, desktop tailoring, and reboot, then at the conclusion of runnings when there was something significant added to the system apps I would save the session. In MOST cases, my system remain running unless there is a need to shutdown. In some of my past cases, Lighthouse for example, it ran for 2 years continuously before a shutdown-reboot.
Depending upon usage I see rebooting into a fresh (already configured)/clean copy as a regular thing to do (daily), so as to potentially clear out any nasties that might have slipped in somehow (likely via the browser) - at least for a desktop system. Different though if running as a headless server, I do leave my Fatdog file/ssh server running for weeks/months at a time.
tallboy
Posts: 36
Joined: Fri Aug 14, 2020 5:41 am
Been thanked: 6 times

Re: Multi-session live-CD/DVD

Post by tallboy »

rufwoof, I don't have my EasyPup up right now, but in previous Puppys, the Puppy Event Manager was the place to set the save frequency, preferably to 0, for a frugal installation. There you could also tick for having a save warning at shutdown. How is it done in the Dogs?
user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

First place I looked was event manager for save session interval. Nothing there for that, unless I missed it. For the time being I'm just rsync'ing /initrd/pup_rw to /root/rsync ... similar to doing a snapshot or restore. Storing them as two scripts, although they're very similar

s.png
s.png (32.8 KiB) Viewed 1856 times

Snap

Code: Select all

#!/usr/bin/env bash

# ------------------------------------------------------------
# Backup source and target directory 

Source="/initrd/pup_rw"
Target="/root/rsync/snapshot"

if [ ! -d $TARGET ]; then
	mkdir -p $TARGET
fi

# ------------------------------------------------------------
# Name of shadow directory
Shadow=".rsync_shadow"

# --link-dest as of rsync version 3.1.1 replaces duplicates with hard links

if [ ! -d "$Source/$Shadow" ] 
then
	# first time run: create source shadow
	rsync -a --delete --link-dest="$Source" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Source"/ "$Source/$Shadow"
fi

# a = archive, x = don't cross filesystem boundary, X = preserve extended attributes
# h = human readable output, H = prserve hard links, v = verbose
# --stats = give some stats, --no-inc-recursive = no incremental recursion
# --delete = delete from destination if deleted in source
# --delete-after = file-deletions on the receiving side are done after the transfer has completed

# do real syncronization
rsync -axXhHv --exclude="/root/rsync/*" --stats --no-inc-recursive --numeric-ids --delete --delete-after "$Source"/ "$Target"
status=$?

if [ $status -eq 0 ]
then
	#update source shadow directory
	rsync -a --delete --link-dest="$Source" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Source"/ "$Source/$Shadow"

	#update target shadow directory
	rsync -a --delete --link-dest="$Target" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Target/" "$Target/$Shadow"
fi

pupmessage "Snapshot done"

exit $status
Restore

Code: Select all

#!/usr/bin/env bash

# ------------------------------------------------------------
# Backup source and target directory 

Source="/root/rsync/snapshot"
Target="/initrd/pup_rw"

if [ ! -d $TARGET ]; then
	mkdir -p $TARGET
fi

# ------------------------------------------------------------
# Name of shadow directory
Shadow=".rsync_shadow"

# --link-dest as of rsync version 3.1.1 replaces duplicates with hard links

if [ ! -d "$Source/$Shadow" ] 
then
	# first time run: create source shadow
	rsync -a --delete --link-dest="$Source" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Source"/ "$Source/$Shadow"
fi

# a = archive, x = don't cross filesystem boundary, X = preserve extended attributes
# h = human readable output, H = prserve hard links, v = verbose
# --stats = give some stats, --no-inc-recursive = no incremental recursion
# --delete = delete from destination if deleted in source
# --delete-after = file-deletions on the receiving side are done after the transfer has completed

# do real syncronization
rsync -axXhHv --exclude="/root/rsync/*" --stats --no-inc-recursive --numeric-ids --delete --delete-after "$Source"/ "$Target"
status=$?

if [ $status -eq 0 ]
then
	#update source shadow directory
	rsync -a --delete --link-dest="$Source" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Source"/ "$Source/$Shadow"

	#update target shadow directory
	rsync -a --delete --link-dest="$Target" --exclude="/root/rsync/*" --exclude="/$Shadow" "$Target/" "$Target/$Shadow"
fi

pupmessage "Restore done. Press OK to restart desktop"
restartwm

exit $status
user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

tallboy wrote: Mon Sep 21, 2020 7:12 pm rufwoof, I don't have my EasyPup up right now, but in previous Puppys, the Puppy Event Manager was the place to set the save frequency, preferably to 0, for a frugal installation. There you could also tick for having a save warning at shutdown. How is it done in the Dogs?
Similar in Fatdog, via Control Panel, Desktop, Event Manager, RAM Save Interval

s.jpg
s.jpg (90.43 KiB) Viewed 1836 times
user1111

Re: Multi-session live-CD/DVD - remastering (of sorts)

Post by user1111 »

Multi-session boot, but with the files stored on HDD (i.e. very first time a save was made, the 'multi-session' checkbox was ticked) - was seeing the number of those multi-saves grow with time. qemu has been installed and that alone was taking up a considerable mouthful of space.

I had consolidated multiple multi-saves down, i.e. booted, deleted all of the current multi... save sfs files and then run 'save' - which consolidates them all down to just two (multi...base.sfs and multi...save.sfs). But even then - they get 'read' into ram at bootup, and as I'm using that box as a qemu server I wanted to reduce memory consumption in order to leave more ram available for qemu. So I 'remastered' fd64.sfs (of sorts). I have fd64.sfs not being loaded into ram, is read from disk as/when needed, so the size is pretty much irrelevant (I've opted to use lz4 compression for better read speeds), but each multi .... save sfs is extracted (layered) into ram at each boot ... so eats ram space. Cutting down the combined size of multi save sfs's reduces the amount of ram being used.

To merge fd64.sfs, multi...base.sfs and multi...save.sfs I ran

unsquashfs fd64.sfs # to extract it
unsquashfs -f multi....base.sfs # to overlay that on top
unsquashfs -f multi....save.sfs # to overlay that on top

Has to be in that order for correct layering i.e. the -f switch forces existing files already extracted to be overwritten if a 'later' copy of that file exists in the other sfs's.

unsquashfs by default extracts to a folder called squashfs-root, so with that extraction of all three sfs's done, all that remained was to
mksquashfs squashfs-root fd64.sfs -comp lz4 ... to create a new fd64.sfs (having first renamed the original version to fd64.sfs.old).

It's large, near 1GB, but the multi... sfs files can be deleted to leave just fd64.sfs alone (further/future saves will add more multi...sfs files as/when saves are made). With that setup memory utilisation at first boot has dropped from around 960MB down to 230MB (130MB if I boot without X being loaded (pfix=nox boot switch)).

So now I can boot to nox, start qemu (loading a Fatdog iso) and serving to vnc, and there's more ram available for that. I also have a laptop boot that boots to cli framebuffer, that can then vnc into that server for a full gui Fatdog desktop with no X running on either the client or server (other than the version of X that kvm is in effect running in kernel space) :)

Multi-session is a great way to boot IMO, very surprised its not more popular/widely-used.
Feek
Posts: 394
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 44 times
Been thanked: 86 times

Re: Multi-session live-CD/DVD

Post by Feek »

Hi, I was inspired by runwoof’s posts about Fatdog64 running with multisession .sfs files and I’ve tried it. It works very nice. I placed Fatdog’s folder on USB stick between the Puppies’ folders and manually added Fatdog’s entry into the menu.lst. It’s relatively simple and has advantages: .sfs file(s) can be deleted when you are not satisfied with some change you saved; after boot you run totally in ram (the whole session can be “read only” without saving anything if you wish). I made all basic settings like keyboard layout, time, network, firewall, etc. and created the first .sfs (+base.sfs), then installed and set browser and created the second .sfs (next .sfs’s will be probably some subtle changes)

user1111

Re: Multi-session live-CD/DVD

Post by user1111 »

Hi Feek.

For me, Fatdog multisession is the bees knees.

With event manger save session interval set to 0 (zero) it only ever saves on demand. To accommodate potential large amounts of changes being stored in 'ram' I use a swap partition (or a swap file) and just enlarge the aufs space in reflection of that i.e in /etc/rc.d/rc.local after the swapon command I add ..

mount -o remount,size=26G /aufs/pup_multi
mount -o remount,size=26G /aufs/pup_save
mount -o remount,size=26G /dev/shm
mount -o remount,size=26G /tmp

in reflection of having a 26GB swap partition.

I wouldn't run a save however if I'd used GB's of 'ram' as likely that wouldn't load at the next reboot. The above is more a case of just not running out of ram during a session, such as if I download a large file into /root before moving it to /mnt/sda1 or wherever. Without the swap the download would fail upon reaching available ram limits.

If you don't have a dedicated swap partition you can use a file

dd if=/dev/zero of=swapfile bs=4096 count=2000000
mkswap swapfile
swapon swapfile

to create a 8GB swapfile, and then use the earlier remounting code, but adjusted to whatever mem/swap space you have available.

Feek
Posts: 394
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 44 times
Been thanked: 86 times

Re: Multi-session live-CD/DVD

Post by Feek »

Hi runwoof,

thank you for this information.
I haven’t used swap yet. Recently I expanded my ram to 8 GB and after boot it shows 3.6 GB available disc space (personal storage). I think that’s enough for me (I’m an undemanding user ;) ), but for larger downloads it is certainly usefull workaround especially for systems with low ram.
Thanks again.
Cheers

Shortstop
Posts: 84
Joined: Thu Dec 23, 2021 3:36 am
Been thanked: 1 time

Re: Multi-session live-CD/DVD

Post by Shortstop »

Wait, are you saying that its possible to have two computers with the same exact Puppy ISO, and to carry over the .sfs from one computer to the other to continue your work?

Post Reply

Return to “Cutting Edge”