Sample Header Ad - 728x90

Building a Debian install image with a custom kernel using a Debian Live Build

1 vote
0 answers
873 views
I am trying to create a debian install image using a live-build tool. But during installation, the custom kernel I added is not used. I am trying to create a debian install image using a debian live build. My configuration looks like this:
lb config --distribution bullseye --debian-installer netinst --debian-installer-distribution bullseye --debian-installer-gui false --architecture amd64 --archive-areas "main contrib non-free" --binary-filesystem ext4 --system normal --linux-packages linux-image-5.10.180
I put kernel deb packages in a folder config/packages.chroot, deb package name with kernel ending with "_amd64". Also I add the following hook to the folder config/hooks/normal:
#!/bin/sh

set +e

apt -y remove linux-image-5.10.0-*

# make initramfs for installed kernels:
update-initramfs -c -k all

ln -s /boot/initrd.img-5.10.180 /boot/initrd.img
ln -s /boot/config-5.10.180 /boot/config
ln -s /boot/System.map-5.10.180 /boot/System.map
ln -s /boot/vmlinuz-5.10.180 /boot/vmlinuz

update-grub

set -e
Then start lb build The custom kernel is added to the live image, but the custom kernel I added is not used during installation. Please tell me what am I doing wrong.
Asked by Kill_Real99 (11 rep)
Aug 10, 2023, 03:35 PM
Last activity: Aug 10, 2023, 03:48 PM