How I set up for creating Debian Dogs from the mklive script

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

Moderator: fredx181

Post Reply
dancytron
Posts: 656
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 425 times
Been thanked: 191 times

How I set up for creating Debian Dogs from the mklive script

Post by dancytron »

Just a few little tricks I've used when I make DD ISOs.

First, I run the script with a default or a browserless almost default minimal version. Then I boot to that version in its original folder with a menu.1st entry like this.

Code: Select all

title bullseye/isodata (sda1) noauto from=/bullseye/isodata/ changes=EXIT:/bullseye/isodata/ 
root (hd0,0)
kernel (hd0,0)/bullseye/isodata/live/vmlinuz1 from=/bullseye/isodata/ changes=EXIT:/bullseye/isodata/
initrd (hd0,0)/bullseye/isodata/live/initrd1.xz

title bookworm/isodata (sda1) noauto from=/bookworm/isodata/ changes=EXIT:/bookworm/isodata/ 
root (hd0,0)
kernel (hd0,0)/bookworm/isodata/live/vmlinuz1 from=/bookworm/isodata/ changes=EXIT:/bookworm/isodata/
initrd (hd0,0)/bookworm/isodata/live/initrd1.xz

Then I make a copy of the build_setup.conf file and put it on sda1 with a link to my desktop

This is my development environment. Now I can test software, add it to the .conf file, and run the mklive script like this

Code: Select all

./mklive-bullseye -gui /image/live/mycustom.conf

for the next version, rinse and repeat as necessary.

dcung
Posts: 373
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 42 times
Been thanked: 51 times

Re: How I set up for creating Debian Dogs from the mklive script

Post by dcung »

I refresh DD ISOs quite often.
So, I modify mklive script to have as little interaction as possible.

These 2 pauses, I always choose default.
Is there a way to put echo <Enter> in the script, if so where?
Thank you.

2023-02-19-142047_806x533_scrot.png
2023-02-19-142047_806x533_scrot.png (82.26 KiB) Viewed 569 times
2023-02-19-142031_806x533_scrot.png
2023-02-19-142031_806x533_scrot.png (130.97 KiB) Viewed 569 times
User avatar
fredx181
Posts: 2609
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 284 times
Been thanked: 1015 times
Contact:

Re: How I set up for creating Debian Dogs from the mklive script

Post by fredx181 »

dcung wrote:

These 2 pauses, I always choose default.
Is there a way to put echo <Enter> in the script, if so where?

Not like that, but you can do some editing in the script.
For to prevent showing the keyboard choice dialog: around line 1132 (in mklive-sid) add DEBIAN_FRONTEND=noninteractive at the front of the apt-get line, so becomes this:
(default will be US keyboard then)

Code: Select all

# configure keyboard first
if [ "$SYSTEMD" = "FALSE" ]; then
echo -e "\e[0;36mInstall keyboard-configuration and more required packages\033[0m"
DEBIAN_FRONTEND=noninteractive apt-get install whiptail keyboard-configuration sysvinit-core elogind xz-utils cryptsetup cryptsetup-bin gnupg dirmngr apt-utils wget elogind libelogind0 libpam-elogind udev --yes
else
rm -f /etc/apt/preferences.d/00systemd
echo -e "\e[0;36mInstall keyboard-configuration and more required packages\033[0m"
DEBIAN_FRONTEND=noninteractive apt-get install whiptail keyboard-configuration initscripts xz-utils cryptsetup cryptsetup-bin gnupg dirmngr apt-utils wget systemd systemd-sysv libpam-systemd udev --yes
fi

For to prevent question about overwriting /etc/rc.local, change around line 1217 to;

Code: Select all

### Do the real installing
apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y $INSTALL
#apt-get install -y $INSTALL
# try again if failed
if [ $? -ne 0 ]; then
apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y $INSTALL
#apt-get install -y $INSTALL
	if [ $? -ne 0 ]; then
	echo -e "\e[0;31mFAILED\033[0m"
	touch /exit_
	exit
	fi
fi

Can be done for mklive-bookworm too, but has different line numbers.

dcung
Posts: 373
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 42 times
Been thanked: 51 times

Re: How I set up for creating Debian Dogs from the mklive script

Post by dcung »

fredx181 wrote: Sun Feb 19, 2023 1:07 pm

