Ubuntu mainline 7.1.x linux-image postinst trigger regression skips /etc/kernel/postinst.d
Robert Hardy
rhardy at webcon.ca
Sat Jul 4 16:03:52 UTC 2026
Ubuntu mainline kernel packages 7.1.x appear to have a generated
linux-image postinst regression.
Issue with reproducer and diff:
https://github.com/bkw777/mainline/issues/374
This is not a mainline installer GUI problem and not a DKMS/NVIDIA build
failure. The generated linux-image-unsigned postinst script for 7.1.x
changed the trigger generation logic.
Known-good 7.0.13 postinst writes one trigger file containing:
run-parts ... /etc/kernel/postinst.d /usr/share/kernel/postinst.d
Broken 7.1.x postinst loops over both directories but writes to the same
trigger file inside the loop:
for d in /etc/kernel/postinst.d /usr/share/kernel/postinst.d; do
cat - >/usr/lib/linux/triggers/$version <<EOF
...
run-parts ... $d
EOF
dpkg-trigger --no-await linux-update-$version
done
Because /usr/share/kernel/postinst.d is processed after
/etc/kernel/postinst.d, the second write overwrites the first trigger
body. The dpkg trigger then runs only /usr/share/kernel/postinst.d and
skips /etc/kernel/postinst.d entirely.
That skips the normal hooks that create initramfs and run
DKMS/update-grub on affected systems. Result: kernel installs without
errors but no initrd is generated until update-initramfs is run manually.
The packaging fix should be to collect the existing hook directories
first and write exactly one trigger file containing one run-parts
invocation over the full directory list, rather than writing
/usr/lib/linux/triggers/$version repeatedly inside the loop.
Regards,
Rob
--
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems Owner, IT and Security Architect
rhardy at webcon.ca GPG Key available (613) 276-7327
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260704/9a7cc324/attachment.html>
More information about the kernel-team
mailing list