RE: Question about unpacking large initramfs (>2G)

From: David Laight
Date: Sun Mar 10 2024 - 15:43:21 EST


From: Nazerke Turtayeva
> Sent: 09 March 2024 03:11
>
> Recently I was testing LLMs for RISC-V on Linux plus Buildroot plus
> OpenSBI and Spike ISA Simulator. Nevertheless, given my rootfs end up
> being pretty large, 3.6GB at the moment, my linux boot falls short
> with "Initramfs unpacking failed: write error". I was trying to debug
> this problem last week, but got confused with code complexity :(.

I'd look at removing unwanted stuff from initramfs.
For our buildroot images we delete a lot of stuff - since it
can be found in the disk image after mounting the disk /.
(Although I'm not at all sure how much of the initramfs memory
is recovered - especially without pivot_root.

One thing I have noticed on x86 is that the .ko files are
massive because they contain a lot of debug info.
(I was looking at why it took so long between the last grub
message and the first kernel one.)
Also the default build also puts all the modules into the
initramfs - even though most can be loaded from the root filesystem.

David.

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)