Article View: linux.debian.kernel
Article #927Bug#1156202: dracut: "dracut -f" with systemd-boot updates an initrd the loader entry doesn't use
From: David Härdeman
Date: Wed, 02 Dec 2026 22:10
Date: Wed, 02 Dec 2026 22:10
60 lines
4136 bytes
4136 bytes
Package: dracut
Version: 113-5
Severity: normal
Dear Maintainer,
On a system using systemd-boot with a BLS layout on the ESP
(/boot/efi/loader/entries and /boot/efi/<machine-id>/ exist), a plain
"dracut -f" succeeds but the rebuilt initrd is not the one that gets
booted.
With no output file given, dracut.sh picks
/boot/efi/<machine-id>/<kver>/initrd as the output (the BLS branch of
the default outfile logic). Since 109-3 dropped
debian-initramfs-post-update.patch (#1091455), dracut itself no longer
runs /etc/initramfs/post-update.d/, so kernel-install isn't invoked and
the loader entry isn't updated.
However, the loader entry written by systemd-boot's post-update hook
(invoked via update-initramfs) references the initrd by the basename of
the file passed to it, i.e.:
initrd /<machine-id>/<kver>/initrd.img-<kver>
So after "dracut -f", the ESP entry directory contains:
initrd <- just rebuilt by "dracut -f", not referenced
initrd.img-<kver> <- referenced by the loader entry, unchanged
linux
and the next boot uses the old initrd without any warning.
"update-initramfs -u" works correctly (builds /boot/initrd.img-<kver>
and the hook copies it into the ESP entry directory).
Reproduced in a VM with dracut 113-5 and systemd-boot 257.13-1~deb13u1:
1. install systemd-boot and dracut, run "bootctl install" so that the
BLS layout exists under /boot/efi
2. run "update-initramfs -u" (the loader entry now points at
initrd.img-<kver>)
3. run "dracut -f"
4. compare mtimes of /boot/efi/<machine-id>/<kver>/initrd and
.../initrd.img-<kver>, and the "initrd" line of
/boot/efi/loader/entries/<machine-id>-<kver>.conf
Before 109-3, step 3 instead failed loudly (#1109832), because the
post-update hook passed the BLS initrd path to kernel-install, which
then tried to copy the file onto itself.
I'm not sure what the best fix is. Possibilities that come to mind:
- default the output of a plain "dracut" to /boot/initrd.img-<kver> on
Debian, matching update-initramfs, or
- have a plain "dracut" (when no output file is given) still run the
post-update hooks, but with /boot/initrd.img-<kver> as the output, or
- at least warn when writing into a BLS entry directory whose loader
entry references a different initrd.
--
David Härdeman
Technical Details
Message-ID:
<O60Gt-fCyE-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: David Härdeman <david@hardeman.nu> Newsgroups: linux.debian.bugs.dist,linux.debian.kernel Subject: Bug#1156202: dracut: "dracut -f" with systemd-boot updates an initrd the loader entry doesn't use Date: Wed, 02 Dec 2026 23:10:01 +0100 Message-ID: <O60Gt-fCyE-1@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Dec 2 22:07:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: David Härdeman <david@hardeman.nu>, 1156202@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-kernel@lists.debian.org X-Debian-Pr-Message: report 1156202 X-Debian-Pr-Package: dracut X-Debian-Pr-Source: dracut MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Greylist: delayed 379 seconds by postgrey-1.37 at buxtehude; Wed, 02 Dec 2026 22:05:31 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006632 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 60 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 2 Dec 2026 22:59:09 +0100 X-Original-Message-ID: <axCUra7vuyMxv5df@hardeman.nu>