Bookworm Build script

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

Moderator: fredx181

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: Bookworm Build script

Post by fredx181 »

gumanzoy wrote: Fri Oct 04, 2024 5:12 am

@fredx181

Hi

I saw something more after i have experience with fresh builds.

As soon as network-manager 1.42.4 packages in debian and devuan not have dep: wpasupplicant like previous versions.
And only have rec: wpasupplicant. But this package is needed to be able to connect to Wi-Fi networks.

Better to have wpasupplicant in BASE_INSTALL=

Yes, thanks, did recently add wpasupplicant to the online xfce4.conf (at BASE_DOG_APPS_INSTALL=...), now added to all online configs at BASE_INSTALL=.....

dancytron
Posts: 722
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 520 times
Been thanked: 217 times

Re: Bookworm Build script

Post by dancytron »

Looks like I found another version conflict with the devuan files.

This is the error message:

Code: Select all

The following packages have unmet dependencies:
 libeudev-dev : Depends: libeudev1 (= 233:3.2.9-9~beowulf1) but 234:3.2.12-4+deb12u1 is to be installed
E: Unable to correct problems, you have held broken packages.

Below is the narrative of how I found it.

I built a very minimal DD bookworm with usr merge but without systemd.

When I went to install scrcpy, which you have to compile, did this as the 1st step. (I have a systemd version working fine.) see https://github.com/Genymobile/scrcpy/bl ... c/linux.md

Code: Select all

apt install ffmpeg libsdl2-2.0-0 adb wget \
                 gcc git pkg-config meson ninja-build libsdl2-dev \
                 libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
                 libswresample-dev libusb-1.0-0 libusb-1.0-0-dev

I got an error. I installed a few things and tried again with this to record the error.

Code: Select all

root@live:~# apt install gcc git pkg-config meson ninja-build libsdl2-dev \
                 libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdl2-dev : Depends: libudev-dev
E: Unable to correct problems, you have held broken packages.

I then tried to install libudev-dev by itself and got this error

Code: Select all

root@live:~# apt install  libudev-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libeudev-dev : Depends: libeudev1 (= 233:3.2.9-9~beowulf1) but 234:3.2.12-4+deb12u1 is to be installed
E: Unable to correct problems, you have held broken packages.

Thanks,

Dan

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: Bookworm Build script

Post by fredx181 »

@dancytron
Yes, new eudev recently added to dog repo and requires also new libeudev-dev, I think it's fixed now, let me know.
(added libeudev-dev 234:3.2.12-4+deb12u1)

dancytron
Posts: 722
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 520 times
Been thanked: 217 times

Re: Bookworm Build script

Post by dancytron »

That fixed it.

Thanks,

Dan

dancytron
Posts: 722
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 520 times
Been thanked: 217 times

Re: Bookworm Build script

Post by dancytron »

I built a minimal LXQT Debian Dog bookworm targeting obsolete or partially broken Chromebooks.

It just does 2 things. It runs scrcpy (the thin client for Android phones) and it runs the script that Bill @rcrsn51 wrote to enable sound on Braswell based chromebooks.

Built non-systemd but with usr merge. No pulse audio, pipewire or bluetooth. Lightdm for the login manager and bleachbit. Wallpaper is public domain from NASA.

Scrcpy instructions came from here:
https://github.com/Genymobile/scrcpy

Braswell sound script. The drivers he is talking about are already installed, just run the script.
https://forum.puppylinux.com/viewtopic. ... nd#p114072

Download

https://www.dropbox.com/scl/fi/deov2sq8 ... 9t3yd&dl=1

Code: Select all

md5sum /mnt/sda1/bookworm/isodata/live/10-13-24-RetroScrcpy-DDog-custom.iso
f13402308851eb070978e4ea9285632f  /mnt/sda1/bookworm/isodata/live/10-13-24-RetroScrcpy-DDog-custom.iso
2024-10-14-082521_1920x1080_scrot.jpg
2024-10-14-082521_1920x1080_scrot.jpg (60.76 KiB) Viewed 1312 times
Attachments
lxqt.minimal.build_setup.4.conf.gz
remove .gz
(3.08 KiB) Downloaded 10 times
gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bookworm Build script

Post by gumanzoy »

@fredx181

fredx181 wrote: Sun Oct 20, 2024 9:47 am

Thanks. Would you agree if I incorporate your changes ?
(so that it will be included in the initrd on a new mklive build, and also in e.g. upgrade-kernel package)

Yes.

Changes to linuxrc and mkinitrd scripts for support new param nvidia_detect
Used in my Bullseye and Bookworm builds from 2021.

