TEST-43-KERNEL-INSTALL fails on arm64: /boot/vmlinuz-6.17.0-5-generic is missing .efi suffix
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| dracut (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
| systemd (Ubuntu) |
Triaged
|
Undecided
|
Nick Rosbrook | ||
Bug Description
TEST-43-
```
autopkgtest [22:28:47]: test 43-kernel-install: [------
make: Entering directory '/tmp/autopkgte
make[1]: Entering directory '/tmp/autopkgte
TEST: kernel-install with root filesystem on ext4 filesystem [STARTED]
Calling dracut --tmpdir /var/tmp/
Not removing /var/tmp/
Error: /boot/vmlinuz-
/usr/lib/
TEST: kernel-install with root filesystem on ext4 filesystem [FAILED]
see /tmp/autopkgtes
make[1]: Leaving directory '/tmp/autopkgte
make: Leaving directory '/tmp/autopkgte
make[1]: *** [../Makefile.
make: *** [Makefile:4: TEST-43-
autopkgtest [22:28:56]: test 43-kernel-install: -------
```
| summary: |
- TEST-43-KERNEL-INSTALL fails on arm64: : /boot/vmlinuz-6.17.0-5-generic - is missing .efi suffix + TEST-43-KERNEL-INSTALL fails on arm64: /boot/vmlinuz-6.17.0-5-generic is + missing .efi suffix |

The immediate cause of the test failure is that 90-uki-copy.install is run with a kernel image where $KERNEL_ IMAGE_LAYOUT= uki. If that variable was set to something else, this plugin would be skipped. That is what happens on all other arches.
The reason this is *not* skipped on arm64 is due to stubble[1]. I.e., the arm64 kernel images have an efi stub called stubble, and the kernel image is packed with ukify. Because it's packed with ukify, it gains some additional PE sections for metadata like .osrel.
The systemd tools then use that as a heuristic for deciding if a kernel image is a UKI or not[2].
For example:
root@r:~# dpkg-deb -R linux-image- 6.17.0- 6-generic_ 6.17.0- 6.6_arm64. deb . LOG_LEVEL= debug kernel-install inspect boot/vmlinuz- 6.17.0- 6-generic ID=57604e1d45ff 49aeb684dc8b4ca 2e906 set via /etc/machine-id. INSTALL_ BOOT_ROOT autodetection yielded no candidates, using "/boot". eb684dc8b4ca2e9 06 boot/vmlinuz- 6.17.0- 6-generic) set via command line. /boot/57604e1d4 5ff49aeb684dc8b 4ca2e906/ 6.14.0- 35-generic get_owner_ uid() failed, enabling pager secure mode: No data available eb684dc8b4ca2e9 06 eb684dc8b4ca2e9 06 5ff49aeb684dc8b 4ca2e906/ 6.14.0- 35-generic vmlinuz- 6.17.0- 6-generic kernel/ install. d/50-depmod. install
/ usr/lib/ kernel/ install. d/55-initrd. install
/ usr/lib/ kernel/ install. d/90-loaderentr y.install
/ usr/lib/ kernel/ install. d/90-uki- copy.install
KERNEL_ INSTALL_ VERBOSE= 0
KERNEL_ INSTALL_ IMAGE_TYPE= uki
KERNEL_ INSTALL_ MACHINE_ ID=57604e1d45ff 49aeb684dc8b4ca 2e906
KERNEL_ INSTALL_ ENTRY_TOKEN= 57604e1d45ff49a eb684dc8b4ca2e9 06
KERNEL_ INSTALL_ BOOT_ROOT= /boot
KERNEL_ INSTALL_ LAYOUT= uki <==...
root@r:~# SYSTEMD_
Loaded config.
MACHINE_
Found container virtualization lxc.
Directory "/boot" is not the root of the file system.
Couldn't find an XBOOTLDR partition.
Failed to check file system type of "/efi": No such file or directory
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
Failed to check file system type of "/boot/efi": No such file or directory
Couldn't find EFI system partition, ignoring.
KERNEL_
Using entry token: 57604e1d45ff49a
kernel version (6.14.0-35-generic) set via command line.
kernel image file (/root/
Kernel image type is uki, using layout=uki.
Using ENTRY_DIR=
Successfully forked off '(pager)' as PID 1549.
PR_SET_MM_ARG_START failed: Operation not permitted
sd_pid_
Pager executable is "less", options "FRSXMK", quit_on_interrupt: yes
Machine ID: 57604e1d45ff49a
Kernel Image Type: uki
Layout: uki
Boot Root: /boot
Entry Token Type: machine-id
Entry Token: 57604e1d45ff49a
Entry Directory: /boot/57604e1d4
Kernel Version: 6.14.0-35-generic
Kernel: /root/boot/
Initrds: (unset)
Initrd Generator: (unset)
UKI Generator: (unset)
Plugins: /usr/lib/
Plugin Environment: LC_COLLATE=C.UTF-8