I believe the key to the reproducer is having the kdump-tools package installed in the chroot. The kdump-tools package provides a /etc/kernel/postinst.d/kdump-tools script, which has the following snippet:
(Apologies for formatting, the interface removes the leading spaces from this code) 43 if test "${MODULES-most}" = most; then 44 # Switch from "most" to "dep" to reduce the size of the initramfs. 45 # "netboot" and "list" are expected to be already small enough. 46 KDUMP_MODULES=dep 47 fi 48 49 # We need a modified copy of initramfs-tools directory 50 # with MODULES=dep in initramfs.conf 51 if [ ! -d "$kdumpdir" ];then 52 mkdir -p "$kdumpdir" 53 fi 54 # Force re-creation of $kdumpdir/initramfs-tools 55 # in case the source has changed since last time 56 # we ran 57 if [ -d "$kdumpdir/initramfs-tools" ];then 58 rm -Rf $kdumpdir/initramfs-tools 59 fi 60 cp -pr /etc/initramfs-tools "$kdumpdir" 61 62 initramfsdir="$kdumpdir/initramfs-tools" 63 64 if test -n "${KDUMP_MODULES-}" -a "${KDUMP_MODULES-}" != "${MODULES}"; then 65 mkdir -p "$initramfsdir/conf.d" 66 echo "MODULES=${KDUMP_MODULES}" > "$initramfsdir/conf.d/zzz-kdump" 67 fi This changes the initramfs-tools default from "MODULES=most" to "MODULES=dep" before generating the initrd. "MODULES=dep" fails in a chroot because there's no way to map '/' back to the block device that it resides on. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-nvidia in Ubuntu. https://bugs.launchpad.net/bugs/2043059 Title: Installation errors out when installing in a chroot Status in linux-nvidia package in Ubuntu: New Bug description: Processing triggers for linux-image-5.15.0-1040-nvidia (5.15.0-1040.40) ... /etc/kernel/postinst.d/dkms: * dkms: running auto installation service for kernel 5.15.0-1040-nvidia ...done. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.15.0-1040-nvidia cryptsetup: WARNING: Couldn't determine root device W: Couldn't identify type of root file system for fsck hook cp: cannot stat '/etc/iscsi/initiatorname.iscsi': No such file or directory /etc/kernel/postinst.d/kdump-tools: kdump-tools: Generating /var/lib/kdump/initrd.img-5.15.0-1040-nvidia mkinitramfs: failed to determine device for / mkinitramfs: workaround is MODULES=most, check: grep -r MODULES /var/lib/kdump/initramfs-tools Error please report bug on initramfs-tools Include the output of 'mount' and 'cat /proc/mounts' update-initramfs: failed for /var/lib/kdump/initrd.img-5.15.0-1040-nvidia with 1. run-parts: /etc/kernel/postinst.d/kdump-tools exited with return code 1 dpkg: error processing package linux-image-5.15.0-1040-nvidia (--configure): installed linux-image-5.15.0-1040-nvidia package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: linux-image-5.15.0-1040-nvidia E: Sub-process /usr/bin/dpkg returned an error code (1) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2043059/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp