Support configuring initramfs compression
This adds an installer question that configures initramfs-tools's COMPRESS
setting and installs the chosen compressor. See some previous discussion at Debian bug #950086. That original use case is less interesting to me now. More importantly, zstd
is the new default COMPRESS
method, but it's not installed until later on (making initramfs-tools fallback to gzip
) and this question is also a way to fix that.
So far my main use case has been about creating boot images for Chromebooks in another step. The firmware on mine boots images (including lzma-compressed kernel, initramfs, dtb) only upto 32MiB. I wanted to re-ask this and the MODULES
question if the boot image is too big, to retry with a smaller initramfs. Setting MODULES=dep
is actually enough, but won't work if I'm going through the installer in a QEMU VM intending to boot the result on actual hardware. MODULES=most
and COMPRESS=xz
can get me around 31MiB (COMPRESSLEVEL=9
makes it 30MiB) but goes over the limit when I add plymouth or maybe even just cryptsetup or lvm, so I'm not even sure if it's worth trying anymore.