Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279570 - request support lzma initrd file
Summary: request support lzma initrd file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 279471 (view as bug list)
Depends on:
Blocks: 279471
  Show dependency tree
 
Reported: 2009-07-29 10:03 UTC by zym
Modified: 2016-01-28 18:55 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genkernel git patch that support lzma/bzip2/gzip patch (gen_initramfs_lzma_support.patch,2.10 KB, patch)
2009-08-01 23:56 UTC, zym
Details | Diff
genkernel git patch that support lzma/bzip2/gzip patch (gen_initramfs_lzma_support.patch,2.04 KB, patch)
2009-08-02 00:22 UTC, zym
Details | Diff
0001-Try-to-make-compression-format-of-the-ramdisk-custom.patch (0001-Try-to-make-compression-format-of-the-ramdisk-custom.patch,5.18 KB, patch)
2011-04-13 11:49 UTC, Xake
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zym 2009-07-29 10:03:56 UTC
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
Comment 1 Michael Evans 2009-08-01 07:53:50 UTC
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
Comment 2 zym 2009-08-01 23:56:44 UTC
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
Comment 3 zym 2009-08-02 00:05:21 UTC
(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
Comment 4 zym 2009-08-02 00:22:54 UTC
Created attachment 199868 [details, diff]
genkernel git patch that support lzma/bzip2/gzip patch

fix last gzip to previous patch.
Comment 5 Alexey Shvetsov archtester gentoo-dev 2009-09-03 14:54:22 UTC
*** Bug 279471 has been marked as a duplicate of this bug. ***
Comment 6 Xake 2011-04-13 11:49:50 UTC
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)
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-01-28 18:55:33 UTC
Looks like this never got closed when it was implemented in 2012.