hey Sam,
I looked into ways to try to teach the chroot detection tools how to
detect a chroot in a new pid namespace (which is actually the problem,
not the mount namespace), but I didn't find a good solution there.
However, it occurs to me that you can simply override the answer:
ln -sf ../../bin/true ${SW_IMG}/usr/local/bin/ischroot
echo 'DPkg::Path "/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";' >
/etc/apt/apt.conf.d/99-usr-local-dpkg-path
unshare -p -u -f --mount-proc="${SW_IMG}/proc" chroot "${SW_IMG}"
"${CHROOT_SCRIPT}"
EXIT_CODE=$?
rm ${SW_IMG}/etc/apt/apt.conf.d/99-usr-local-dpkg-path
rm ${SW_IMG}/usr/local/bin/ischroot
That would have the added benefit of solving the problem for
other/future packages as well.
If we were to update kdump-tools to detect a chroot as described in
comment #7 (test build in
https://launchpad.net/~dannf/+archive/ubuntu/lp2043059 ), could you
update your script to do the above?
--
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 kdump-tools package in Ubuntu:
Triaged
Status in linux-nvidia package in Ubuntu:
Invalid
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/kdump-tools/+bug/2043059/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp