Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731294 - sys-kernel/genkernel: Add support for zstd compressed initramfs
Summary: sys-kernel/genkernel: Add support for zstd compressed initramfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-07-07 16:48 UTC by Slava Sterling
Modified: 2020-07-20 16:10 UTC (History)
1 user (show)

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


Attachments
gen_initramfs.sh.patch (gen_initramfs.sh.patch,1.31 KB, patch)
2020-07-07 16:49 UTC, Slava Sterling
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Sterling 2020-07-07 16:48:10 UTC
When kernel has only RD_ZSTD=y and other RD_* disabled, genkernel is unable to compress an initramfs image because it currently lacks support for zstd. A simple patch that resolves this issue is attached.

Reproducible: Always

Steps to Reproduce:
$ grep ^CONFIG_RD_ .config
CONFIG_RD_GZIP=n
CONFIG_RD_BZIP2=n
CONFIG_RD_LZMA=n
CONFIG_RD_XZ=n
CONFIG_RD_LZO=n
CONFIG_RD_LZ4=n
CONFIG_RD_ZSTD=y
Actual Results:  
>> Pre-generating initramfs' /etc/ld.so.cache ...
ERROR: None of the initramfs compression methods we tried are supported by your kernel (config file "/usr/src/linux/.config"), strange!?

Expected Results:  
>> Pre-generating initramfs' /etc/ld.so.cache ...
>> Compressing cpio data (.zst) ...
You will find the initramfs in '/boot/initramfs-5.7.7-gentoo.img'
Comment 1 Slava Sterling 2020-07-07 16:49:17 UTC
Created attachment 648264 [details, diff]
gen_initramfs.sh.patch
Comment 2 Larry the Git Cow gentoo-dev 2020-07-16 15:03:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=80e3a6086c92e30101f772170c4b056f1ff4c81c

commit 80e3a6086c92e30101f772170c4b056f1ff4c81c
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-07-15 22:05:53 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-07-16 14:29:17 +0000

    Add ZSTD compression support for initramfs
    
    Bug: https://bugs.gentoo.org/731294
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 defaults/compression_methods.sh | 5 +++++
 doc/genkernel.8.txt             | 3 ++-
 gen_cmdline.sh                  | 2 +-
 gen_funcs.sh                    | 2 ++
 4 files changed, 10 insertions(+), 2 deletions(-)
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-07-20 16:10:51 UTC
Released with genkernel-4.0.10.