Make initramfs smaller #6006
Replies: 5 comments 2 replies
-
|
I am an idiot.
part later, but dracut is built right. For aosc 675, the compression currently does: which is less than satisfactory, but not nothing. |
Beta Was this translation helpful? Give feedback.
-
|
So I experimented a bit with decompressing before putting them into initrd. The short story is that there appears to be 1.5 MB of saving, which isn't much: drwxr-xr-x 1 root root 126 May 15 16:26 675
-rw-r--r-- 1 root root 527473132 May 15 16:35 675-decomp.cpio
-rw-r--r-- 1 a2 users 169533002 May 15 16:35 675-decomp.cpio.zst
-rw-r--r-- 1 a2 users 151227720 May 15 16:35 675-decomp.cpio.zst.15
-rw-r--r-- 1 a2 users 239912448 May 15 16:19 675real.img
-rw-r--r-- 1 a2 users 171053780 May 15 16:19 675real.img.zst(though look at the 151M from zstd -15!)
Then to produce the two compressed files: Since So unpacking does help with compression, but zstd needs to be working hard enough for that help to matter. Do we want to slow down initramfs generation for that? If we don't want to compromise on speed, we might have better luck just thinking about what to not include in initramfs.
|
Beta Was this translation helpful? Give feedback.
-
|
Part of this has been addressed by #9423. |
Beta Was this translation helpful? Give feedback.
-
|
Currently, on a fully up-to-date amd64 system with nvidia 580 drivers installed, my initramfs is 308MB in size: Not a huge deal for 16GB SandyBridge SATA SSD machine but seems little excessive...? |
Beta Was this translation helpful? Give feedback.
-
|
200MB of nvidia gsp firmware 🤷 Unneeded symbols in the obj? (besides what is required for module loading) Please find full With 1GB boot partition, I can only have two kernels and each time it's manual recovery around |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This used to be a misguided bug report.
Bug description
/boot/initramfs-6.7.5-aosc-main.imgis not a compressed file, despite the intentions of our dracut.conf clearly asking for zstd.Steps to reproduce
file /boot/initramfs-6.7.5-aosc-main.imgsays/boot/initramfs-6.7.5-aosc-main.img: ASCII cpio archive (SVR4 with no CRC)binwalk /boot/initramfs-6.7.5-aosc-main.imgreveals that it's actually a bunch of cpios, some carrying xz-compressed firmware, others carrying zst-compressed modules. Surely we can improve the compression somewhat by going solid: don't compress the individual files, compress the whole thing.Update channel(s)
stable
Package and version
While we're at it: dracut has its own opinion on zstd flags when you just write
compress=zstd; see https://github.com/dracutdevs/dracut/blob/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9/dracut.sh#L2412C1-L2414C11Beta Was this translation helpful? Give feedback.
All reactions