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


Groups > linux.debian.kernel > #81766 > unrolled thread

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

Started byMichael Tokarev <mjt@tls.msk.ru>
First post2024-02-05 16:00 +0100
Last post2024-12-16 14:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  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
    Bug#1063162: please omit single initrd.img generation if dpkg trigger for all is pending Johannes Schauer Marin Rodrigues <josch@debian.org> - 2024-12-16 14:10 +0100

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

FromMichael Tokarev <mjt@tls.msk.ru>
Date2024-02-05 16:00 +0100
SubjectBug#1063162: please omit single initrd.img generation if dpkg trigger for all is pending
Message-ID<I48BY-84QW-15@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#84842

FromJohannes Schauer Marin Rodrigues <josch@debian.org>
Date2024-12-16 14:10 +0100
Message-ID<JUj1f-hxNs-1@gated-at.bofh.it>
In reply to#81766

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Mon, 05 Feb 2024 17:49:06 +0300 Michael Tokarev <mjt@tls.msk.ru> wrote:
> 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.

a duplicate of this bug seems to have been filed as #1079509 but it comes with
a patch which was submitted as a merge request on salsa:

https://salsa.debian.org/kernel-team/initramfs-tools/-/merge_requests/137

More discussion can be found there.

Thanks!

cheers, josch

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web