TEST-43-KERNEL-INSTALL fails on arm64: /boot/vmlinuz-6.17.0-5-generic is missing .efi suffix

Bug #2133402 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dracut (Ubuntu)
New
Undecided
Unassigned
systemd (Ubuntu)
Triaged
Undecided
Nick Rosbrook

Bug Description

TEST-43-KERNEL-INSTALL fails only on Ubuntu arm64 (all other architectures work and it works on Debian unstable):

```
autopkgtest [22:28:47]: test 43-kernel-install: [-----------------------
make: Entering directory '/tmp/autopkgtest.Z5NrGZ/autopkgtest_tmp/test'
make[1]: Entering directory '/tmp/autopkgtest.Z5NrGZ/autopkgtest_tmp/test/TEST-43-KERNEL-INSTALL'
TEST: kernel-install with root filesystem on ext4 filesystem [STARTED]
Calling dracut --tmpdir /var/tmp/dracut-test.Xh3MQT --add-confdir test-root -f /var/tmp/dracut-test.Xh3MQT/initramfs.root
Not removing /var/tmp/dracut-test.Xh3MQT/dracut.dn2hGWT.
Error: /boot/vmlinuz-6.17.0-5-generic is missing .efi suffix.
/usr/lib/kernel/install.d/90-uki-copy.install failed with exit status 1.
TEST: kernel-install with root filesystem on ext4 filesystem [FAILED]
see /tmp/autopkgtest.Z5NrGZ/autopkgtest_tmp/test/TEST-43-KERNEL-INSTALL/test.log
make[1]: Leaving directory '/tmp/autopkgtest.Z5NrGZ/autopkgtest_tmp/test/TEST-43-KERNEL-INSTALL'
make: Leaving directory '/tmp/autopkgtest.Z5NrGZ/autopkgtest_tmp/test'
make[1]: *** [../Makefile.testdir:4: all] Error 1
make: *** [Makefile:4: TEST-43-KERNEL-INSTALL] Error 2
autopkgtest [22:28:56]: test 43-kernel-install: -----------------------]
```

Benjamin Drung (bdrung)
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
Revision history for this message
Nick Rosbrook (enr0n) wrote :
Download full text (4.7 KiB)

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 .
root@r:~# SYSTEMD_LOG_LEVEL=debug kernel-install inspect boot/vmlinuz-6.17.0-6-generic
Loaded config.
MACHINE_ID=57604e1d45ff49aeb684dc8b4ca2e906 set via /etc/machine-id.
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_INSTALL_BOOT_ROOT autodetection yielded no candidates, using "/boot".
Using entry token: 57604e1d45ff49aeb684dc8b4ca2e906
kernel version (6.14.0-35-generic) set via command line.
kernel image file (/root/boot/vmlinuz-6.17.0-6-generic) set via command line.
Kernel image type is uki, using layout=uki.
Using ENTRY_DIR=/boot/57604e1d45ff49aeb684dc8b4ca2e906/6.14.0-35-generic
Successfully forked off '(pager)' as PID 1549.
PR_SET_MM_ARG_START failed: Operation not permitted
sd_pid_get_owner_uid() failed, enabling pager secure mode: No data available
Pager executable is "less", options "FRSXMK", quit_on_interrupt: yes
        Machine ID: 57604e1d45ff49aeb684dc8b4ca2e906
 Kernel Image Type: uki
            Layout: uki
         Boot Root: /boot
  Entry Token Type: machine-id
       Entry Token: 57604e1d45ff49aeb684dc8b4ca2e906
   Entry Directory: /boot/57604e1d45ff49aeb684dc8b4ca2e906/6.14.0-35-generic
    Kernel Version: 6.14.0-35-generic
            Kernel: /root/boot/vmlinuz-6.17.0-6-generic
           Initrds: (unset)
  Initrd Generator: (unset)
     UKI Generator: (unset)
           Plugins: /usr/lib/kernel/install.d/50-depmod.install
                    /usr/lib/kernel/install.d/55-initrd.install
                    /usr/lib/kernel/install.d/90-loaderentry.install
                    /usr/lib/kernel/install.d/90-uki-copy.install
Plugin Environment: LC_COLLATE=C.UTF-8
                    KERNEL_INSTALL_VERBOSE=0
                    KERNEL_INSTALL_IMAGE_TYPE=uki
                    KERNEL_INSTALL_MACHINE_ID=57604e1d45ff49aeb684dc8b4ca2e906
                    KERNEL_INSTALL_ENTRY_TOKEN=57604e1d45ff49aeb684dc8b4ca2e906
                    KERNEL_INSTALL_BOOT_ROOT=/boot
                    KERNEL_INSTALL_LAYOUT=uki <==...

Read more...

Changed in systemd (Ubuntu):
status: New → Triaged
assignee: nobody → Nick Rosbrook (enr0n)
milestone: none → ubuntu-26.04
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.