Programs need to be able to cause initramfs to be built without the need for the kernel package initiating it.


From time to time, various packages are updated which affect the initramfs build process (initramfs-tools, usplash, etc.). These changes currently have no effect until the user either upgrades their kernel or manually runs mkinitramfs or equivalent from the command line.

We want these changes to propagate immediately, because they often incorporate bugfixes, and it is better to make the changes up front than to have them happen later unexpectedly during a kernel upgrade (such as a security update).

This process should also notify the user that they need to reboot.

Use cases


update-initramfs already exists, and should be called by packages.


Packages that need this should do the following:

MattZimmerman: shouldn't this be a versioned dependency?

The change for the kernel-package needs to show up in a linux-image during an ABI bump.


initramfs-tools already contains the update-initramfs script.

MattZimmerman: I'm concerned about the relative complexity of this script. It's hundreds of lines of shell, and relies on sorting versions to infer the "current" kernel in use. I suggest using the default kernel and initrd symlinks where available, and exiting with a warning if the user has disabled them for whatever reason.

JeffBailey: The sorting code is only used if there's no linked in version. (See the update function). The shell code that's used for sorting was taken directly from the update-grub script to ensure that in the absence of symlinks, the same kernel would get chosen. Perhaps the right thing to do is to refactor that out to a common script?

Packages needing this tool need to be identified. Currently only usplash needs this. New packages will need to make use of the script aswell.

kernel-package needs its postinst/postrm scripts for kernel-images updated to use the described invocation of update-initramfs.


InitramfsUpdates (last edited 2008-08-06 16:31:32 by localhost)