kernel image cannot be booted in UEFI despi…” : Bugs : linux package : Ubuntu
The arm64 kernel image enables the EFI stub and ZBOOT options, among others, that should allow booting the kernel in a UEFI environment, as a signed PE binary.
But the package ships the kernel image as a compressed gzip file, which UEFI cannot understand.
I received a suggestion that this is down to having CONFIG_EFI_ZBOOT enabled but running “make install” instead of “make zinstall” (which is am arm specific thing and would do the right thing) at package build time, with some reference: https:/
The vmlinuz in https:/
$ file vmlinuz-
vmlinuz-
$ sbverify –list vmlinuz-
Invalid DOS header magic
Can’t open image vmlinuz-
After using gunzip on it:
$ gunzip < vmlinuz-
$ file unzip
unzip: Linux kernel ARM64 boot executable Image, little-endian, 4K pages
$ sbverify –list unzip
signature 1
image signature issuers:
– /C=GB/ST=Isle of Man/L=Douglas/
image signature certificates:
– subject: /C=GB/ST=Isle of Man/O=Canonical Ltd./OU=Secure Boot/CN=Canonical Ltd. Secure Boot Signing (2022 v1)
issuer: /C=GB/ST=Isle of Man/L=Douglas/
On the other hand, a Debian arm64 kernel:
$ file vmlinuz-
vmlinuz-
$ sbverify –list vmlinuz-
signature 1
image signature issuers:
– /CN=Debian Secure Boot CA
image signature certificates:
– subject: /CN=Debian Secure Boot Signer 2022 – linux
issuer: /CN=Debian Secure Boot CA
Fedora:
$ file vmlinuz
vmlinuz: PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows, 2 sections
I noticed this because I maintain the mkosi package in Debian, and I recently added autopkgtest, which is failing in Ubuntu Plucky:
The autopkgtest uses mkosi to build a UKI using the kernel package, and boot it with EDK2 + systemd-boot, and fails because the kernel format is not recognized.
Autopkgtest script:
https:/
To reproduce the failure with autopkgtest on x86-64:
$ autopkgtest-
$ autopkgtest -s –pin-packages=
This will fail with:
BdsDxe: starting Boot0001 “UEFI Misc Device” from PciRoot(
../src/
../src/
Read more here: Source link
