Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703438 - sys-kernel/vanilla-kernel-5.4.5: missing ext4.ko in initrd
Summary: sys-kernel/vanilla-kernel-5.4.5: missing ext4.ko in initrd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 703516
Blocks: 704576
  Show dependency tree
 
Reported: 2019-12-20 21:00 UTC by Jan Ziak (atomsymbol)
Modified: 2020-03-06 07:14 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,7.88 KB, text/plain)
2019-12-20 21:00 UTC, Jan Ziak (atomsymbol)
Details
dracut-048-r1-initrd-5.4.5.txt (dracut-048-r1-initrd-5.4.5.txt,4.88 KB, text/plain)
2019-12-21 23:14 UTC, Jan Ziak (atomsymbol)
Details
gdb backtrace dracut-install.txt (backtrace dracut-install.txt,1.25 KB, text/plain)
2019-12-21 23:17 UTC, Jan Ziak (atomsymbol)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2019-12-20 21:00:23 UTC
Created attachment 600218 [details]
emerge-info.txt

Hi. The initrd of vanilla-kernel-5.4.5 does not include the EXT4 filesystem module.

$ lsinitrd /boot/initrd-5.4.5 | grep -e ext4\\\|btrfs
drwxr-xr-x   2 Dec 20 19:26 lib/modules/5.4.5/kernel/fs/btrfs
-rw-r--r--   1 Dec 20 19:25 lib/modules/5.4.5/kernel/fs/btrfs/btrfs.ko
...

$ grep EXT4 /boot/config-5.4.5 
CONFIG_EXT4_FS=m
...

sys-kernel/dracut-048-r1
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-21 19:26:13 UTC
I have to say it's weird.  I do have the ext4 module, as well as other random filesystems:

$ lsinitrd /boot/initrd-5.4.5 |& grep ext4
drwxr-xr-x   1 root     root            0 Dec 19 13:13 lib/modules/5.4.5/kernel/fs/ext4
-rw-r--r--   1 root     root      1374280 Dec 19 13:09 lib/modules/5.4.5/kernel/fs/ext4/ext4.ko
lrwxrwxrwx   1 root     root            6 Dec 19 13:13 sbin/fsck.ext4 -> e2fsck
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-21 22:56:16 UTC
Could you try rerunning it manually?  E.g.:

dracut /tmp/initrd 5.4.5

You may also try experimenting with various options.  I have to admit I'm not really an expert here, I've just started using it.
Comment 3 Jan Ziak (atomsymbol) 2019-12-21 23:14:32 UTC
Created attachment 600324 [details]
dracut-048-r1-initrd-5.4.5.txt

Output of "sudo dracut /tmp/initrd 5.4.5". There are two segmentation faults, but /tmp/initrd file is generated nevertheless and it does not contain ext4.ko.
Comment 4 Jan Ziak (atomsymbol) 2019-12-21 23:17:58 UTC
Created attachment 600326 [details]
gdb backtrace dracut-install.txt
Comment 5 Jan Ziak (atomsymbol) 2019-12-21 23:40:57 UTC
reply to Michał Górny from comment #2)
> Could you try rerunning it manually?  E.g.:
> 
> dracut /tmp/initrd 5.4.5

dracut-048-r1 fails to add ext4.ko to the initrd.

dracut-049-r2 (currently unstable in Gentoo) does add ext4.ko to the initrd and does not segfault during execution.
Comment 6 Alexander Tsoy 2019-12-24 23:37:03 UTC
(In reply to Jan Ziak (http://atom-symbol.net) from comment #5)
> dracut-049-r2 (currently unstable in Gentoo) does add ext4.ko to the initrd
> and does not segfault during execution.
This is strange. We didn't backport [1] yet. And this commit has fixed a similar issue in fedora [2].

[1] https://github.com/dracutdevs/dracut/commit/fc141f22869bad2e5409d1cc555c1a42ea738343
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1676357
Comment 7 Larry the Git Cow gentoo-dev 2019-12-28 07:10:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66c989c29fa9a82e7e9179194a8ec9ad6d74dffc

commit 66c989c29fa9a82e7e9179194a8ec9ad6d74dffc
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-28 06:05:30 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-28 06:05:30 +0000

    sys-kernel/vanilla-kernel: Force fresh dracut to avoid bugs
    
    Bug: https://bugs.gentoo.org/703438
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-kernel/vanilla-kernel/vanilla-kernel-5.4.6-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 8 Larry the Git Cow gentoo-dev 2019-12-29 19:39:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=980830b7e4a2953550338f13dd8525bcad28d8fc

commit 980830b7e4a2953550338f13dd8525bcad28d8fc
Author:     Alexander Tsoy <alexander@tsoy.me>
AuthorDate: 2019-12-26 14:26:15 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-12-29 19:36:23 +0000

    sys-kernel/dracut: Add a bunch of upstream patches
    
    * fix dracut-install crashes
    * install kernel module dependencies of dependencies
    * add support for compressed firmware files
    * add support for rngd service
    * bash-5 compatibility
    * add fts-standalone dependency and configure check for musl
    * fix udevdir detection
    
    Closes: https://bugs.gentoo.org/676268
    Closes: https://bugs.gentoo.org/677788
    Closes: https://bugs.gentoo.org/687602
    Bug: https://bugs.gentoo.org/703438
    Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-kernel/dracut/dracut-049-r3.ebuild             | 176 +++++++++++++++++++++
 ...gure-find-cflags-and-libs-for-fts-on-musl.patch |  97 ++++++++++++
 ...t-create-locking-directory-run-cryptsetup.patch |  32 ++++
 ...all-Support-the-compressed-firmware-files.patch |  63 ++++++++
 .../049-dracut.sh-Fix-udevdir-detection.patch      |  38 +++++
 .../dracut/files/049-fs-lib-drop-a-bashism.patch   |  99 ++++++++++++
 ...cut-install.c-install-module-dependencies.patch |  79 +++++++++
 ...ing_hash_func-should-not-be-fed-with-NULL.patch |  38 +++++
 ...g-the-systemdutildir-variable-before-it-s.patch |  55 +++++++
 ...ager-call-the-online-hook-for-connected-d.patch |  32 ++++
 ...ager-fix-getting-of-ifname-from-the-sysfs.patch |  37 +++++
 ...rk-manager-remove-useless-use-of-basename.patch |  26 +++
 ...dule-running-early-during-boot-to-help-ge.patch |  88 +++++++++++
 13 files changed, 860 insertions(+)
Comment 9 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-03-06 07:14:08 UTC
Newer dracut was stabilized.