#1138644 dracut: Move postinst.d and postrm.d into /usr/lib

#1138644#5
Date:
2026-06-01 17:49:09 UTC
From:
To:
Dear maintainer,

somewhat related to 1095646, I propose to move the scripts in
kernel/postinst.d and kernel/postrm.d to /usr/lib. From trixie onwards,
the kernel packages don't call run-parts directly anymore, but
linux-run-hooks, which also supports placing hooks in /usr/lib/kernel.

This would allow people who want to use kernel-install to generate a
fresh initrd to disable the postinst.d hook in /etc/kernel without
affecting other users.

If this is not done in an environment using kernel-install, currently
/usr/lib/kernel/install.d/55-initrd.install will copy the generated
initrd into the staging directory where something like ukify would pick
it up and multiple initrds would end up in the final UKI (that's not a
problem with dracut per se, but it's a good example why you would want
to disable the postinst.d hook).

Best,
Cornelius Hoffmann