Reconsider compressed kernels on arm64

Bug #1954692 reported by Julian Andres Klode
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
Fix Committed
High
dann frazier
flash-kernel (Ubuntu)
Fix Released
Undecided
dann frazier
linux (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Compressed kernel images were introduced in bug 1384955 to work around some limits on old u-boot systems. This in turn broke grub-check-signatures, meaning that while cloud images booted in secure boot, you could not upgrade grub or install new kernels on secure systems as that would trigger a "you have unsigned kernels" message. grub 2.06 also fails to boot the images, as it verifies before decompressing.

Work to fix grub to handle such images on arm64 for backward compatibility is tracked in bug 1954683. This bug is to reconsider whether the change is still necessary or could be removed in 22.04 such that we can have proper UEFI executables again.

Tags: patch

Related branches

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

My side question is what prevents arm64 from having the amd64 approach where AFAIUI the image is compressed but starts with a small stub that decompresses it.

Changed in linux (Ubuntu):
status: New → Triaged
Revision history for this message
dann frazier (dannf) wrote :

@juliank my assumption is that nothing prevents it, other than someone writing that code.

Attached is a patch for flash-kernel that will handle the compression, if needed, of kernel images for the m400. One alternate solution might be to try and copy the firmware-provided device tree data into a different memory location before loading the kernel in the boot.scr script. On one hand, that would limit the changes to code that only runs on these devices. But on the other hand, the generated uImage/uInitrd files wouldn't be usable for netbooting, as I don't think there's a way to inject memory copy commands into a config file for u-boot's pxelinux emulation.

Note that we'll need to update the MAAS image generation code as well to keep that working.

Changed in flash-kernel (Ubuntu):
status: New → In Progress
assignee: nobody → dann frazier (dannf)
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package flash-kernel - 3.104ubuntu6

---------------
flash-kernel (3.104ubuntu6) jammy; urgency=medium

  * Introduce "Boot-Kernel-Max-Size" and support for compressing kernel
    images that exceed it. This will allow installation of larger
    uncompressed kernels on HP ProLiant m400 cartridges. LP: #1954692
  * Drop support for HP ProLiant m800 cartridges. The kernel flavor they
    require (-keystone) never shipped in Ubuntu.

 -- dann frazier <email address hidden> Mon, 31 Jan 2022 16:47:18 +0000

Changed in flash-kernel (Ubuntu):
status: In Progress → Fix Released
dann frazier (dannf)
Changed in maas-images:
status: New → In Progress
assignee: nobody → dann frazier (dannf)
Changed in maas-images:
status: In Progress → Fix Committed
importance: Undecided → High
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.