Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 869386

Summary: genkernel not adding zstd compressed modules to initramfs
Product: Gentoo Hosted Projects Reporter: Vladi <vladi>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: UNCONFIRMED ---    
Severity: normal CC: adborden
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: genkernel.log

Description Vladi 2022-09-09 21:44:42 UTC
trying to get zstd compressed modules into initramfs fails:
*         >> Appending modules cpio data ...
*                 modules: 0 modules copied. Is that correct?


i have use zstd enabled globally and have removed /var/cache/genkernel after recompiling kmod with zstd.

modules.dep has the zstd compressed modules listed.
Comment 1 Aaron D Borden 2024-01-15 18:59:13 UTC
I can confirm this is also the case when using xz compressed modules with genkernel 4.3.6.
Comment 2 Aaron D Borden 2024-01-15 20:01:41 UTC
Created attachment 882359 [details]
genkernel.log

Log file generated with `genkernel initramfs --loglevel=5`.

It looks like it's using the generated kconfig in GK_SHARE, not using my .config in /usr/src/linux.

* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ...

* mount: >> Boot partition is already mounted in read-write mode on '/boot'.

* initramfs: >> Initializing ...
* Checking if module compression algorithm 'ZSTD' is being used ...
* Cannot use 'ZSTD' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_ZSTD' is not set!
* Checking if module compression algorithm 'GZIP' is being used ...
* Cannot use 'GZIP' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_GZIP' is not set!
* Checking if module compression algorithm 'XZ' is being used ...
* Cannot use 'XZ' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_XZ' is not set!
* Checking if module compression algorithm 'NONE' is being used ...
* Cannot use 'NONE' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_NONE' is not set!
Comment 3 Aaron D Borden 2024-01-16 00:33:46 UTC
Confirmed that if you explicitly set `--kernel-config`, the module compression is determined correctly.

    $ sudo genkernel initramfs  --kernel-config=/usr/src/linux/.config

* Using kernel config file '/usr/src/linux-6.1.67-gentoo/.config' ...

* mount: >> Boot partition is already mounted in read-write mode on '/boot'.

* initramfs: >> Initializing ...
* Checking if module compression algorithm 'ZSTD' is being used ...
* Cannot use 'ZSTD' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_ZSTD' is not set!
* Checking if module compression algorithm 'GZIP' is being used ...
* Cannot use 'GZIP' algorithm for module compression, kernel option 'CONFIG_MODULE_COMPRESS_GZIP' is not set!
* Checking if module compression algorithm 'XZ' is being used ...
* Will use 'XZ' algorithm for kernel module compression!
*         >> Appending devices cpio data ...