I seem to be having a bizarre problem installing a new custom kernel. update-initramfs
fails during dpkg -i
with:
update-initramfs: Generating /boot/initrd.img-5.15.7-hardened1-test1find: ‘/tmp/user/0/mkinitramfs_gHxWMQ/lib/modules/5.15.7-hardened1-test1/kernel’: No such file or directoryGenerating grub configuration file ...Found linux image: /boot/vmlinuz-5.15.7-hardened1-r7Found initrd image: /boot/initrd.img-5.15.7-hardened1-r7Found linux image: /boot/vmlinuz-5.15.7-hardened1-test1Found initrd image: /boot/initrd.img-5.15.7-hardened1-test1Found linux image: /boot/vmlinuz-5.10.0-10-amd64Found initrd image: /boot/initrd.img-5.10.0-10-amd64done
The r7
kernel builds and installs perfectly fine, but the test1
installs with a find: ‘/tmp/user/0/mkinitramfs_gHxWMQ/lib/modules/5.15.7-hardened1-test1/kernel’: No such file or directory
error. The only difference between the .configs is:
29c29< CONFIG_LOCALVERSION="-r7"---> CONFIG_LOCALVERSION="-test1"39c39< CONFIG_KERNEL_GZIP=y---> # CONFIG_KERNEL_GZIP is not set45c45< # CONFIG_KERNEL_ZSTD is not set---> CONFIG_KERNEL_ZSTD=y787c787< # CONFIG_MODULE_FORCE_UNLOAD is not set---> CONFIG_MODULE_FORCE_UNLOAD=y802,803c802,803< CONFIG_MODULE_COMPRESS_XZ=y< # CONFIG_MODULE_COMPRESS_ZSTD is not set---> # CONFIG_MODULE_COMPRESS_XZ is not set> CONFIG_MODULE_COMPRESS_ZSTD=y
I even tried a slightly newer kernel (5.15.27) and older (5.10.104) with the same results. Trying to boot into the kernel drops the boot to a initramfs
prompt (without USB keyboard functionality) after failing to find the root LVM.
The initrd images also have very different sizes for the minimal changes made:
9.7M initrd.img-5.15.7-hardened1-r7 (working)9.1M initrd.img-5.15.7-hardened1-test1 (broke)
Doing a diff between the two with lsinitrd
produces this, suggesting that the initrd does indeed lack a huge number of modules.
346,399c346< 5.15.7-hardened1-r7< kernel< crypto< async_tx< async_memcpy.ko.xz< async_pq.ko.xz< async_raid6_recov.ko.xz< async_tx.ko.xz< async_xor.ko.xz< xor.ko.xz< drivers< ata< ahci.ko.xz< libahci.ko.xz< hid< hid-generic.ko.xz< hid.ko.xz< usbhid< usbhid.ko.xz< usbkbd.ko.xz< input< keyboard< atkbd.ko.xz< mouse< psmouse.ko.xz< serio< serio_raw.ko.xz< md< dm-bufio.ko.xz< dm-crypt.ko.xz< dm-log.ko.xz< dm-mirror.ko.xz< dm-raid.ko.xz< dm-region-hash.ko.xz< dm-snapshot.ko.xz< linear.ko.xz< multipath.ko.xz< raid0.ko.xz< raid10.ko.xz< raid1.ko.xz< raid456.ko.xz< vfio< pci< vfio-pci-core.ko.xz< vfio-pci.ko.xz< vfio_iommu_type1.ko.xz< vfio.ko.xz< vfio_virqfd.ko.xz< lib< raid6< raid6_pq.ko.xz< virt< lib< irqbypass.ko.xz---> 5.15.7-hardened1-test1
Anyone seen this before? I found one results through google but a solution was never provided.
I'm running Devuan Chimaera (Debian 11 base) with: initramfs-tools=0.140 & dpkg=1.20.9