Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 733946 - genkernel-4.0.10+: genkernel initramfs fails to build if /usr/src/linux/.config doesn't exist
Summary: genkernel-4.0.10+: genkernel initramfs fails to build if /usr/src/linux/.conf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2020-07-26 07:01 UTC by Patrick Lauer
Modified: 2020-08-04 09:45 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2020-07-26 07:01:03 UTC
Running 'genkernel initramfs' in an ebuild, with kernel image and kernel modules provided - 

With compression type set to fixed value:

sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
grep: /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
*                  - Adding option 'CONFIG_RD_XZ' with value 'y' to '/usr/src/linux-5.7.10-gentoo/.config'...
 * ACCESS DENIED:  open_wr:      /usr/src/linux-5.7.10-gentoo/.config
/usr/share/genkernel/gen_funcs.sh: line 1987: /usr/src/linux-5.7.10-gentoo/.config: Permission denied
* ERROR: Failed to add 'CONFIG_RD_XZ=y' to '/usr/src/linux-5.7.10-gentoo/.config'
* Please consult '/var/tmp/portage/sys-kernel/buildkernel-5.7.10/work/buildkernel-5.7.10/genkernel.log' for more information and any
* errors that were reported above.


with compression type set to best:

* Determining 'BEST' compression method for initramfs ...
* Checking if we can use 'XZ' compression ...
sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
* Cannot use 'XZ' compression, kernel option 'CONFIG_RD_XZ' is not set!
* Checking if we can use 'LZMA' compression ...
sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
* Cannot use 'LZMA' compression, kernel option 'CONFIG_RD_LZMA' is not set!
* Checking if we can use 'ZSTD' compression ...
sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
* Cannot use 'ZSTD' compression, kernel option 'CONFIG_RD_ZSTD' is not set!
* Checking if we can use 'GZIP' compression ...
sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
* Cannot use 'GZIP' compression, kernel option 'CONFIG_RD_GZIP' is not set!
* Checking if we can use 'BZIP2' compression ...
sed: can't read /usr/src/linux-5.7.10-gentoo/.config: No such file or directory
* Cannot use 'BZIP2' compression, kernel option 'CONFIG_RD_BZIP2' is not set!
* Checking if we can use 'LZO' compression ...
* Cannot use 'LZO' compression, the tool 'lzop' to compress initramfs was not found. Is app-arch/lzop installed?
* Checking if we can use 'LZ4' compression ...
* Cannot use 'LZ4' compression, the tool 'lz4' to compress initramfs was not found. Is app-arch/lz4 installed?
* ERROR: None of the initramfs compression methods we tried are supported by your kernel (config file "/usr/src/linux-5.7.10-gentoo/.config"), strange!?
* Please consult '/var/tmp/portage/sys-kernel/buildkernel-5.7.10/work/buildkernel-5.7.10/genkernel.log' for more information and any
* errors that were reported above.
Comment 1 Larry the Git Cow gentoo-dev 2020-08-01 21:41:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=19df7f243f9440a8192d112363daa26aca69c846

commit 19df7f243f9440a8192d112363daa26aca69c846
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-08-01 18:08:44 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-08-01 20:35:00 +0000

    gen_initramfs.sh: create_initramfs(): Use correct kernel config
    
    Bug: https://bugs.gentoo.org/733946
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 gen_initramfs.sh | 45 ++++++++++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2020-08-04 09:45:10 UTC
Fix released with >=sys-kernel/genkernel-4.1.0_rc1!