Not like that, but you can do some editing in the script.
...

Thanks Fred.
I just edited mine and doing a test build now.
Will update shortly.

UPDATE
Just finished the test build successfully.
From now on, I can leave the build unattended once I hit <OK> the GUI frontend. @fredx181 @dancytron :thumbup:

Code: Select all

./mklive-bullseye -gui ./mycustom.conf
dcung
Posts: 373
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 42 times
Been thanked: 51 times

Re: How I set up for creating Debian Dogs from the mklive script

Post by dcung »

fredx181 wrote: Sun Feb 19, 2023 1:07 pm

...
Can be done for mklive-bookworm too, but has different line numbers.

I made same modification to mklive-bookworm.
After the build finished, I tested the result.
A little hiccup here... Except for conky, nothing is on the desktop.
Re starting X, made no difference.

So, I went back and tested Bullseye built with the script-modification earlier.
(I didn't test the resulting Bullseye built, only confirmed that I could run script unattended).

I built Bullseye ddog64 & ddog32, and both have same issue with bookworm ddog.
So, I suspect it's the script modification that caused it (?).
To modify the script - I cut and paste Fred's codes from above and replaced appropriate sections.

I opened a terminal and ran screenshot from command line.

scrot-unattend.png
scrot-unattend.png (85.51 KiB) Viewed 460 times
Last edited by dcung on Mon Feb 20, 2023 6:23 pm, edited 1 time in total.
User avatar
fredx181
Posts: 2609
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 284 times
Been thanked: 1015 times
Contact:

Re: How I set up for creating Debian Dogs from the mklive script

Post by fredx181 »

@dcung Not because of your modification. Sorry, my bad, the custom.conf needs to have the DE_CONFIG variable set. For example:

Code: Select all

....
### Start configuration
DE_CONFIG="DDog"
....
....

Then it should work what you did.(./mklive-bullseye -gui ./mycustom.conf)
The options are: "Jwm" "Xfce4" "DDog" "ObDog" "ChromeDog" "Mate" "Tint2" (case sensitive)
If it's not set, the matching .squashfs (containing files for e.g. DDog, e.g. for startup config) will not be downloaded and used (should be done near the end of the script), that's why you got the result as you showed in the picture (e.g. no xfce-panel started)

Most of the preset config files e.g. here: https://debiandog.github.io/MakeLive/configs-bookworm have it set (not openbox_lx.conf, not needed, probably @dancytron based his custom.conf on that one (minimal, default openbox)).
But the generated "build_setup.conf" doesn't have it, will modify the mklive scripts later so it does generate it with DE_CONFIG=... included.

Note that setting the DE_CONFIG is not really compatible with custom.conf, only when making small changes or additions, it depends, e.g. say you remove xfdesktop4 from the list of installed applications in custom.conf, then the "DDog" preset will be broken as it depends on xfdesktop4 , so the combination is far from perfect ... (as a user must NOT be too creative :P , by making drastic changes)

dcung
Posts: 373
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 42 times
Been thanked: 51 times

Re: How I set up for creating Debian Dogs from the mklive script

Post by dcung »

I re-run the mod script with DE_CONFIG variable set.
It works now. :thumbup:

fredx181 wrote: Mon Feb 20, 2023 1:01 pm

Note that setting the DE_CONFIG is not really compatible with custom.conf, only when making small changes or additions, it depends, e.g. say you remove xfdesktop4 from the list of installed applications in custom.conf, then the "DDog" preset will be broken as it depends on xfdesktop4 , so the combination is far from perfect ... (as a user must NOT be too creative :P , by making drastic changes)

I know what you meant. Long time ago, in my early StretchDog days, I tried to make a 'lean' DDOG by removing packages. I quickly learnt that removing too much is not a good idea. Nowadays, I only do minor addition (or swap).

If you want to make 'lean' version, it's better to start with one of the minimal build (or use @rcrsn51 starter), and start adding thing.

dancytron
Posts: 656
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 425 times
Been thanked: 191 times

Re: How I set up for creating Debian Dogs from the mklive script

Post by dancytron »

I used to do that too.

Before they made mesa-dri mandatory, you could build a really tiny version.

I agree it's not worth the trouble except as a learning experience.

Post Reply

Return to “DebianDogs”