FYI: trying to optimize initramfs generation in Debian

9 views
Skip to first unread message

Jan Kiszka

unread,
Aug 24, 2024, 3:35:15 AM8/24/24
to isar-users
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079509

We could also build a patched initramfs-tools, but I'm not yet sure the
gain is worth the complication.

Another, orthogonal way to optimize the generation is to provide zstd to
the image so that slower gzip can be avoided by initramfs-tools (only
recommended by initramfs-tools, not required). Still, initramfs creation
is more than compression.

Jan

--
Siemens AG, Technology
Linux Expert Center

MOESSBAUER, Felix

unread,
Sep 3, 2024, 3:38:56 AM9/3/24
to isar-...@googlegroups.com, Kiszka, Jan
On Sat, 2024-08-24 at 09:35 +0200, 'Jan Kiszka' via isar-users wrote:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1079509
>
> We could also build a patched initramfs-tools, but I'm not yet sure
> the
> gain is worth the complication.

Hi,

thanks for bringing this up again. My other workaround to /bin/true the
generation during install and manually generate it at the end is also
still on the ISAR ML (need to re-check the state).

Anyways, it would be better to have proper support for that in Debian.
While we are at it, we could also add an option to completely disable
the initrd generation, e.g. because we will later generate a custom
one.

>
> Another, orthogonal way to optimize the generation is to provide zstd
> to
> the image so that slower gzip can be avoided by initramfs-tools (only
> recommended by initramfs-tools, not required).

Compressing the initrd with zstd has the advantage of MUCH faster
decompression at boot time. This gets relevant when e.g. adding Nvidia
GPU drivers to the initrd which are huge. For details, please also see
[1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076582

Felix
Reply all
Reply to author
Forward
0 new messages