Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916233 - sys-kernel/genkernel-4.3.7 no longer copies "extra" (kmod) modules into initramfs, breaks zfs on root
Summary: sys-kernel/genkernel-4.3.7 no longer copies "extra" (kmod) modules into initr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal critical
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-10-24 16:21 UTC by Jan Schermer
Modified: 2023-10-28 02:02 UTC (History)
4 users (show)

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


Attachments
logs for genkernel 4.3.6 and 4.3.7 (genkernel-logs.tar.gz,411.00 KB, application/x-gzip)
2023-10-24 16:21 UTC, Jan Schermer
Details
gen_moddeps.sh: ALLRAMDISKMODULES fix (gen_moddeps_allramdiskmodules_fix.patch,325 bytes, patch)
2023-10-25 08:16 UTC, Dmitriy Baranov
Details | Diff
gen_moddeps.sh: ALLRAMDISKMODULES fix 2 (gen_moddeps_allramdiskmodules_fix_2.patch,341 bytes, patch)
2023-10-25 10:09 UTC, Dmitriy Baranov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schermer 2023-10-24 16:21:13 UTC
Created attachment 873414 [details]
logs for genkernel 4.3.6 and 4.3.7

after generating initramfs with genkernel-4.3.7, my system failed to boot because zfs.ko was no longer included in it (even though it exists in /lib/modules/$ver/extra/)

Pretty sure it's this commit that not only modifies firmware inclusion but also the way modules are copied (but I just glanced through it): https://github.com/gentoo/genkernel/commit/08b4f191c9fb064f8564d888e3969a02b0384a32

I'm attaching genkernel logs from both genkernel 4.3.6 and 4.3.7, the difference is clearly visible.
Comment 1 Mike Gilbert gentoo-dev 2023-10-24 16:26:13 UTC
genkernel doesn't really have an active maintainer, so you will likely need to submit a fix or revert for this yourself.
Comment 2 Jan Schermer 2023-10-24 16:31:49 UTC
Sure, I can try to contribute something. Should I look at how to contribute properly or would attaching a patch here be enough?
To be honest I don't like that the patch I referenced does so many changes not related to firmware, so was hoping the author would roll it back and provide a fixed version based on my report :-)
Thanks!
Comment 3 Mike Gilbert gentoo-dev 2023-10-24 19:07:11 UTC
If you want to submit a fix, either a pull request on Github (https://github.com/gentoo/genkernel) or a patch generated using "git format-patch" will suffice.
Comment 4 Dmitriy Baranov 2023-10-25 08:16:46 UTC
Created attachment 873419 [details, diff]
gen_moddeps.sh: ALLRAMDISKMODULES fix

Looks like /lib/modules/${KV_FULL}/modules.order doesn't contain extra modules.
linux-mod-r1.eclass uses depmod (sys-apps/kmod). And it doesn.t generate the new 
modules.order.
Try to apply attached patch.
BTW: why do you use ALLRAMDISKMODULES="yes"?
Comment 5 Dmitriy Baranov 2023-10-25 10:09:51 UTC
Created attachment 873424 [details, diff]
gen_moddeps.sh: ALLRAMDISKMODULES fix 2
Comment 6 Dmitriy Baranov 2023-10-27 16:11:46 UTC
The fix added here:
https://github.com/gentoo/genkernel/pull/51
Comment 7 Larry the Git Cow gentoo-dev 2023-10-28 01:59:01 UTC
The bug has been referenced in the following commit(s):

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

commit c691ab1f1e2493e5ca16ab23545ad3c87f152802
Author:     Dmitry Baranov <reagentoo@gmail.com>
AuthorDate: 2023-10-25 12:27:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-28 01:58:52 +0000

    gen_moddeps.sh: fix including extra modules when ALLRAMDISKMODULES="yes"
    
    depmod util doesn't care about updating modules.order
    when the new extra modules was installed.
    
    Bug: https://bugs.gentoo.org/916233
    Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
    Closes: https://github.com/gentoo/genkernel/pull/51
    Signed-off-by: Sam James <sam@gentoo.org>

 gen_moddeps.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 8 Larry the Git Cow gentoo-dev 2023-10-28 02:02:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29a6def6b0bcf398ae46ede3c09687cce7994018

commit 29a6def6b0bcf398ae46ede3c09687cce7994018
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-28 02:00:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-28 02:01:42 +0000

    sys-kernel/genkernel: add 4.3.8
    
    Closes: https://bugs.gentoo.org/916233
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-kernel/genkernel/Manifest               |   1 +
 sys-kernel/genkernel/genkernel-4.3.8.ebuild | 324 ++++++++++++++++++++++++++++
 2 files changed, 325 insertions(+)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-28 02:02:29 UTC
Please try 4.3.8 and reopen if it doesn't do the job.