Bug#1038886: /usr/share/initramfs-tools/hooks/udev fails in chroot

Patrick Schleizer adrelanos at whonix.org
Thu Jun 22 15:56:00 BST 2023


Package: udev
Severity: important

Dear maintainer,

there's an issue in file /usr/share/initramfs-tools/hooks/udev

During installation inside chroot:

> update-initramfs: Generating /boot/initrd.img-6.1.0-9-amd64
> W: No zstd in /usr/bin:/sbin:/bin, using gzip
> E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
> update-initramfs: failed for /boot/initrd.img-6.1.0-9-amd64 with 1.
> run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
> dpkg: error processing package linux-image-6.1.0-9-amd64 (--configure):
>  installed linux-image-6.1.0-9-amd64 package post-installation script subprocess returned error exit status 1
> dpkg: dependency problems prevent configuration of linux-image-amd64:
>  linux-image-amd64 depends on linux-image-6.1.0-9-amd64 (= 6.1.27-1); however:
>   Package linux-image-6.1.0-9-amd64 is not configured yet.
> 
> dpkg: error processing package linux-image-amd64 (--configure):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  linux-image-6.1.0-9-amd64
>  linux-image-amd64

To debug this I added below the shebang in file 
/usr/share/initramfs-tools/hooks/udev:

set -x
exec > /tmp/output.txt 2>&1

here is the xtrace:

+ PREREQS=
+ . /usr/share/initramfs-tools/hook-functions
+ mkdir -p /var/tmp/mkinitramfs_SuU9Vv/lib/systemd
+ copy_exec /lib/systemd/systemd-udevd /lib/systemd
+ local src target x nonoptlib ret
+ src=/lib/systemd/systemd-udevd
+ target=/lib/systemd
+ copy_file binary /lib/systemd/systemd-udevd /lib/systemd
+ local type src target link_target
+ type=binary
+ src=/lib/systemd/systemd-udevd
+ target=/lib/systemd
+ [ -f /lib/systemd/systemd-udevd ]
+ return 2
+ return 1

ls -la /lib/systemd/systemd-udevd
lrwxrwxrwx 1 root root 12 Feb 28 11:15 /lib/systemd/systemd-udevd -> 
/bin/udevadm

ls -la /bin/udevadm
ls: cannot access '/bin/udevadm': No such file or directory

Package udev was installed but /bin/udevadm didn't exist. How can that 
happen?

A workaround (which might be a bad idea):
touch /bin/udevadm
chmod +x /bin/udevadm

This is happening since Debian bookworm. Did not happen on Debian bullseye.

Kind regards,
Patrick



More information about the Pkg-systemd-maintainers mailing list