Public bug reported: When installing a kernel package and a package with a trigger for update-initramfs in one go, the update of the initramfs is skipped in some cases.
In a clean chroot, populated with debootstrap for "trixie", run ``` apt install linux-image-amd64 plymouth-theme-mobian ``` Result: ``` [...] Setting up linux-image-6.12.32-amd64 (6.12.32-1) ... I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.32-amd64 I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.32-amd64 I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.32-amd64 I: /initrd.img is now a symlink to boot/initrd.img-6.12.32-amd64 /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-6.12.32-amd64 Setting up linux-image-amd64 (6.12.32-1) ... Setting up plymouth-theme-mobian (1.1) ... update-alternatives: using /usr/share/plymouth/themes/mobian/mobian.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode Processing triggers for libc-bin (2.41-8) ... Processing triggers for initramfs-tools (0.148.2) ... update-initramfs: /boot/initrd.img-6.12.32-amd64 has already been updated since Mon Jun 23 06:07:09 2025. ``` The initramfs is updated after setup of the kernel package. It is NOT updated again after setup of package plymouth-theme-mobian, which is wrong. The files that are installed by package plymouth-theme-mobian are missing in the initramfs (and the plymouth splash screen will not work). This is what happens here: 1. Another package is installed that calls "update-initramfs -u". This activates the trigger, and we store a timestamp for it. 2. linux-image-6.12.32-amd64 is installed. This calls the initramfs-tools hook which synchronously builds the initramfs. 3. plymouth-theme-mobian is installed. This activates the trigger through a triggers control file. 4. The trigger runs and passes the timestamp from (1) through to update-initramfs. update-initramfs sees the current image is newer than that, and skips the update. We correctly handle the case where the trigger is only activated through `update-initramfs -u`, or only through a triggers control file or direct invocation of dpkg-trigger. But when both methods are used, this bug is possible because a timestmap file is present and it is wrong. So revert the optimised trigger handling until dpkg itself records timestamps for trigger activation (see https://bugs.debian.org/1099136). ** Affects: dracut (Ubuntu) Importance: Undecided Status: New ** Affects: initramfs-tools (Ubuntu) Importance: High Status: Triaged ** Affects: initramfs-tools (Debian) Importance: Unknown Status: Unknown ** Bug watch added: Debian Bug tracker #1108204 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108204 ** Also affects: initramfs-tools (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108204 Importance: Unknown Status: Unknown ** Also affects: dracut (Ubuntu) Importance: Undecided Status: New ** Description changed: - This reverts commit 7f2ed354cc8f966de444b8c278c208ea4e13ef75. - When installing a kernel package and a package with a trigger for update-initramfs in one go, the update of the initramfs is skipped in some cases. In a clean chroot, populated with debootstrap for "trixie", run ``` apt install linux-image-amd64 plymouth-theme-mobian ``` Result: ``` [...] Setting up linux-image-6.12.32-amd64 (6.12.32-1) ... I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.32-amd64 I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.32-amd64 I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.32-amd64 I: /initrd.img is now a symlink to boot/initrd.img-6.12.32-amd64 /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-6.12.32-amd64 Setting up linux-image-amd64 (6.12.32-1) ... Setting up plymouth-theme-mobian (1.1) ... update-alternatives: using /usr/share/plymouth/themes/mobian/mobian.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode Processing triggers for libc-bin (2.41-8) ... Processing triggers for initramfs-tools (0.148.2) ... update-initramfs: /boot/initrd.img-6.12.32-amd64 has already been updated since Mon Jun 23 06:07:09 2025. ``` The initramfs is updated after setup of the kernel package. It is NOT updated again after setup of package plymouth-theme-mobian, which is wrong. The files that are installed by package plymouth-theme-mobian are missing in the initramfs (and the plymouth splash screen will not work). This is what happens here: 1. Another package is installed that calls "update-initramfs -u". This - activates the trigger, and we store a timestamp for it. + activates the trigger, and we store a timestamp for it. 2. linux-image-6.12.32-amd64 is installed. This calls the - initramfs-tools hook which synchronously builds the initramfs. + initramfs-tools hook which synchronously builds the initramfs. 3. plymouth-theme-mobian is installed. This activates the trigger - through a triggers control file. + through a triggers control file. 4. The trigger runs and passes the timestamp from (1) through to - update-initramfs. update-initramfs sees the current image is newer - than that, and skips the update. + update-initramfs. update-initramfs sees the current image is newer + than that, and skips the update. We correctly handle the case where the trigger is only activated through `update-initramfs -u`, or only through a triggers control file or direct invocation of dpkg-trigger. But when both methods are used, this bug is possible because a timestmap file is present and it is wrong. So revert the optimised trigger handling until dpkg itself records timestamps for trigger activation (see bug #1099136). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2115490 Title: update-initramfs trigger does not update the initramfs in some cases To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/2115490/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
