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'
Created attachment 648264 [details, diff] gen_initramfs.sh.patch
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(-)
Released with genkernel-4.0.10.