lzma is supported in kernel, and proved to be faster and smaller, it is better to support compress the initrd in lzma format. zymtest linux # grep -i lzma .config CONFIG_HAVE_KERNEL_LZMA=y CONFIG_KERNEL_LZMA=y CONFIG_RD_LZMA=y CONFIG_DECOMPRESS_LZMA=y
Self-promoting a bit here, but an ebuild I have in the gentoo-sunrise overlay which I am trying to get in to ~arch (testing) supports creating initramfs images which are lzma compressed (a trivial thing). More importantly you can have all but /boot on any combination of mdadm, lvm, and cryptsetup devices. You might be interested in http://bugs.gentoo.org/show_bug.cgi?id=277329 As far as the trivial work around use this general method for the moment: gzip -dc initramfs.gz | lzma -7cz > initramfs.lzma
Created attachment 199865 [details, diff] genkernel git patch that support lzma/bzip2/gzip patch compress ramdisk trying fist lzma, then bzip2, then gzip, or not compress at last
(In reply to comment #1) > Self-promoting a bit here, but an ebuild I have in the gentoo-sunrise overlay > which I am trying to get in to ~arch (testing) supports creating initramfs > images which are lzma compressed (a trivial thing). More importantly you can > have all but /boot on any combination of mdadm, lvm, and cryptsetup devices. > > You might be interested in http://bugs.gentoo.org/show_bug.cgi?id=277329 > > As far as the trivial work around use this general method for the moment: > > gzip -dc initramfs.gz | lzma -7cz > initramfs.lzma > cool, looks like this is a cool enhancement, thanks
Created attachment 199868 [details, diff] genkernel git patch that support lzma/bzip2/gzip patch fix last gzip to previous patch.
*** Bug 279471 has been marked as a duplicate of this bug. ***
Created attachment 269797 [details, diff] 0001-Try-to-make-compression-format-of-the-ramdisk-custom.patch Since you may actually want to choose which format your initrd is created in I propose the following patch as a solution to this. In short it introdues /etc/genkernel.conf:RAMDISK_FORMAT and --ramdisk-format which can take the values of gzip, bzip2, lzma, xz and lzo. It then compresses the ramdisk using the compression algorithm choosen. The most interesting formats are (compared to the default format gzip on my machine): xz nearly half the size, but nearly twice the time unpack (interesting for slow media) lzo a little bit bigger, but nearly 1/3 of the time to unpack (interesting for systems where size does not matter)
Looks like this never got closed when it was implemented in 2012.