dracut icon indicating copy to clipboard operation
dracut copied to clipboard

Should dracut uncompress compressed kernel modules before installing into the initramfs?

Open Nowa-Ammerlaan opened this issue 1 year ago • 1 comments

A kernel that is configured to compress modules (for example CONFIG_MODULE_COMPRESS_XZ=y) still supports loading uncompressed modules. Given that it is size-wise more efficient to compress a bunch of uncompressed files, compared to compressing a bunch of files that are individually already compressed. It might make sense for Dracut to decompress modules it finds before including them in the initramfs.

The same holds for firmware files (CONFIG_FW_LOADER_COMPRESS_XZ=y).

To put this in numbers, an UKI for the same kernel with the same user space utilities, but with pre-xz-compressed kernel modules and firmware is 356.352 kb larger on my system.

Nowa-Ammerlaan avatar Aug 01 '24 08:08 Nowa-Ammerlaan

Yes, yes, yes. This should absolutely be an option: I did some testing in March 2024 and it helps a strong initramfs compressor (e.g. zstd -15) compress quite a bit further. Compressed firmware is a candidate too. https://github.com/AOSC-Dev/aosc-os-abbs/discussions/6006#discussioncomment-9443065

patch https://github.com/dracut-ng/dracut-ng/pull/1176

Artoria2e5 avatar Feb 15 '25 07:02 Artoria2e5

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

stale[bot] avatar Jun 26 '25 20:06 stale[bot]

Stale bot considered harmful, chapter 1048577

well it got me up to clean up a PR. maybe it helps

Artoria2e5 avatar Jun 27 '25 04:06 Artoria2e5

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

stale[bot] avatar Jul 29 '25 01:07 stale[bot]