Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782754 - sys-kernel/gentoo-kernel-bin: NVME driver built as a module is unsatisfactory
Summary: sys-kernel/gentoo-kernel-bin: NVME driver built as a module is unsatisfactory
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-14 00:50 UTC by genBTC
Modified: 2021-04-21 12:40 UTC (History)
2 users (show)

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 genBTC 2021-04-14 00:50:26 UTC
What:
The dist-kernel-bin provided relies on using the NVME driver as a module instead of compiled in.

The current settings are:
CONFIG_NVME_CORE=m
CONFIG_BLK_DEV_NVME=m

I would prefer these two config settings be changed to:
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
(The rest of the NVME settings are not necessary to convert from =m to =y for this matter)

Why:
The current situation means it is impossible to boot a machine with an NVME drive with this kernel-bin and the "-initramfs" USE flag (no initial ramdisk) when using a stock kernel. 

Reproducible: Always

Steps to Reproduce:
1. Use a default gentoo-kernel-bin on a system with an NVME drive and no initial ramdisk.
2. Try to Boot.
3. Fails to Mount the system disk; module for the NVME block device cannot be found; Fails to Boot.
Actual Results:  
The system cannot boot with the root partition on an NVME system drive unless you also build an initrd containing the NVME modules. This is undesirable.

Expected Results:  
This current "NVME as a module" configuration is the only limitation present for me, and otherwise I could completely negate using an initial ramdisk, and I expect many other people have a similar configuration, since NVME drives are common, and initial ramdisks are not actually a requirement to mount the / root partition and bootstrap the system enough to load more modules, unless you use special hardware, need firmware, or alternate (non-ext4) filesystems (which I am not).

I have tested this theory by creating an elaborate manual minimal init script just to load the "nvme_core" and "nvme" modules (and not relying on dracut), and I am correct that everything else needed is in place for the kernel to boot. This workaround was not easy.

I have also recompiled the kernel-bin using its .config as a starting point, and only making the aforementioned two NVME =m to =y changes, and confirmed that is enough. This negates the purpose of the kernel-bin entirely.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-04-21 12:40:40 UTC
Disabling initramfs is not supported with the generic config.  If you do that, you need to adjust the config for your system yourself.