Bug#1020396: systemd-boot: kernel installation/initrd update hooks double the initrd like #970213 since #826045

Michael Biebl biebl at debian.org
Wed Sep 28 16:17:31 BST 2022


Control: tags -1 + pending

Supposed to be fixed by
https://salsa.debian.org/systemd-team/systemd/-/merge_requests/170

So marking as pending

Michael

On Wed, 21 Sep 2022 03:25:48 +0200 =?utf-8?B?0L3QsNCx?= 
<nabijaczleweli at nabijaczleweli.xyz> wrote:
> Package: systemd-boot
> Version: 251.4-3
> Severity: normal
> Tags: patch
> 
> Dear Maintainer,
> 
> In the default installation, both a bare initrd and a versioned one are
> installed:
>   /boot/efi/HASH/5.16.0-1-amd64/initrd.img-5.16.0-1-amd64
>   /boot/efi/HASH/5.16.0-1-amd64/linux
>   /boot/efi/HASH/5.16.0-1-amd64/initrd
> 
> In #970213, I worked around this by only installing the generated
> as the standard "initrd" fallback if none was passed;
> I've been using a simple 
>   #!/bin/sh
>   bootctl is-installed > /dev/null || exit 0
>   exec kernel-install add "$1" "/boot/vmlinuz-$1" "/boot/initrd.img-$1"
> /etc/kernel/postinst.d/kernel-install (and analogous remove),
> so this works for that case perfectly.
> 
> In #826045, upstream hooks were added:
>   debian/extra/kernel/post{inst,rm}.d/systemd-boot
>   (74127387dacf23f037f3a55a808951fae93024c6)
> and
>   debian/extra/initramfs/post-update.d/systemd-boot
>   (9a6d87f1c6f7fbde8ff8e7beab30973944221244)
> to integrate with bootctl out-of-box. This is great!
> 
> However, /etc/kernel/postinst.d/systemd-boot runs:
>   kernel-install add "$1" "$2"
> and /etc/initramfs/post-update.d/systemd-boot runs:
>   kernel-install add "$1" "/boot/vmlinuz-$1" "$2"
> 
> And the former installs:
>   /boot/efi/HASH/5.16.0-1-amd64/linux
>   /boot/efi/HASH/5.16.0-1-amd64/initrd
> but the latter installs:
>   /boot/efi/HASH/5.16.0-1-amd64/initrd.img-5.16.0-1-amd64
>   /boot/efi/HASH/5.16.0-1-amd64/linux
> hence the situation at the top I wanted to avoid in #970213;
> ESPs tend to be really small!
> 
> I've opened MR 169 on Salsa:
>   https://salsa.debian.org/systemd-team/systemd/-/merge_requests/169
> and am attaching a patch for this that makes it so
> /etc/kernel/postinst.d/systemd-boot calls 
>   kernel-install add "$1" "$2" "/boot/initrd.img-$1"
> if the latter exists, and the previous
>   kernel-install add "$1" "$2"
> otherwise, which always installs the versioned initrd,
> as well as one that will order this bootloader hook
> with the other bootloader hooks at the end (cf. message).
> 
> 
> Installation logs that demonstrate this follow.
> 
> Implicit image:
>   root at zoot2:~# kernel-install -v add $(uname -r) /boot/vmlinuz-5.16.0-1-amd64
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220928/afffae5c/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list