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

Bug#1016538: systemd-boot: Kernel postinst and initramfs post-update hooks copy initrd twice

62 views
Skip to first unread message

Victor Westerhuis

unread,
Aug 2, 2022, 12:30:04 PM8/2/22
to
Package: systemd-boot
Version: 251.3-1
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Both /etc/kernel/postinst.d/systemd-boot and /etc/initramfs/post-update.d/systemd-boot
call kernel-install to add a newly installed kernel. However, the initramfs hook
explicitly passes the initrd filename, leading to the initrd being copied to the EFI
partition twice.


- -- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.18.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_NL.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en_US:en:nl_NL:nl
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd-boot depends on:
ii libc6 2.33-8
ii libsystemd-shared 251.3-1
ii systemd-boot-efi 251.3-1

Versions of packages systemd-boot recommends:
ii efibootmgr 17-1

systemd-boot suggests no packages.

- -- Configuration Files:
/etc/initramfs/post-update.d/systemd-boot changed:
set -eu
test -x /usr/bin/bootctl || exit 0
bootctl is-installed --quiet || exit 0
echo "Updating kernel version $1 in systemd-boot..."
kernel-install add "$1" "/boot/vmlinuz-$1"


- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCAAxFiEE6OxII3T+o0Ujs6ECQz2Rq5dHQPsFAmLpTsUTHHZpY3RvckB3
ZXN0ZXJodS5pcwAKCRBDPZGrl0dA+4rRD/9vPqQdwIpV4qJK7j8COfKFxxwg49es
KryM1dJKp2OymMWZ74UZnZtgXUNSmy+7QwPp1R3qkTJpaP5yEVVGrRtapNMGu8BW
EvkpyCWtNDJFXmLZ8UBwDB1gVX4S6e0tiCd88djqSb3N6XuPxxSToJzSiitIJl2B
/Jt1G7i8LWkRMXcgmmvGZOuWoPvelF4pJ1coqEwNhbPrZHufxMQzBmhp7AH5/h91
km2HRum8Cxhha60uJ3e5tcWvbW+tPbFXHNfBDlm3DlzHLn5CED5+joRqkUXO1EJU
bsexIOX6uEzOcnozK8qiEriBjfCUmEJrCyLppCzvpmOmsNoEhur/tBZ6iWZB49Gs
vx+lY7HWAGK+xD7k9qqeK5vfdP5L7Qq8gcoEXZlADoMgeNCitM8phPISP6/ByvcF
jNsww8O+EOxbVUCG4YhcJu30XN0qSWXJDhOxcwdQr2EImXFoQ5SWnjre3l81fdvG
+NegoRcC/sMNac+JNdwIg3xS8O4frMndNP05McU/SX9tIVOXeyyQ0uHB9xal3tMu
JY9B7IElWYrm8A1udcKGpaC9ySZs8dpCqvvqJLG3ig4HvXwRcirOA5hYBzt5Zxaj
UfvuGnqERRG7zCSaoFv5nRw2u1x7aL2Tt5f0HPw0Msfr336mzUbCzX6quX9q9tVr
wG5wkWMA8oLllw==
=3eOm
-----END PGP SIGNATURE-----

Michael Biebl

unread,
Aug 2, 2022, 3:00:04 PM8/2/22
to
Am 02.08.22 um 18:20 schrieb Victor Westerhuis:
> Package: systemd-boot
> Version: 251.3-1
> Severity: normal
>
> Both /etc/kernel/postinst.d/systemd-boot and /etc/initramfs/post-update.d/systemd-boot
> call kernel-install to add a newly installed kernel. However, the initramfs hook
> explicitly passes the initrd filename, leading to the initrd being copied to the EFI
> partition twice.

Duplicate of #1016538 basically.

Ideas how to fix this welcome.
OpenPGP_signature

Victor Westerhuis

unread,
Aug 2, 2022, 4:10:03 PM8/2/22
to
This bug is #1016538. What bug is this one a duplicate of?

Michael Biebl

unread,
Aug 2, 2022, 6:40:04 PM8/2/22
to
Am 02.08.22 um 21:17 schrieb Victor Westerhuis:
C&P failure, I meant #1014455
OpenPGP_signature

Fouad FAKIH

unread,
Sep 8, 2022, 7:10:04 AM9/8/22
to
#1014455 talks about running the scripts twice.

The initrd copied twice is caused by /etc/initramfs/post-
update.d/systemd-boot which calls kernel-install with initrd optional
parameter.

This leads to having the initrd copied twice :

$kernel/initrd
$kernel/initrd-$version

But systemd entries are correctly configured using the last initrd
copied.

Changing the kernel-install call in /etc/initramfs/post-
update.d/systemd-boot from :

kernel-install add "$1" "/boot/vmlinuz-$1" "$2"

To :

kernel-install add "$1" "/boot/vmlinuz-$1"

Solves the issue for me.
0 new messages