public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "MOESSBAUER, Felix (T CED INW-CN)" <felix.moessbauer@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"Hombourger,
	Cedric (DI SW CAS ES LI)" <cedric.hombourger@siemens.com>
Subject: Re: [PATCH] debianize: handle .triggers and .service files
Date: Thu, 16 Nov 2023 13:38:15 +0100	[thread overview]
Message-ID: <ec304c30-7a68-4c11-a4d6-195ee5cd4205@siemens.com> (raw)
In-Reply-To: <a207db611d38bc83c42cb5b9e2cf33b325823598.camel@siemens.com>

On 15.11.23 09:43, MOESSBAUER, Felix (T CED INW-CN) wrote:
> On Wed, 2023-11-15 at 09:36 +0100, Jan Kiszka wrote:
>> On 14.11.23 21:22, 'MOESSBAUER, Felix' via isar-users wrote:
>>> On Tue, 2023-11-14 at 20:54 +0100, 'Cedric Hombourger' via isar-
>>> users
>>> wrote:
>>>> Some packages need to update/rebuild the initramfs and this is
>>>> particularly
>>>> slow on Debian systems (which are not using more modern
>>>> technologies
>>>> such
>>>> as dracut or mkosi). Instead of having each package call update-
>>>> initramfs,
>>>> use a trigger instead to have dpkg defer that call to the very
>>>> end of
>>>> the
>>>> transaction. Many packages also failed to rebuild the initramfs
>>>> when
>>>> the
>>>> package gets removed. Demonstrate use with initramfs-fsck-hook-
>>>> ext4.
>>>
>>> Hi Cedric,
>>>
>>> thanks for bringing this up. Especially on non x86 builds the
>>> update-
>>> initramfs can take really long due to the emulation.
>>>
>>> I also played around with disabling the initrd update during image
>>> building of images with a custom initramfs (where the one from the
>>> rootfs is anyways not used). However the issue is, that the config
>>> change needs to be made in /etc/initramfs-tools/update-
>>> initramfs.conf,
>>> which is shipped by initramfs-tools (no conf.d style supported). By
>>> that, we would need to add this package to the default set of
>>> packages
>>> which I also dislike.
>>>
>>> What I don't understand is how the initrd trigger should help. The
>>> /usr/sbin/update-initramfs internally already detects the
>>> invocation
>>> via dpkg and dispatches to the trigger, so manually adding this is
>>> nice
>>> syntax wise, but does not make a difference in performance.
>>>
>>> Ideally, we don't update the initrd at all during package install,
>>> but
>>> just generate it at do_rootfs_postprocess.
>>>
>>
>> There is actually an issue already in Debian itself which I started
>> to
>> examine during Debconf but was distracted: If you install a minimal
>> rootfs with kernel, that will already run the initramfs generation
>> twice, although it should do it once only. That said, anything on top
>> may be related to missing proper usage of triggers.
> 
> Ok... can you provide a link to the issue?

Nope, not yet reported. But you can just take a debian:bookworm-slim 
container and install linux-image-amd64:

...
Setting up initramfs-tools-core (0.142) ...
Setting up initramfs-tools (0.142) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.1.0-13-amd64 (6.1.55-1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.1.0-13-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.1.0-13-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.1.0-13-amd64
I: /initrd.img is now a symlink to boot/initrd.img-6.1.0-13-amd64
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-13-amd64
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8156b-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8156a-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153c-1.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153b-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-4.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-3.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-2.fw for module r8152
I: The initramfs will attempt to resume from /dev/dm-2
I: Set the RESUME variable to override this.
Setting up linux-image-amd64 (6.1.55-1) ...
Processing triggers for libc-bin (2.36-8) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-13-amd64
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8156b-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8156a-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153c-1.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153b-2.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-4.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-3.fw for module r8152
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8153a-2.fw for module r8152
I: The initramfs will attempt to resume from /dev/dm-2
I: Set the RESUME variable to override this.

The kernel package enforces the initramfs generation, and then it is 
done again while handling the pending triggers.

Jan

-- 
Siemens AG, Technology
Linux Expert Center


  parent reply	other threads:[~2023-11-16 12:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 19:54 Cedric Hombourger
2023-11-14 20:22 ` MOESSBAUER, Felix
2023-11-15  8:36   ` Jan Kiszka
2023-11-15  8:43     ` MOESSBAUER, Felix
2023-11-15  8:57       ` cedric.hombourger
2023-11-15  9:03         ` MOESSBAUER, Felix
2023-11-16 12:38       ` Jan Kiszka [this message]
2024-03-07  7:23 ` Uladzimir Bely
2024-03-26 20:15 ` Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec304c30-7a68-4c11-a4d6-195ee5cd4205@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox