Bug#1117563: systemd: /usr/lib/kernel/install.d/55-initrd.install ignores existing initrds
Benjamin Drung
bdrung at ubuntu.com
Tue Oct 7 22:23:58 BST 2025
Package: systemd
Version: 258-1
Severity: normal
X-Debbugs-Cc: bdrung at debian.org
Dear Maintainer,
The Dracut 12-uefi and 43-kernel-install test cases fail. dracut-core
ships /usr/lib/kernel/install.d/50-dracut.install which generates an
initrd in KERNEL_INSTALL_STAGING_AREA.
/usr/lib/kernel/install.d/55-initrd.install (coming from
debian/extra/kernel-install.d/55-initrd.install) then links to the
initrd in /boot. This results in two initrd being included in the UKI
and the content of later one overwrites the former one.
Please modify debian/extra/kernel-install.d/55-initrd.install to check
for the presence of an initrd in KERNEL_INSTALL_STAGING_AREA before
linking to the initrd in /boot.
For debugging I created /usr/lib/kernel/install.d/57-debug.install with
following content:
```
#!/bin/sh
echo "==================================================================="
echo KERNEL_INSTALL_STAGING_AREA:
ls -lh "$KERNEL_INSTALL_STAGING_AREA"
echo "===================================================================="
```
Then the `kernel-install add -v "$KVERSION" "$KIMAGE"` call contained this
log output:
```
KERNEL_INSTALL_STAGING_AREA:
-rw------- 1 root root 25M Oct 7 15:18 initrd
lrwxrwxrwx 1 root root 35 Oct 7 15:18 initrd.img-6.16.9+deb14-amd64 -> /boot/initrd.img-6.16.9+deb14-amd64
```
--
Benjamin Drung
Debian & Ubuntu Developer
More information about the Pkg-systemd-maintainers
mailing list