But if you see. It change order of modules load. Before extramod= loads at the end, now its load after base modules.
Now order:
/live/*.squashfs
extramod
/live/modules/*.squashfs
/live/optional/

That makes extramod= modules can not overwrite files of modules from /live/modules/*.squashfs and /live/optional/*.
Before:
/live/*.squashfs
/live/modules/*.squashfs
/live/optional/
extramod

Maybe it is important, maybe not.


And after we fix (i hope) problem with Broadcom Netlink BCM57780. All changes can be merged into one update.


Another thing suggested by user of my build - improve PXE support by makes possible to change /srv/pxe nfs server path.
Add to linuxrc new param nfspath=

Code: Select all

 FROM=`value from`; ISO=`echo $FROM | egrep ".*\.iso( |\$)"`
 IP=`value ip | cut -d: -f2`
+NFSPATH=`value nfspath`; [ $NFSPATH ] || NFSPATH=/srv/pxe
 MOPT=`value mopt`; [ $MOPT ] || MOPT="noatime,nodiratime,suid,dev,exec,async"
 CHANGES=`value changes`

Code: Select all

-    mkdir -p /mnt/nfs/storage; udhcpc; modprobe nfsv4; mount -t nfs4 $IP:/srv/pxe /mnt/nfs -o ro,nolock 2>/dev/null || { modprobe nfsv3; mount -t nfs $IP:/srv/pxe /mnt/nfs -o ro,nolock 2>/dev/null; }
+    mkdir -p /mnt/nfs/storage; udhcpc; modprobe nfsv4; mount -t nfs4 $IP:$NFSPATH /mnt/nfs -o ro,nolock 2>/dev/null || { modprobe nfsv3; mount -t nfs $IP:$NFSPATH /mnt/nfs -o ro,nolock 2>/dev/null; }

Good idea. But i am don't know how to deal with changes=.
Now its look

Code: Select all

    if [ "$CHANGES" = /srv/pxe/storage ]; then
	if lsmod | grep -q nfsv3; then
	    mount -t nfs $IP:/srv/pxe/storage /mnt/nfs/storage -o rw,nolock 2>/dev/null && { mkdir -p /mnt/nfs/storage/client-$MAC/changes/home; CHANGES="/storage/client-$MAC"; }
	else
	    mount -t nfs4 $IP:/srv/pxe/storage /mnt/nfs/storage -o rw,nolock 2>/dev/null && { mkdir -p /mnt/nfs/storage/client-$MAC/changes/home; CHANGES="/storage/client-$MAC"; }
	fi
    fi

But i never test it is working or not with NFS. Because i don't use changes= at all.
Better to make possible to set separate nfs server path to save changes to nfs.

I post this in this topic. Because i hope to somebody can suggest variant of code and possible new cheatcode name.

More info about how to setup PXE boot in my old post at Bullseye build script topic.

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: Bookworm Build script

Post by fredx181 »

gumanzoy wrote: Sun Oct 20, 2024 2:00 pm

@fredx181

fredx181 wrote: Sun Oct 20, 2024 9:47 am

Thanks. Would you agree if I incorporate your changes ?
(so that it will be included in the initrd on a new mklive build, and also in e.g. upgrade-kernel package)

But if you see. It change order of modules load. Before extramod= loads at the end, now its load after base modules.
Now order:
/live/*.squashfs
extramod
/live/modules/*.squashfs
/live/optional/

That makes extramod= modules can not overwrite files of modules from /live/modules/*.squashfs and /live/optional/*.

That's ok, rather intuitive, I'd say.

And after we fix (i hope) problem with Broadcom Netlink BCM57780. All changes can be included in one update.

Ok, after that I will make the update(s) (also including the nfs addition you wrote about).

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

Re: Bookworm Build script

Post by gumanzoy »

fredx181 wrote: Sun Oct 20, 2024 2:49 pm

Ok, after that I will make the update(s) (also including the nfs addition you wrote about).

And another fix to merge into /usr/local/cr-initrd/mkinitrd and /usr/local/cr-initrd/initramfs/modlist

Insert to modlist - vmd before nvme nvme_core

And to mkinitrd - code to copy module to initrd.

Code: Select all

 copy_including_deps /$LMK/kernel/drivers/md

+copy_including_deps /$LMK/kernel/drivers/pci/controller/vmd.*

I applied it quietly in 2023 Bookworm build. Test and it is working.

It is need to support boot from NVMe SSD on modern Intel systems start from Core 11th gen. And still present in 14th gen.
With VMD Controller option enabled in UEFI setup. It is enabled by default on many notebooks.

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: Bookworm Build script

Post by gumanzoy »

@fredx181

Hi.

I make patch for

upgrade-kernel-gumanzoy-2024.10.24.patch.tar.xz
(14.06 KiB) Downloaded 8 times

/usr/local/bin/upgrade-kernel
/usr/local/cr-initrd/mkinitrd
/usr/local/cr-initrd/initramfs/linuxrc
/usr/local/cr-initrd/initramfs/modlist

Modify upgrade-kernel and mkinitrd scripts for better compress kernel modules.

linux-image-6.10.11+bpo-amd64-unsigned_6.10.11-1~bpo12+1_amd64.deb filelist
linux-modules-6.8.0-31-generic_6.8.0-31.31_amd64.deb filelist

Code: Select all

/lib/modules/6.10.11+bpo-amd64/kernel/arch/x86/crypto/aegis128-aesni.ko.xz
/lib/modules/6.8.0-31-generic/kernel/arch/x86/crypto/aegis128-aesni.ko.zst

Add code to decompression .ko.xz present in current Debian testing (and also stable backports kernels) and .ko.zst present in Ubuntu 24.04
And compress k-$kernel.squashfs with -comp xz -b 512k -Xbcj x86

/usr/local/bin/upgrade-kernel

Code: Select all

 export kernel=$(ls /tmp/tmpapt/lib/modules/)
 cp -a /tmp/tmpapt/lib/modules /lib/
 cp -a /tmp/tmpapt/boot/config-* /boot/
+find /lib/modules/$kernel -name "*.ko.gz" -exec gunzip {} \;
+find /lib/modules/$kernel -name "*.ko.xz" -exec xz -d {} \;
+find /lib/modules/$kernel -name "*.ko.zst" -exec zstd -d {} \;
 depmod $kernel

-script -q -c "stty rows 40 cols 100; mksquashfs $WORK/k-$KERNDIR/$KERN $WORK/k-$KERNDIR/k-$KERN.squashfs" |while read -n 250 LINE ; do
+script -q -c "stty rows 40 cols 100; mksquashfs $WORK/k-$KERNDIR/$KERN $WORK/k-$KERNDIR/k-$KERN.squashfs -comp xz -b 512k -Xbcj x86" |while read -n 250 LINE ; do

/usr/local/cr-initrd/mkinitrd

Code: Select all

 find $INITRAMFS -name "*.ko.gz" -exec gunzip {} \;
+find $INITRAMFS -name "*.ko.xz" -exec xz -d {} \;
+find $INITRAMFS -name "*.ko.zst" -exec zstd -d {} \;

Other changes described in my previous posts.

  • Support for new param nvidia_detect Used in my Bullseye and Bookworm builds from 2021

  • Fix problem with Broadcom Netlink BCM57780 Ethernet adapter

  • Add new param nfspath= makes possible to change /srv/pxe nfs server path for PXE network boot.

  • Support boot from NVMe SSD on modern Intel systems with VMD Controller option enabled in UEFI setup


I already test it with USB boot and with network PXE boot with realtek r8169 adapter

Code: Select all

root@live:~# grep nfs /mnt/live/var/log/livedbg
/mnt/nfs
/mnt/nfs/live
root@live:~# lsmod | grep realtek
realtek                45056  2
libphy                225280  3 r8169,mdio_devres,realtek

I am still don't know how to deal with changes= in case of PXE network boot. Leave this code as is in this patch.

Code: Select all

    if [ "$CHANGES" = /srv/pxe/storage ]; then
	if lsmod | grep -q nfsv3; then
	    mount -t nfs $IP:/srv/pxe/storage /mnt/nfs/storage -o rw,nolock 2>/dev/null && { mkdir -p /mnt/nfs/storage/client-$MAC/changes/home; CHANGES="/storage/client-$MAC"; }
	else
	    mount -t nfs4 $IP:/srv/pxe/storage /mnt/nfs/storage -o rw,nolock 2>/dev/null && { mkdir -p /mnt/nfs/storage/client-$MAC/changes/home; CHANGES="/storage/client-$MAC"; }
	fi
    fi

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: Bookworm Build script

Post by fredx181 »

Thanks to @gumanzoy and @Clarity (for testing) , changes:
- the upgrade-kernel package is upgraded in the repository, now v1.16.0 : https://github.com/doglinux/book-worm/r ... .0_all.deb
- changes done accordingly in the MakeLive repository (for when making a new mklive-bookworm or mklive-daedalus build): in dog-boot-bookworm-20211113.tar.gz edit: should be dog-boot-bookworm-20221013.tar.gz, dog-boot-daedalus-20220711.tar.gz and initrdport-bullseye.tar.gz
See also: viewtopic.php?p=133971#p133971

More details (but please, anyone correct me if I'm wrong):
- If installed nvidia-kernel-common nvidia-support nvidia-modprobe nvidia-xconfig nvidia-detect the initrd will detect now if you have nvidia graphics card and use it.
edit: well, much better info about nvidia in next post from gumanzoy
- In some case(s) the ethernet driver tg3 was not detected properly, should be fixed now
- and some more, see previous post by gumanzoy
(and see discussion about it in thread: viewtopic.php?t=12798)

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

Re: Bookworm Build script

Post by gumanzoy »

EDIT: Short explanation:
The purpose of param nvidia_detect is: load pre-created .squashfs modules with proper nvidia driver version
for video card discovered by lspci (or not load it if no one of corresponding video card ID's present).

fredx181 wrote: Thu Oct 24, 2024 5:11 pm

More details (but please, anyone correct me if I'm wrong):
- If installed nvidia-kernel-common nvidia-support nvidia-modprobe nvidia-xconfig nvidia-detect the initrd will detect now if you have nvidia graphics card and use it.

To get param nvidia_detect working need to:

  • I: At the time of creating initrd1.xz for kernel by running /usr/local/cr-initrd/mkinitrd
    - corresponding files /usr/share/nvidia/nvidia*.ids should be present in filesystem to be copied to initrd.
    These files contains in nvidia-detect package.

  • II: Modules with nvidia driver lib's and with nvidia driver kernel modules for corresponding kernel version - should be build and present in live/optional/
    Modules contains lib's and configs: nv340.108.squashfs nv390.157.squashfs nvidia-550.120.squashfs
    Modules contains nvidia driver kernel modules: nv340.108-k*.squashfs nv390.157-k*.squashfs nvidia-550.120-k*.squashfs
    Modules with nvidia-legacy-340xx-driver and nvidia-legacy-390xx-driver should have names: nv340* nv390*
    Modules with current NVIDIA-Linux-x86_64-550.120.run version have names: nvidia-*

  • III: To support optimus (iGPU Intel + dGPU NVIDIA) configurations for old notebooks with nvidia-legacy-340xx-driver and nvidia-legacy-390xx-driver
    Need extra configs i described in this post.

I described process of building modules for nvidia-legacy-340xx-driver and nvidia-legacy-390xx-driver in this post. Better to read full topic.
Later i will describe process of building modules for fresh version from NVIDIA-Linux-x86_64-550.120.run.

Packages nvidia-kernel-common nvidia-support nvidia-modprobe nvidia-xconfig i add to BASE_INSTALL= but it is not strictly needed.
It is only for easier modules building process. Can put all dependencies into modules.
Package nvidia-detect not need at all. Only need corresponding files /usr/share/nvidia/nvidia*.ids at the time of creating initrd1.xz

Last edited by gumanzoy on Mon Oct 28, 2024 3:24 pm, edited 4 times in total.

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

dcung
Posts: 471
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 57 times
Been thanked: 68 times

Re: Bookworm Build script

Post by dcung »

fredx181 wrote: Thu Oct 24, 2024 5:11 pm

- changes done accordingly in the MakeLive repository (for when making a new mklive-bookworm or mklive-daedalus build): in dog-boot-bookworm-20211113.tar.gz, dog-boot-daedalus-20220711.tar.gz and initrdport-bullseye.tar.gz

I thought I do a refresh, kicked off the marathon build.
I stopped it when first ISO was done (XFCE4), since I saw this (i.e. I don't usually create initrd.img).

Code: Select all

[0;36mAs chosen, not creating initrd.img, only initrd1.xz[0m
[0;36mGenerating porteus-boot initrd1.xz . . .[0m
Create porteus-boot initrd1.xz and initrd.img
Creating initrd1.xz . . .
Creating initrd.img . . .
setupcon is missing. Please install the 'console-setup' package.
live-boot: core filesystems dm-verity devices utils udev blockdev dns.
Working files in /var/tmp/mkinitramfs_zaook1, early initramfs in /var/tmp/mkinitramfs-FW_qiWAis, main initramfs in /var/tmp/mkinitramfs-MAIN_ZxFKC5 and overlay in /var/tmp/mkinitramfs-OL_aL7c9b
Done ! /tmp/initrd1.xz /tmp/initrd.img
Press any key to close/continue, or wait 10 seconds . . .

This is from last build 10 days ago for comparison. Using same script & conf files set.

Code: Select all

[0;36mAs chosen, not creating initrd.img, only initrd1.xz[0m
[0;36mGenerating porteus-boot initrd1.xz . . .[0m
Done ! /tmp/initrd1.xz

The resulting build is working...
Before I continue with my refresh...I just thought I ask @fredx181 if this is by design or something wrong at my end (?).
I checked 'console-setup' package is not in my local XFCE4 conf nor in online XFCE4 conf.
Anyway, I'll check further probably I made inadvertent change somewhere (?) , but I thought @fredx181 can figure it out way faster than me...

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: Bookworm Build script

Post by fredx181 »

gumanzoy wrote: Thu Oct 24, 2024 5:56 pm
fredx181 wrote: Thu Oct 24, 2024 5:11 pm

More details (but please, anyone correct me if I'm wrong):
- If installed nvidia-kernel-common nvidia-support nvidia-modprobe nvidia-xconfig nvidia-detect the initrd will detect now if you have nvidia graphics card and use it.

To get param nvidia_detect working need to:
...
...

Ok, but that all seems very complex IMHO (and unfortunately I cannot test nvidia), what would you advice for a user to make nvidia work without creating extra .squashfs modules, but just to install the necessary for to save changes in the save storage when the new initrd is in use ?
(I remember this has been discussed in the old forum (for Stretch at that time) and did work for some, even without any change in the initrd)

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

Re: Bookworm Build script

Post by gumanzoy »

fredx181 wrote: Thu Oct 24, 2024 6:37 pm

Ok, but that all seems very complex IMHO (and unfortunately I cannot test nvidia), what would you advice for a user to make nvidia work without creating extra .squashfs modules, but just to install the necessary for to save changes in the save storage when the new initrd is in use ?
(I remember this has been discussed in the old forum (for Stretch at that time) and did work for some, even without any change in the initrd)

For get to work nvidia driver on one single computer with save storage - not need to use nvidia_detect

I need nvidia_detect to run on various different computer configurations manufactured from 2007 to 2022 and later.
And get proper nvidia driver version OOTB.

edit: Feel free to try (i think it's easy) my liveusb build. Before start to read my posts (if it feels difficult).

Last edited by gumanzoy on Thu Oct 24, 2024 7:51 pm, edited 1 time in total.

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: Bookworm Build script

Post by fredx181 »

@dcung

but I thought @fredx181 can figure it out way faster than me...

At the moment I am very, very slow .. .. ;)
Frankly, I don't understand, perhaps tomorrow I will ...

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

Re: Bookworm Build script

Post by rcrsn51 »

I remember this has been discussed in the old forum (for Stretch at that time) and did work for some, even without any change in the initrd

In the old forum, the nvidia issue was well-defined. For most users, the nouveau driver works well and is good enough - you don't need the vendor driver. Debian is dropping support for the vendor driver with many older cards, but there are ways to speed up nouveau with these legacy cards.

If you want to install the nvidia driver, there is a standard procedure.
1. Get the kernel headers, either as a prebuilt squashfs module or through apt.
2. Install the package nvidia-detect.
3. Run the nvidia-detect tool. It will recommend what Debian package to get, if any is available for your card.
4. Install that driver package. The rest is automatic.

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: Bookworm Build script

Post by fredx181 »

dcung wrote: Thu Oct 24, 2024 6:20 pm
fredx181 wrote: Thu Oct 24, 2024 5:11 pm

- changes done accordingly in the MakeLive repository (for when making a new mklive-bookworm or mklive-daedalus build): in dog-boot-bookworm-20221013.tar.gz, dog-boot-daedalus-20220711.tar.gz and initrdport-bullseye.tar.gz

I thought I do a refresh, kicked off the marathon build.
I stopped it when first ISO was done (XFCE4), since I saw this (i.e. I don't usually create initrd.img).

Code: Select all

[0;36mAs chosen, not creating initrd.img, only initrd1.xz[0m
[0;36mGenerating porteus-boot initrd1.xz . . .[0m
Create porteus-boot initrd1.xz and initrd.img
Creating initrd1.xz . . .
Creating initrd.img . .
 . . .

Found now that I made a mistake in the mkinitrd scriipt in dog-boot-bookworm-20221013, re-uploaded with fix, so should be ok now for when making new build.
Thanks for noticing ! :thumbup:

dcung
Posts: 471
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 57 times
Been thanked: 68 times

Re: Bookworm Build script

Post by dcung »

fredx181 wrote: Thu Oct 24, 2024 7:57 pm

Found now that I made a mistake in the mkinitrd scriipt in dog-boot-bookworm-20221013, re-uploaded with fix, so should be ok now for when making new build.
Thanks for noticing ! :thumbup:

I re-run the build XFCE4.
Yep - 'problem' went away now. :thumbup2:

Code: Select all

[0;36mAs chosen, not creating initrd.img, only initrd1.xz[0m
[0;36mGenerating porteus-boot initrd1.xz . . .[0m
Done ! /tmp/initrd1.xz
dcung
Posts: 471
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 57 times
Been thanked: 68 times

Re: Bookworm Build script

Post by dcung »

fredx181 wrote: Thu Oct 24, 2024 5:11 pm

- In some case(s) the ethernet driver tg3 was not detected properly, should be fixed now

I don't usually create initrd.img. Apart that I don't use it (yet), I also saw these warnings when I create build with initrd.img.
I thought I try building one with initrd.img - here are the warnings, which I have not resolved yet. I need to figure out what firmware to include I guess.

Code: Select all

[0;36mGenerate initrd.img . . .[0m
W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg357766.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3
cryptsetup: WARNING: Couldn't determine root device
W: Possible missing firmware /lib/firmware/i915/skl_huc_2.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_huc_2.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_4.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_huc_4.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_4.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_4.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_huc_4.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_huc_9.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_huc_9.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_huc_9.0.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.9.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.9.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_huc.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.9.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.9.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_guc_70.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_70.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_guc_70.1.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_guc_70.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg2_guc_70.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_dmc_ver1_07.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_dmc_ver1_09.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_dmc_ver2_12.bin for module i915
W: Possible missing firmware /lib/firmware/i915/rkl_dmc_ver2_03.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_dmc_ver2_02.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adls_dmc_ver2_01.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_dmc_ver2_16.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg2_dmc_ver2_07.bin for module i915
gumanzoy
Posts: 93
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 14 times
Been thanked: 18 times
Contact:

Re: Bookworm Build script

Post by gumanzoy »

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: Bookworm Build script

Post by fredx181 »

dcung wrote: Fri Oct 25, 2024 6:51 am
fredx181 wrote: Thu Oct 24, 2024 5:11 pm

- In some case(s) the ethernet driver tg3 was not detected properly, should be fixed now

I don't usually create initrd.img. Apart that I don't use it (yet), I also saw these warnings when I create build with initrd.img.
I thought I try building one with initrd.img - here are the warnings, which I have not resolved yet. I need to figure out what firmware to include I guess.

Code: Select all

[0;36mGenerate initrd.img . . .[0m
W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
....

Note that the latest change is about the kernel module tg3, not firmware.
The tg3 and i915 firmware are in package firmware-misc-nonfree, but I think they are not needed in many cases.

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

Re: Bookworm Build script

Post by gumanzoy »

gumanzoy wrote: Sat Oct 19, 2024 5:26 pm

network modules don't need to modprobe in initrd except for PXE booting.

fredx181 wrote: Fri May 26, 2023 6:20 pm

Reverted back now the changes (so no modprobe i915) from the initrd1.xz . So... as if nothing happened :mrgreen: , same as it was 2 days ago.
For a part it was nice time spending ;)

i915 firmware needed for corresponding hardware (some Intel GPUs, for example skl_huc*.bin for Skylake).
But i don't know why mkinitramfs wants to add and modprobe i915 module.
Better to not do it at initrd stage.

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

dcung
Posts: 471
Joined: Fri Sep 25, 2020 4:31 am
Has thanked: 57 times
Been thanked: 68 times

Re: Bookworm Build script

Post by dcung »

@fredx181 @gumanzoy
I added firmware-misc-nonfree, test build one with initrd.img. The warnings went away. Thanks.

gumanzoy wrote: Fri Oct 25, 2024 7:39 am

But i don't know why mkinitramfs wants to add and modprobe i915 module.
Better to not do it at initrd stage.

So, better to not include firmware-misc-nonfree, and ignore the warnings?

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

Re: Bookworm Build script

Post by gumanzoy »

dcung wrote: Fri Oct 25, 2024 7:45 am

So, better to not include firmware-misc-nonfree, and ignore the warnings?

If you have such hardware you need firmware-misc-nonfree, if not have hardware - not need.

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

dancytron
Posts: 722
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 520 times
Been thanked: 217 times

Re: Bookworm Build script

Post by dancytron »

gumanzoy wrote: Fri Oct 25, 2024 7:51 am
dcung wrote: Fri Oct 25, 2024 7:45 am

So, better to not include firmware-misc-nonfree, and ignore the warnings?

If you have such hardware you need firmware-misc-nonfree, if not have hardware - not need.

It's where the drivers for Over the Air TV cards and dongles are, or at least my OTA TV dongle.

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

Re: Bookworm Build script

Post by gumanzoy »

@fredx181

Hi

I have another suggestions to improve initrd

cr-initrd-gumanzoy-2024.10.28.patch.tar.xz
(11.23 KiB) Downloaded 13 times

/usr/local/cr-initrd/mkinitrd

Code: Select all

-copy_including_deps /$LMK/kernel/fs/nls
+#copy_including_deps /$LMK/kernel/fs/nls
+copy_including_deps /$LMK/kernel/fs/nls/nls_ascii.*
+copy_including_deps /$LMK/kernel/fs/nls/nls_cp437.*
+copy_including_deps /$LMK/kernel/fs/nls/nls_iso8859-1.*
+copy_including_deps /$LMK/kernel/fs/nls/nls_utf8.*

Pick only nls_ modules mentioned in modlist

Code: Select all

-copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram
-copy_including_deps /$LMK/kernel/drivers/block/zram
+#copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram
+#copy_including_deps /$LMK/kernel/drivers/block/zram

Remove zram module, currently it is not used, not have in modlist

Code: Select all

-copy_including_deps /$LMK/kernel/drivers/ata
-copy_including_deps /$LMK/kernel/drivers/nvme
+#copy_including_deps /$LMK/kernel/drivers/ata
+copy_including_deps /$LMK/kernel/drivers/ata/ahci.*
+copy_including_deps /$LMK/kernel/drivers/ata/ata_*.*
+copy_including_deps /$LMK/kernel/drivers/ata/sata_*.*
+copy_including_deps /$LMK/kernel/drivers/nvme/host/nvme.*
 copy_including_deps /$LMK/kernel/drivers/mmc
-copy_including_deps /$LMK/kernel/drivers/md
+copy_including_deps /$LMK/kernel/drivers/md/md-mod.*
 
 copy_including_deps /$LMK/kernel/drivers/pci/controller/vmd.*
 
+#copy_including_deps /$LMK/kernel/drivers/ata/pata_*.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_amd.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_atiixp.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_jmicron.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_marvell.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_mpiix.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_pcmcia.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_sil680.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_sis.*
+copy_including_deps /$LMK/kernel/drivers/ata/pata_pata_via.*

Remove unused modules from kernel/drivers/nvme/ and kernel/drivers/md/ folders.
Pick only selected modules from kernel/drivers/ata/
On modern desktops/laptops only ahci module used. But i include ata_piix and all sata_*.* modules.
Copy only selected pata_ modules for old PATA (IDE) CD/DVD Drives support.

I already do tests. Boot fine from SATA and NVMe SSD. And from QEMU virtual drive used ata_piix module.
I do not test boot from CD/DVD.


/usr/local/cr-initrd/initramfs/linuxrc

Code: Select all

 ## Let's start!
 echo $i"loading kernel modules..."
 
+MODPBLST=`value modprobe.blacklist | sed 's/,/|/g'`
+
+if [ -n "$MODPBLST" ]; then
+    sed -E "s/($MODPBLST) //g" -i modlist
+    MODPBLST=`value modprobe.blacklist | sed 's/,/ /g;s/[_-]/?/g'`
+    for MODULE in $MODPBLST; do
+    find /lib/modules/$(uname -r)/kernel/ -name "$MODULE"'.*' -delete 2>/dev/null
+    done
+fi
+
+if param nocd || [ $IP ]; then
+sed 's/pata_[0-9a-z]\{3,\} //g' -i modlist
+fi
+
 for MODULE in $(cat modlist)
 do
 modprobe $MODULE 2> /dev/null

Support of modprobe.blacklist= kernel boot param. It is need in case of hardware problems.
For example modprobe.blacklist=radeon,amdgpu prevent to load AMD GPU drivers.
But before linuxrc ignore it and modprobe modules from modlist anyway.
Now it accept modprobe.blacklist=ahci,nvme It is need when operate with failure NVMe/SATA SSD/HDD. To prevent linuxrc to mount partitions from it.
After linuxrc finished - modules can be modprobed.

pata_ modules nowadays primary need only for old PATA (IDE) CD/DVD Drives support.
Disable loading it: if used boot param nocd or in case of PXE network boot.

Code: Select all

 # ln -sf /mnt/live/mnt/$x /union/mnt/$x
 #done
 
+for MODULE in `sed 's/ /\n/g' modlist | grep ata_`
+do modprobe -r $MODULE 2>/dev/null
+done
+
 #cp -r /etc/porteus /union/etc 2>/dev/null
 umount -n /lib/modules 2>/dev/null

Unload unused ata_* sata_* pata_* modules.
I already do tests. Boot fine from SATA SSD (used ahci module). And from QEMU virtual drive used ata_piix module.


/usr/local/cr-initrd/initramfs/modlist

I found lack of space between zstd_decompress pata_acpi. Have same in previous version upgrade-kernel_1.15.0_all.deb

I remove libata nvme_core - not need in modlist - loaded fine as dependencies.

I remove grace lockd nfs nfsv3 nfsv4 sunrpc it is need only for nfs and used in case of PXE network boot.
I do test PXE boot. It is loaded fine, not need in modlist

Remove other unneeded in initrd drm drm_kms_helper kms_helper kvm soundcore thermal pdc_adma pppox
pdc_adma i think not need in initrd: This option enables support for Pacific Digital ADMA controllers. If unsure, say N.

These modules currently not copied to initrd by mkinitrd. I remove it from modlist.
drm and kms modules not needed and not have in initrd.
kvm module not have and not need in initrd.
pppox for PPPoE over Ethernet support not have and not need in initrd.
soundcore module not have and not need in initrd.
thermal in current bookworm kernel compiled in, not as a module. And anyway i think not need in initrd.

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: Bookworm Build script

Post by fredx181 »

Thanks @gumanzoy !
I will add the changes within the next days, just one thing:
About zram, wouldn't it be better to add zram to the modlist and copy it too from mkinitrd ?
But frankly I don't know if it's required for when a user wants to make use of zram.
edit: similar about nfs, isn't it better to keep ?

dancytron
Posts: 722
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 520 times
Been thanked: 217 times

Re: Bookworm Build script

Post by dancytron »

fredx181 wrote: Mon Oct 28, 2024 3:29 pm

Thanks @gumanzoy !
I will add the changes within the next days, just one thing:
About zram, wouldn't it be better to add zram to the modlist and copy it too from mkinitrd ?
But frankly I don't know if it's required for when a user wants to make use of zram.
edit: similar about nfs, isn't it better to keep ?

Unless something has changed, you can load zram with a simple script. I don't have anything with less than 4 GB of RAM, so I don't use it anymore.

https://www.forum.puppylinux.com/viewto ... d1c#p78549

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

Re: Bookworm Build script

Post by gumanzoy »

fredx181 wrote: Mon Oct 28, 2024 3:29 pm

About zram, wouldn't it be better to add zram to the modlist and copy it too from mkinitrd ?
But frankly I don't know if it's required for when a user wants to make use of zram.

I never try it. In standard Debian use zswap by default.
zswap requires swap partition or file.

zram not require swap file or partition. It use % of RAM instead.
Needs additional service running https://wiki.debian.org/ZRam
I think if someone want to use it. It can be started as normal service. Not need to inject it to initrd.

fredx181 wrote: Mon Oct 28, 2024 3:29 pm

edit: similar about nfs, isn't it better to keep ?

nfs need only for PXE network boot. In case of PXE boot - it is modprobed.
I don't remove modules. But remove it from modlist.

gumanzoy wrote: Mon Oct 28, 2024 8:33 am

I do test PXE boot. It is loaded fine, not need in modlist

For normal use it started automatically when package nfs-common installed.

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: Bookworm Build script

Post by fredx181 »

Proposed Changes by gumanzoy for initrd done:
- upgrade-kernel package upgraded in the deb repository, now v1.17.0 : https://github.com/doglinux/book-worm/r ... .0_all.deb
(contains also /usr/local/cr-initrd/mkinitrd script for to create (from booted system) new initrd1.xz )
(download and install the .deb or: apt update; apt install upgrade-kernel)
- done accordingly in the MakeLive repository (for when making a new mklive-bookworm or mklive-daedalus build): in dog-boot-bookworm-20221013.tar.gz, dog-boot-daedalus-20220711.tar.gz and initrdport-bullseye.tar.gz

Also updated package quick-remaster apt update; apt install quick-remaster:
- Version 1.5.1, bug fixes for when chosen to merge modules and for ISO creation
(the extended live-usb setup from gumanzoy was a good test case (challenge ;) ) , btw, hopefully it works now as expected also in other rare cases, not sure)

Post Reply

Return to “DebianDogs”