install on bionic/arm64 fails with "unsigned kernels" error

Bug #2004437 reported by dann frazier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
New
Undecided
Unassigned

Bug Description

I booted a cloud image w/ SecureBoot disabled, upgraded it to the HWE kernel (required for SecureBoot - LTS kernel isn't signed), then rebooted and turned on SecureBoot. I then enabled proposed and tried to install the updated shim-signed. This brought in the new grub-efi-arm64-signed as a dependency, which is expected, but it failed to upgrade, which was unexpected:

Unpacking grub-efi-arm64-signed (1.187.3~18.04.1+2.06-2ubuntu14.1) over (1.173.2
~18.04.1+2.04-1ubuntu47.4) ...
Preparing to unpack .../grub-efi-arm64_2.06-2ubuntu14.1_arm64.deb ...
Package configuration

 ┌───────────────────────────┤ unsigned kernels ├────────────────────────────┐
 │ │
 │ Cannot upgrade Secure Boot enforcement policy due to unsigned kernels │
 │ │
 │ Your system has UEFI Secure Boot enabled in firmware, and the following │
 │ kernels present on your system are unsigned: │
 │ │
 │ 5.4.0-137-generic │
 │ │
 │ │
 │ These kernels cannot be verified under Secure Boot. To ensure your │
 │ system remains bootable, GRUB will not be upgraded on your disk until │
 │ these kernels are removed or replaced with signed kernels. │
 │ │
 │ <Ok> │
 │ │
 └───────────────────────────────────────────────────────────────────────────

E: Your kernels are not signed with a key known to your firmware. This system wi
ll fail to boot in a Secure Boot environment.
dpkg: error processing package grub-efi-arm64-signed (--configure):
 installed grub-efi-arm64-signed package post-installation script

That kernel *is* signed - I'm currently booted on it in SecureBoot mode.
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.4.0-137-generic #154~18.04.1-Ubuntu SMP Tue Jan 10 16:58:27 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$ sudo mokutil --sb-state
SecureBoot enabled

Strangely, I did not see this when upgrading on focal, jammy, kinetic or lunar.

Revision history for this message
dann frazier (dannf) wrote :

I suspect grub-check-signatures needs to be taught how to handle vmlinux.gz files like we did for shim's is-not-revoked tool. But I don't know why that would only be an issue on bionic.

Revision history for this message
Julian Andres Klode (juliank) wrote :

grub-check-signatures is part of src:grub2 and has been taught to handle gzipped kernels at least in some versions.

Do note that all kernels >= the currently booted kernel need to be signed.

affects: grub2-signed (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
status: New → Invalid
Revision history for this message
Julian Andres Klode (juliank) wrote :

I'm going to mark this as a duplicate of bug 1954683 and added a task for bionic there.

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.