Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

246 views
Skip to first unread message

Patrick Schleizer

unread,
Jun 22, 2023, 11:10:04 AM6/22/23
to
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

Ansgar

unread,
Jun 22, 2023, 11:30:04 AM6/22/23
to
On Thu, 2023-06-22 at 14:56 +0000, Patrick Schleizer wrote:
> 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

What is the output of

ls -ld /bin /bin/udevadm /usr/bin/udevadm

?

How did you create the chroot?

Ansgar

Patrick Schleizer

unread,
Jun 22, 2023, 11:40:04 AM6/22/23
to
Dear maintainer,

this was my mistake. (A build script had a workaround leftover for a bug
that was now fixed in bookworm.) Not a bug in udev.

Sorry for the noise!

Please close.

Thank you!

Kind regards,
Patrick
0 new messages