Bullseye build script

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

Moderator: fredx181

Post Reply
gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bullseye build script

Post by gumanzoy »

fredx181 wrote: Sat May 08, 2021 5:25 pm

Hi gumanzoy , nice job!
I know very little about PXE boot, so I couldn't have done it, many thanks for fixing! Also for the detailed info.

I didn't test PXE, but I trust that you know what you're doing, so I re-uploaded initrdport-bullseye.tar.gz with the patched linuxrc included.

Fred

Ok.
But i don't test, and do not touch code for if [ "$CHANGES" = /srv/pxe/storage ] because i don't use persistence. Maybe its work.

My LiveUSB DogLinux Bookworm build for hardware testing (nvidia-drivers, GPUTest)

gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bullseye build script

Post by gumanzoy »

@fredx181

Small fixes for scripts filemnt in filemnt-pcmanfm_1.0.1 and mnt-img in filemnt-thunar_1.0.1 debs
If mount udf image, for example Windows installation iso it mount as iso9660 and not show content of iso.
Fix is simple. Add udf,

Code: Select all

  elif [ "$Ext" = 'iso' ] ;then
   Type='udf,iso9660'
Attachments
Before fix
Before fix
Screenshot_2021-05-09_07-20-17.png (58.16 KiB) Viewed 2099 times
After fix
After fix
Screenshot_2021-05-09_07-43-37.png (55.02 KiB) Viewed 2112 times
Last edited by gumanzoy on Sun May 09, 2021 1:43 pm, edited 1 time in total.

My LiveUSB DogLinux Bookworm build for hardware testing (nvidia-drivers, GPUTest)

gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bullseye build script

Post by gumanzoy »

@fredx181

We have several problems in package upgrade-kernel_1.3.0_all.deb

  • In /usr/local/cr-initrd/initramfs/ have unpatched copy of modlist and linuxrc

  • Inside script /usr/local/cr-initrd/mkinitrd have copy of modlist instead of use file $INITRAMFS/modlist

  • Inside script /usr/local/bin/upgrade-kernel have copy of mkinitrd script, instead of execution /usr/local/cr-initrd/mkinitrd $kernel

I made patches for mkinitrd and upgrade-kernel. And test upgrade-kernel, it works.

Attachments
upgrade-kernel.patch.txt
(7.17 KiB) Downloaded 61 times
mkinitrd.patch.txt
(5.13 KiB) Downloaded 60 times
Test upgrade-kernel, it works.
Test upgrade-kernel, it works.
Screenshot_2021-05-09_09-54-57.png (61.14 KiB) Viewed 2112 times

My LiveUSB DogLinux Bookworm build for hardware testing (nvidia-drivers, GPUTest)

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Thanks gumanzoy,

I will update filemnt-pcmanfm with your change.
For mkinitrd and upgrade-kernel patches I had a quick look, but I will study further in the next days what changes it actually contains.
Looks like for upgrade-kernel porteus-boot it's using the Tomas M method, as I said earlier I prefer to stay with the mkinitramfs method.
I will get back later about the other changes you suggest.
Edit: No, sorry didn't look well, upgrade kernel doesn't use Tomas M method
Edit2: mkinitrd is using Tomas M method

Fred

gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bullseye build script

Post by gumanzoy »

fredx181 wrote: Sun May 09, 2021 3:28 pm

Thanks gumanzoy,

I will update filemnt-pcmanfm with your change.
For mkinitrd and upgrade-kernel patches I had a quick look, but I will study further in the next days what changes it actually contains.
Looks like for upgrade-kernel porteus-boot it's using the Tomas M method, as I said earlier I prefer to stay with the mkinitramfs method.
I will get back later about the other changes you suggest.
Edit: No, sorry didn't look well, upgrade kernel doesn't use Tomas M method

Fred

Don't forget about filemnt-thunar_1.0.1
I attach patch variant with mkinitramfs copy method. And Tomas M method fixed for PXE.

gumanzoy wrote: Thu May 06, 2021 6:43 am

