Efi-stub-kernel with embedded initramfs does not boot
A message that is not in the archive (sent off-list or not yet received): 5877854.lOV4Wx5bFT@big
Ard Biesheuvel
maintainerQuoted 6 lines · Peter Böhm
Dear Ard Biesheuvel,
this is my first kernel bug report ever (and I am not a native english speaker), please be patient with me ;-)
Hello Peter,
Thanks for the report.
Quoted 8 lines
I have read
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html
and found your email address here:
https://www.kernel.org/doc/html/latest/process/maintainers.html#maintainersI configure my kernels since 20 years but I am not a kernel hacker. I have a working LTS kernel (5.15.78) in a Gentoo system.
So if I am understanding this correctly, you are reporting that the config below simply does not work at all, and this 5.15 kernel does not use a built-in initramfs, right? Or did something get broken after 5.15 was released?
Quoted 10 lines
A) Bug Summary:
Kbuildallows me to add an embedded (=built-in) initramfs to my working efi- stub-kernel (signed because of secureboot). This combination does not boot:
BIOS boot screen starts with: "EFI Stub: UEFI Secure Boot is enabled"; then blank screen; then two beeps; then trying to boot again; endless loop can only be stopped by pressing <F12> and entering UEFI BIOS (and selecting a working kernel).
Quoted 3 lines
Note: Kernel builds without any error message (of course I have beside the
initramfs_listalso a init in/usr/src/initramfs)
How much does the size of the bzImage increase due to the initramfs being incorporated? Given the below, it should be tiny, right?
Quoted 10 lines
B) Difference between working kernel and failed:
CONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE="/usr/src/initramfs/initramfs_list"CONFIG_INITRAMFS_ROOT_UID=0CONFIG_INITRAMFS_ROOT_GID=0CONFIG_RD_GZIP=yCONFIG_INITRAMFS_COMPRESSION_GZIP=y
Quoted 5 lines
I also know a solution called "UKI" (unified kernel image) in other distributions; but why building such scrap if my beloved kernel has all necessary pieces also ? Kernel hast efi-stub, built-in kernel command line and embedded initramfs ...
Agreed. You shouldn't need UKI for this.
However, I tested this locally with a rootfs.cpio file I use for testing, and it happily boots in EFI mode and going through the stub etc.
Can you check and see if earlycon=efifb produces some more output?