Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851501 - sys-kernel/genkernel-4.2.6-r2: requires new kernel 5.18 flag BLOCK_LEGACY_AUTOLOAD for initramfs
Summary: sys-kernel/genkernel-4.2.6-r2: requires new kernel 5.18 flag BLOCK_LEGACY_AUT...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-12 09:27 UTC by Thibaud CANALE
Modified: 2022-08-04 18:04 UTC (History)
1 user (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 Thibaud CANALE 2022-06-12 09:27:47 UTC
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.
Comment 1 Phil Stracchino (Unix Ronin) 2022-08-04 17:51:18 UTC
I just ran into this exact same problem myself.  Verifying right now that enabling BLOCK_LEGACY_AUTOLOAD solves the boot failure.
Comment 2 Phil Stracchino (Unix Ronin) 2022-08-04 18:04:27 UTC
(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.