[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1063162: please omit single initrd.img generation if dpkg trigger for all is pending



Source: initramfs-tools
Severity: minor

Currently, when installing other packages together with a new kernel,
initramfs image for the new kernel is generated two times: once it is
kernel-activated from /etc/kernel/postinst.d/initramfs-tools, and next
it is dpkg-trigger-activated by updating certain paths (eg installing
or upgrading busybox, mdadm, etc, which triggers initramfs rebuilds).

This is especially annoying when building images for virtual machines
(like debvm-create etc), - there, initramfs is especially slow (it is
already very slow as it is, but makes several times slower when run
in emulated environment).  The whole thing needs to be generated only
once, dpkg trigger should be enough, but it is actually generated
twice.

For that I suggest to check in /etc/kernel/postinst.d/initramfs-tools
if dpkg trigger for it is pending already, and if yes, do not generate
the whole thing but create just a stub, an empty /boot/initrd.img-$kver,
to be updated later when dpkg trigger is fired.

That will save a lot of time in various situations, including regular
user machines where initrd is often regenerated multiple times during
upgrades.

Thanks,

/mjt


Reply to: