Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1185113

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

From Michael Tokarev <mjt@tls.msk.ru>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1063162: please omit single initrd.img generation if dpkg trigger for all is pending
Date 2024-02-05 16:00 +0100
Message-ID <I48BY-84QW-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


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

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1063162: please omit single initrd.img generation if dpkg trigger for all is pending Michael Tokarev <mjt@tls.msk.ru> - 2024-02-05 16:00 +0100

csiph-web