Bookworm Build script

a very small Live CD shaped to look and act like Puppy Linux.


Moderator: fredx181

Clarity
Posts: 4235
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1814 times
Been thanked: 571 times

Re: Bookworm Build script

Post by Clarity »

Hello @Amol

@fredx181 solution works.

Another option which you'll find consistent: This options is offered in the event you ALSO use any of the KL distros for simple Sessions saving.

  1. On your Linux drive (ext2/ext3/ext4) create a folder named "Sessions" (KL's have their boot-menu pre-set to look/create your session changes in this folder)

  2. Within Sessions, create a folder (as fred shows) "changes=/deb_dog". In fact, if your DebianDog has a version number you might want to do this so that you know/remember which version you have this. Thus you will have a combined folder-name changes=/Sessions/deb_dog-v??? where ??? is the version number you chose. This way, if you create other separate versions you'll one from the other. Your sessions will be saved/found by DDog and the same will also be true when/if you also use/boot KL's. Thus ALL of your sessions will be contained and found in the Sessions folder.

  3. You can, also, carve out some space on a system drive and label the new drive "Persistence" for keeping all of your Sessions in this single place.

disk image1b.png
disk image1b.png (8.29 KiB) Viewed 766 times

This is offered as the Session management boot option techniques for saving are defined via the "changes" parm on booting.

Last edited by Clarity on Sun Feb 16, 2025 12:52 pm, edited 1 time in total.
User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: Bookworm Build script

Post by fredx181 »

Clarity wrote: Sun Feb 16, 2025 11:49 am

Hello @Amol

@fredx181 solution works.

Another option which you'll find consistent: This options is offered in the event you ALSO use any of the KL distros for simple Sessions saving.

  1. On your Linux drive (ext2/ext3/ext4) create a folder named "Sessions" (KL's have their boot-menu pre-set to look/create your session changes in this folder)

  2. Within Sessions, create a folder (as fred shows) "changes=/deb_dog". In fact, if your DebianDog has a version number you might want to do this so that you know/remember which version you have this. Thus you will have a combined folder-name changes=/Sessions/deb_dog-v??? where ??? is the version number you chose.
    ....

    ....

Not correct info IMO. The "changes=/deb_dog" parameter is already part of one of the stanza's in the ISO, so that's why the entry: "DebianDog changes=/deb_dog , save to folder" works OOTB once you have created the "deb_dog" folder.
That doesn't go for e.g. "Sessions" (unless you modify the boot stanza at boot time). Or did I misunderstand what you were saying perhaps @Clarity ?

edit: I know that KL distro's have it well arranged (i.e. /Sessions/....) on a Persistence labeled partition but it's not like that when created an ISO with the mklive-bookworm script.

Clarity
Posts: 4235
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1814 times
Been thanked: 571 times

Re: Bookworm Build script

Post by Clarity »

Hi @fredx181

I am in total agreement with you. This is just an offer of an idea so that all of his sessions, no matter DOGs or KLs could be kept in the same Sessions folder. While at the same time experiencing the understanding for the 'Changes' parm in the boot menu to direct saving and finding the sessions. Just thought the Sessions folder would be helpful now and into the future for additional DOGs and any KLs he might venture toward.

Merely an idea for his understanding.

User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: Bookworm Build script

Post by fredx181 »

Clarity wrote: Sun Feb 16, 2025 12:58 pm

Hi @fredx181

I am in total agreement with you. This is just an offer of an idea so that all of his sessions, no matter DOGs or KLs could be kept in the same Sessions folder. While at the same time experiencing the understanding for the 'Changes' parm in the boot menu to direct saving and finding the sessions. Just thought the Sessions folder would be helpful now and into the future for additional DOGs and any KLs he might venture toward.

Merely an idea for his understanding.

Probably your intention is helping, but the result may be confusing. Please be very careful with posting your "offerings" (btw, I'd call it off-topic and pushy in this case, sorry).
@Amol could have easily interpreted your post as a solution for booting BookwormDog ISO by creating a 'Sessions' folder and could become very confused about what's the right method.

Amol
Posts: 162
Joined: Wed Oct 26, 2022 10:35 pm
Has thanked: 41 times
Been thanked: 103 times

Re: Bookworm Build script

Post by Amol »

Hello to all !
Thank you very much to fredx181 and clarity for the help.I've applied the fredx181 method and that works.I use a modern laptop and an usb key for the system with ventoy.
Best regards.
Amol

dancytron
Posts: 771
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 575 times
Been thanked: 243 times

Re: Bookworm Build script

Post by dancytron »

Although you can always use Isomaster to open up the ISO file, change whatever you need to, and then remake it.

gumanzoy
Posts: 149
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 29 times
Been thanked: 40 times
Contact:

Re: Bookworm Build script

Post by gumanzoy »

@fredx181

Hi

I look at porteusbootscripts_1.2.0_all.deb contents. Want to fix scripts for gtk3 versions of yad and gtkdialog.

Some scripts have almost same block of code.
/usr/bin/save2flash
/usr/bin/wmpoweroff
/usr/bin/wmreboot
/usr/local/bin/snap-ex

/etc/init.d/sfsunload from sfsload_2.0.0_all.deb

Code: Select all

if [ -f /mnt/live/tmp/modules ]; then
CHNGS=/mnt/live/memory/images/SFS  # porteus-boot
else
CHNGS=/mnt/SFS  # live-boot
fi

if [ "$(ls $CHNGS 2> /dev/null)" ]; then
    for BUNDLE in $(ls $CHNGS); do
 FILES=$(find $CHNGS/$BUNDLE ! -type d | sed "s|$CHNGS/$BUNDLE||")
umount $CHNGS/$BUNDLE-rw && rmdir $CHNGS/$BUNDLE-rw
umount $CHNGS/$BUNDLE && rmdir $CHNGS/$BUNDLE  # unmount squashfs, now check for broken symlinks to be removed...
    if [ $? -eq 0 ]; then
while read line; do
 if [ ! -e "$line" ]; then
# rename possibly existing .dpkg-new files
if [ -f "${line}".dpkg-new ]; then
mv -f "$line".dpkg-new "${line}"
continue
fi
# send to filelist to be executed with xargs below
[ -L "$line" ] && echo "$line" >> /tmp/${BUNDLE}.txt
 fi
done <<< "$FILES"
xargs -d '\n' -a /tmp/${BUNDLE}.txt rm   # remove symlinks

# remove leftover (empty) directories
tac /etc/SFS/${BUNDLE}.txt | while read line; do
if [ -d "$line" ]; then
rmdir "$line" 2> /dev/null 
fi
done

rm -f /etc/SFS/${BUNDLE}.txt
rm -f /tmp/${BUNDLE}.txt
cd $CHNGS/$BUNDLE-w/
find . -type d -exec mkdir -p /"{}" \;
find . -type f -exec mv -f "{}" /"{}" \;
cd -
rm -rf $CHNGS/$BUNDLE-w/
rm -rf $CHNGS/$BUNDLE-temp
echo "Module $BUNDLE deactivated"
    fi
    done
fi

If we have this code in /etc/init.d/sfsunload, we need it in other scripts or not?

PocketHandyBox (Debian 12 "Bookworm" with NVIDIA drivers OOTB)

User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: Bookworm Build script

Post by fredx181 »

gumanzoy wrote: Sat Mar 15, 2025 8:59 pm

@fredx181

Hi

I look at porteusbootscripts_1.2.0_all.deb contents. Want to fix scripts for gtk3 versions of yad and gtkdialog.

Some scripts have almost same block of code.
...

Yes, I did for extra security, to be absolutely sure that no symlinks are leftover in the system (when used sfsload), perhaps a bit overdone :?: .

gumanzoy
Posts: 149
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 29 times
Been thanked: 40 times
Contact:

Re: Bookworm Build script

Post by gumanzoy »

@fredx181

Could you please comment on the purpose of each script in porteusbootscripts_1.2.0_all.deb ?
Or maybe it is already described somewhere in forum?

/usr/bin/makepfile.sh - ?

/usr/bin/save2flash - ? (run /usr/bin/snapmergepuppy and something more)

/usr/bin/snapmergepuppy - do rsync -a --files-from=$FILESAVELIST "$SNAP" "$BASE" for changes=EXIT: ?

/usr/bin/wmpoweroff - show yad --title="Save changes" dialog
/usr/bin/wmreboot - same as wmpoweroff

/usr/local/bin/mk-save.gtkdlg - run from .desktop. For changes.dat creation ?

/usr/local/bin/snap-ex - ? (run /usr/bin/snapmergepuppy and something more)

/etc/init.d/snapexit - run /usr/local/bin/snap-ex

/etc/rc.local.shutdown - run /usr/local/bin/snap-ex
(used only for systemd, maybe run snap-ex directly from saveatshutdown.service ?)

/usr/lib/systemd/system/saveatshutdown.service - run /etc/rc.local.shutdown

PocketHandyBox (Debian 12 "Bookworm" with NVIDIA drivers OOTB)

User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: Bookworm Build script

Post by fredx181 »

@gumanzoy

Could you please comment on the purpose of each script in porteusbootscripts_1.2.0_all.deb ?

/usr/bin/makepfile.sh - ?

It's called from wmpoweroff/wmreboot in case not booting with changes already to create savefile or setup savefolder.

/usr/bin/save2flash - ? (run /usr/bin/snapmergepuppy and something more)

Can be used to save changes in the middle of a session or will run at shutdown (if changes=EXIT:/... is specifiied on kernel boot command line)

/usr/bin/snapmergepuppy - do rsync -a --files-from=$FILESAVELIST "$SNAP" "$BASE" for changes=EXIT: ?

Yes.

/usr/bin/wmpoweroff - show yad --title="Save changes" dialog
/usr/bin/wmreboot - same as wmpoweroff

Choice to save changes or not and see above about /usr/bin/makepfile.sh

/usr/local/bin/mk-save.gtkdlg - run from .desktop. For changes.dat creation ?

Yes.

/usr/local/bin/snap-ex - ? (run /usr/bin/snapmergepuppy and something more)

For in case the user e.g. typed poweroff or reboot in terminal , dialog Save/NoSave will appear from console at shutdown (wmpoweroff/wmreboot brings up a graphical prompt).

/etc/init.d/snapexit - run /usr/local/bin/snap-ex

Yes.

/etc/rc.local.shutdown - run /usr/local/bin/snap-ex
(used only for systemd, maybe run snap-ex directly from saveatshutdown.service ?)

Yes, needs looking at perhaps.

/usr/lib/systemd/system/saveatshutdown.service - run /etc/rc.local.shutdown

Yes.

Tell me if something is still unclear.

gumanzoy
Posts: 149
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 29 times
Been thanked: 40 times
Contact:

Re: Bookworm Build script

Post by gumanzoy »

@fredx181

Thanks

I look at diff makepfile.sh mk-save.gtkdlg

It is almost same but different header.
And mk-save.gtkdlg have mk_save() function.

I will merge it into one script.

But what is actual header for code of this scripts?

makepfile.sh

Code: Select all

# Savefile creator
# Copyright (c) alphaOS
# Written by simargl <archpup-at-gmail-dot-com> modified for DebianDog by fredx181

Or

mk-save.gtkdlg

Code: Select all

#########	Make a Save image file.		Terence Becker	SunBurnt	Dec. 7  2013

PocketHandyBox (Debian 12 "Bookworm" with NVIDIA drivers OOTB)

User avatar
fredx181
Posts: 3385
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 437 times
Been thanked: 1484 times
Contact:

Re: Bookworm Build script

Post by fredx181 »

gumanzoy wrote: Mon Mar 17, 2025 10:45 am

...
But what is actual header for code of this scripts?

makepfile.sh

Code: Select all

# Savefile creator
# Copyright (c) alphaOS
# Written by simargl <archpup-at-gmail-dot-com> modified for DebianDog by fredx181

Or

mk-save.gtkdlg

Code: Select all

#########	Make a Save image file.		Terence Becker	SunBurnt	Dec. 7  2013

(not sure if I understand your question well) Yes, a bit confusing, both scrips are very much modified by me and mk-save.gtkdlg was originally from Terence and makepfile.sh from simargl.
Oh, and mk-save.gtkdlg checks if porteus-boot is in use, if not, it assumes "live-boot" and does a setup for creating a savefile for live-boot (the official Debian method, but long time ago since I tested live-boot, so this may not work anymore as expected).
So if porteus-boot is the default, and no support for live-boot, I think you can leave out mk-save.gtkdlg .

Post Reply

Return to “DebianDogs”