Hello, With Linux kernel 5.18, the config flag "BLOCK_LEGACY_AUTOLOAD" has been introduced. If this flag it disabled, and genkernel is used to generate the initramfs, this last can’t find the "root" partition to open or unlock. Tested with genkernel 4.2.6 on a RAID1 then LUKS system. Genkernel USE flags: > sys-kernel/genkernel-4.2.6-r2::gentoo was built with the following: > USE="firmware (-ibm)" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_9 -python3_10 -python3_8" Kernel and initramfs compilation options: > genkernel --makeopts='-j16' --no-clean --no-mrproper --no-install --no-symlink --no-all-ramdisk-modules --no-module-rebuild --kernel-config=/usr/src/linux/.config --no-splash --busybox --no-ssh --mdadm --mdadm-config=/root/mdadm_root.conf --no-dmraid --gpg --luks --lvm --microcode=amd --no-firmware --compress-initramfs --compress-initramfs-type=zstd --strip=all all Options as kernel arguments: > domdadm doluks crypt_root=UUID=1[...] root_keydev=UUID=[...] root_key=/efi/gentoo/drive.gpg dolvm real_root=UUID=[...] rootfstype=xfs keymap=fr resume=UUID=[...] When failing it asks to provide the root path before querying the passphrase for the GPG key. Once this BLOCK_LEGACY_AUTOLOAD kernel flag is set and the new kernel rebuilt, the system boots as usual.
I just ran into this exact same problem myself. Verifying right now that enabling BLOCK_LEGACY_AUTOLOAD solves the boot failure.
(In reply to Phil Stracchino (Unix Ronin) from comment #1) > I just ran into this exact same problem myself. Verifying right now that > enabling BLOCK_LEGACY_AUTOLOAD solves the boot failure. Confirmed that the system would not boot, unable to find the boot device, until BLOCK_LEGACY_AUTOLOAD was enabled in the kernel. If this is now considered legacy functionality, then there needs to be a lot better documentation readily findable on how to configure booting "correctly" so that BLOCK_LEGACY_AUTOLOAD is NOT required.
(In reply to Thibaud CANALE from comment #0) > With Linux kernel 5.18, the config flag "BLOCK_LEGACY_AUTOLOAD" has been > introduced. > If this flag it disabled, and genkernel is used to generate the initramfs, > this last can’t find the "root" partition to open or unlock. > > ... > > Once this BLOCK_LEGACY_AUTOLOAD kernel flag is set and the new kernel > rebuilt, the system boots as usual. Same issue on kernel 6.1.4 with "CONFIG_BLOCK_LEGACY_AUTOLOAD is not set" and a custom initramfs, which merely does `mdadm --assemble --scan`. (no udev is running as part of initramfs, but devtmpfs is automatically mounted prior to that) Rebuilding the kernel with CONFIG_BLOCK_LEGACY_AUTOLOAD=y fixed the problem.
Not a genkernel user myself, but came across this when Googling. I have a script that runs `mdadm --assemble --scan` and it stopped working until I enabled BLOCK_LEGACY_AUTOLOAD.