Before i build Slax based on Debian 10 and build linux 5.5 from debian sources + aufs git.
Use it for 1 year maybe. In service center i boot it every day many times on lot of legacy and recent PC and notebooks.

If somebody want to try it. Just

Code: Select all

-cp -a /var/tmp/mkinitramfs_*/lib/modules/* $INITRAMFS/lib/modules/
+#cp -a /var/tmp/mkinitramfs_*/lib/modules/* $INITRAMFS/lib/modules/
Attachments
mkinitrd.patch2.txt
(4.18 KiB) Downloaded 48 times

My LiveUSB DogLinux Bookworm build for hardware testing (nvidia-drivers, GPUTest)

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

*** Updated packages ***

- filemnt-pcmanfm and filemnt-thunar (v1.0.2), added type 'udf' support for mounting ISO, as suggested by member gumanzoy (see viewtopic.php?p=24905#p24905).
- upgrade-kernel (v1.4.0), scripts are more compact and better organized now (from patches by gumanzoy).
also fixed PXE boot support and supports now booting from 'exfat' filesystem.
New package:
- upgrade-kernel-mod (EDIT: 1.4.1 now), as above, but this is using method from Tomas M (known from Slax OS) to generate (porteus-boot) initrd1.xz. (from patches by gumanzoy)
This results in a much smaller initrd1.xz (appr. 8.7M vs 18.2M) that has benefits of booting faster and will possibly be better suitable for very old machines.
(this hasn't been thoroughly tested by me, since I have very little different hardware to test on).

Run "upgrade-kernel" to upgrade/install new kernel "package", run "mk-initrd" to create new initrd1.xz and initrd.img from an already installed kernel.

Install with Synaptic or with apt from terminal. (upgrade-kernel and upgrade-kernel-mod will replace each other when installing)

@gumanzoy , nice job! Thanks again, good to see someone making some improvements, much appreciated.

------------------------------
EDIT: Found when testing initrd1.xz created from upgrade-kernel-mod that booting from a USB external drive didn't work, fixed by adding to /usr/local/cr-initrd/mkinitrd:

Code: Select all

copy_including_deps /$LMK/kernel/drivers/usb/storage/uas.*

Version 1.4.1 of upgrade-kernel-mod with above fix uploaded to repository.
------------------------------

Fred

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Updated upgrade-kernel-mod package to v1.4.2,
Found that creating initrd1xz with earlier version didn't work for when booting with an encrypted savefile.
Now it should work from what I tested, at the cost of +/- 1MB larger initrd1.xz though.
EDIT: if no interest in encrypted savefile support, just install the earlier version:

Code: Select all

apt install upgrade-kernel-mod=1.4.1
User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Bullseye build script

Post by rcrsn51 »

Hi Fred: I am quite happy with this new system. Any thoughts about making it the standard in the mklive script?

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

rcrsn51 wrote: Wed May 12, 2021 5:53 pm

Hi Fred: I am quite happy with this new system. Any thoughts about making it the standard in the mklive script?

Good to know that it works for you. Yes, probably I will make it the standard, in time.

gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bullseye build script

Post by gumanzoy »

@fredx181

Hi.

I found small bug with PXE. When linuxrc run udhcpc, it create /etc/resolv.conf
But when root change to /union we not have resolv.conf and no nameserver available.
Need add code co copy /etc/resolv.conf to /union/etc/resolv.conf if boot from PXE.

Code: Select all

if [ $IP ] && [ -f /etc/resolv.conf ]; then
    cp /etc/resolv.conf /union/etc/resolv.conf
fi

Patch attached.

P.S. Don't forget to patch each copy of linuxrc: initrdport-bullseye.tar.gz and deb's upgrade-kernel upgrade-kernel-mod

Attachments
linuxrc-pxe-resolv.conf.patch.txt
(326 Bytes) Downloaded 50 times

My LiveUSB DogLinux Bookworm build for hardware testing (nvidia-drivers, GPUTest)

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Hi gumanzoy,

Thanks again for the fix.

P.S. Don't forget to patch each copy of linuxrc: initrdport-bullseye.tar.gz and deb's upgrade-kernel upgrade-kernel-mod

Yes, followed your orders precisely :D , all updated with patched linuxrc .

Fred

mon
Posts: 1
Joined: Sun May 16, 2021 8:17 pm
Location: Spain
Has thanked: 2 times

Re: Bullseye build script

Post by mon »

Hi. I really like the ready to use StretchDog and BusterDog isos, very lightweight while including a diverse set of apps and utilities.
Now, I am trying to create a custom ISO with the help of the mklive-bullseye64 script but I get exactly the same error as @alexmartin posted.

Code: Select all

xterm is already the newest version (366-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up porteusbootscripts (1.1.1) ...
mv: cannot stat '/opt/tmp/saveatshutdown.service': No such file or directory
dpkg: error processing package porteusbootscripts (--configure):
 installed porteusbootscripts package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of sfsload:
 sfsload depends on porteusbootscripts; however:
  Package porteusbootscripts is not configured yet.

dpkg: error processing package sfsload (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 porteusbootscripts
 sfsload
E: Sub-process /usr/bin/dpkg returned an error code (1)
FAILED
Unmounting mount binds in chroot

I'm running the Appimage on BusterDog live 64 bit.
It seems that the porteusbootscripts fix is not working for me. I don't know if it can be related to having to run the script from another partition (It's ext4 as recommended) because BusterDog live system let me less than 2GB free.

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Hi mon,

I cannot explain why it failed for you, I just tried on Busterdog64 and the build went well, past installing porteusbootscripts:

Code: Select all

Setting up porteusbootscripts (1.1.1) ...
....

The reason that it failed for @alexmartin had to do with running from an OS with systemd enabled (which should be fixed now), but Busterdog has no systemd....
Yes, running from ext4 partition is fine, better not run it from inside the live system.

Maybe you can try again, to see if it works now, you'll never know.
If it fails again, can you give more details about what exactly you did? (e.g. which type DE build, modified package list, etc...)

Fred

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

*** Updated mklive-bullseye ***

Changes:
- Different method (from Tomas M, but modified) for creating initrd1.xz.
- Package upgrade-kernel updated to v1.5.0 (contains now the same method of creating (much smaller) initrd1.xz)
See also Here and Here , thanks @gumanzoy

New mklive-bullseye script attached at first post, appimages download and info: https://debiandog.github.io/MakeLive/Re ... yedog.html

Fred

alexmartin
Posts: 9
Joined: Tue May 04, 2021 12:11 pm

Re: Bullseye build script

Post by alexmartin »

Hi Fred,

Thanks for great work. It all works well.

Now I want to use my own compiled kernel along with this script. Any hints how to do it. What modifications to do in the script.

Alex

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Updated mklive-bullseye

Post by fredx181 »

Re: Updated mklive-bullseye
Just tested now again and looks like I've made a mistake, the build failed, trying to fix now... EDIT, few hours later, is now fixed, re-attached at first post.
@alexmartin I'll have a look at how to use your own kernel in the next days...

Fred

Clarity
Posts: 3844
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1633 times
Been thanked: 527 times

Re: Bullseye build script

Post by Clarity »

Build failure: Any ideas why from review of attached pic

Attachments
MkLIve_Build-Failure-1.jpg
MkLIve_Build-Failure-1.jpg (113.25 KiB) Viewed 1854 times
backi
Posts: 602
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 77 times
Been thanked: 70 times

Re: Bullseye build script

Post by backi »

Obviously ........Just install debootstrap.

Clarity
Posts: 3844
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1633 times
Been thanked: 527 times

Re: Bullseye build script

Post by Clarity »

What about the last lines of ".deb" saved?

Using Slacko64 v8.1. Could the base system be the problem with a missing lib?

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Clarity wrote:

Build failure: Any ideas why from review of attached pic
....

Probably you are running mklive-bullseye script from Puppy. EDIT: Yes I see now, Slacko64
Run the script from one of the 'Dog' systems.
Use the appimage to run from Puppy (as it contains the required dependencies, such a dpkg, debootstrap and more)
See: https://debiandog.github.io/MakeLive/Re ... yedog.html

EDIT:

What about the last lines of ".deb" saved?

it's saved, but apparently Slacko cannot install it properly.

Fred

alexmartin
Posts: 9
Joined: Tue May 04, 2021 12:11 pm

Re: Bullseye build script

Post by alexmartin »

alexmartin wrote: Sun May 23, 2021 8:40 am

Now I want to use my own compiled kernel along with this script. Any hints how to do it. What modifications to do in the script.

I am successfull in using custom kernel. It is hack. I give steps I followed to achieve this.

1. I edited the mklive-bullseye script at ### Install the Kernel location.
Expand the desired kernel in right location
dpkg-deb -x linux-image-xxx.deb ..../bullseye/chroot/tmp/tmpapt Do this from another terminal.

I have added halt in the script. Also commented kernel install command. Ensure that overlayfs is enabled in kernel config.

Code: Select all

### install the kernel
echo -e "\e[0;36mInstall the kernel, download and extract\033[0m"
mkdir -p /tmp/tmpapt
[ "$ARCH" = "i386" ] && apt-get -o dir::cache::archives="/tmp/tmpapt" install -d linux-image-686-pae -y
[ "$ARCH" = "amd64" ] && apt-get -o dir::cache::archives="/tmp/tmpapt" install -d linux-image-amd64 -y

##### L_IMG=$(ls -S /tmp/tmpapt | head -1)     <<<<< modified line
##### dpkg-deb -x /tmp/tmpapt/$L_IMG /tmp/tmpapt    <<<<<< modified line
##### Next line is freshly added to halt main script to Manually install custom kernel.

read -sp "Install Custom kernel Manually in .../bullseye/chroot/tmp/tmpapt folder\n Press ENTER to continue . . . "

kernel=$(ls /tmp/tmpapt/lib/modules/)
cp -a /tmp/tmpapt/lib/ /
depmod $kernel

############ End of installing packages ############

Alex

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Thanks Alex,
Just curious, what's your reason for using own build kernel (instead of Debian stock kernel) ?

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Bullseye build script

Post by rcrsn51 »

Hi Fred: I just ran my version of the bullseye mklive script to make a Starter Kit.

I was expecting to get the new small initrd1.xz but got the old 19MB version instead.

Any suggestions?

Everything else is working fine.

alexmartin
Posts: 9
Joined: Tue May 04, 2021 12:11 pm

Re: Bullseye build script

Post by alexmartin »

fredx181 wrote: Sun May 23, 2021 6:17 pm

Just curious, what's your reason for using own build kernel (instead of Debian stock kernel) ?

I want to use cip kernel https://www.cip-project.org/

Alex

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

rcrsn51 wrote: Sun May 23, 2021 10:38 pm

Hi Fred: I just ran my version of the bullseye mklive script to make a Starter Kit.

I was expecting to get the new small initrd1.xz but got the old 19MB version instead.

Any suggestions?

Everything else is working fine.

Probably your script still contains the "mkinitramfs" method to create inittd1.xz
Basically the change in mklive script is:

Code: Select all

echo -e "\e[0;36mGenerating porteus-boot initrd1.xz . . .\033[0m"
/usr/local/mkinitrd $kernel

(replacing mkinitramfs ......)
The updated dog-boot-bullseye-20210118.tar.gz contains script usr/local/mkinitrd, has 140 lines, I didn't want to add all these to the mklive script.

So more exact, this:

Code: Select all

if [ $LBINITRD = yes ]; then
echo -e "\e[0;36mGenerate initrd.img . . .\033[0m"
mkinitramfs -c xz -k -o /tmp/tmpapt/boot/initrd.img  $kernel
else
echo -e "\e[0;36mAs chosen, not creating initrd.img, only initrd1.xz\033[0m"
mkinitramfs -k -o /dev/null $kernel
fi

# copy lib/modules from /var/tmp/mkinitramfs_* to /tmp/initrdport-bullseye/
cp -a /var/tmp/mkinitramfs_*/lib/modules/* /tmp/initrdport-bullseye/lib/modules/

echo -e "\e[0;36mGenerating porteus-boot initrd1.xz . . .\033[0m"
mv -f /tmp/initrdport-bullseye/modlist /tmp/initrdport-bullseye/modlist.tmp 2> /dev/null

## Create modlist in /tmp/initrdport-bullseye (then modprobe only existing modules at boot, faster)
for m in $(cat /tmp/initrdport-bullseye/modlist.tmp 2> /dev/null); do
modprobe -S $kernel -d /tmp/initrdport-bullseye/ -Dq $m | grep -v builtin > /dev/null 2> /dev/null
[ $? -eq 0 ] && echo -n "$m "  >> /tmp/initrdport-bullseye/modlist
done
rm /tmp/initrdport-bullseye/modlist.tmp

cd /tmp/initrdport-bullseye/
find . -print | cpio -o -H newc 2>/dev/null | xz -f --extreme --check=crc32 > ../initrd1.xz

Is replaced by this:

Code: Select all

if [ $LBINITRD = yes ]; then
echo -e "\e[0;36mGenerate initrd.img . . .\033[0m"
mkinitramfs -c xz -k -o /tmp/tmpapt/boot/initrd.img  $kernel
else
echo -e "\e[0;36mAs chosen, not creating initrd.img, only initrd1.xz\033[0m"
fi
echo -e "\e[0;36mGenerating porteus-boot initrd1.xz . . .\033[0m"
/usr/local/mkinitrd $kernel

And further on in the script, remove /usr/local/mkinitrd

Hope this helps.

Fred

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Bullseye build script

Post by rcrsn51 »

fredx181 wrote: Mon May 24, 2021 8:41 am

Probably your script still contains the "mkinitramfs" method to create inittd1.xz
Basically the change in mklive script is:

Code: Select all

echo -e "\e[0;36mGenerating porteus-boot initrd1.xz . . .\033[0m"
/usr/local/mkinitrd $kernel

That worked. Thanks.

I wanted to get the ISO under 300MB. ;)

alexmartin
Posts: 9
Joined: Tue May 04, 2021 12:11 pm

Re: Bullseye build script

Post by alexmartin »

Hi,

I want to login as user puppy on boot.

is it possible?

Alex.

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: Bullseye build script

Post by fredx181 »

alexmartin wrote: Mon May 24, 2021 12:41 pm

Hi,

I want to login as user puppy on boot.

is it possible?

Alex.

Yes, assuming that you want to autologin, and not using a login-manager, edit /etc/inittab, find the line:
1:2345:respawn:/bin/login ..... and change root to puppy:

Code: Select all

1:2345:respawn:/bin/login -f puppy tty6 </dev/tty1 >/dev/tty1 2>&1
User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Bullseye build script

Post by rcrsn51 »

I have built a combo wifi driver pack for the lastest Bullseye kernel 5.10.0-6-amd64.

alexmartin
Posts: 9
Joined: Tue May 04, 2021 12:11 pm

Re: Bullseye build script

Post by alexmartin »

Hi Fred,
Thanks. This worked.

fredx181 wrote: Mon May 24, 2021 4:38 pm

Yes, assuming that you want to autologin, and not using a login-manager, edit /etc/inittab, find the line:
1:2345:respawn:/bin/login ..... and change root to puppy:

Code: Select all

1:2345:respawn:/bin/login -f puppy tty6 </dev/tty1 >/dev/tty1 2>&1

This is working for puppy. Not for newuser created. X server not starting. Remains in console mode.

You need to change /etc/skel.

After copying /home/puppy folder to /home/newuser. Then chown newuser. Worked for autologin to X with newuser.

I checked contents of skel and puppy home folder. There are differences.

Request you to make changes to skel folder.

Thanks,
Alex.

Post Reply

Return to “DebianDogs”