grub2 does not boot kernels built without CONFIG_EFI_STUB

Bug #1895912 reported by Michael Zhivich
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

After grub2 update that introduced patch entitled ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch, grub2 stopped loading kernels built without CONFIG_EFI_STUB on EFI machines when secure boot is not enabled.

Attempting to do so fails with the following set of errors:

error: kernel doesn't support EFI handover.
error: you need to load the kernel first

The issue is that grub_errno is never reset if the handoff to linuxefi fails because kernel was not built with CONFIG_EFI_STUB. This causes the code at the end of the function to skip setting "loaded = 1", causing the 2nd error from the initrd loader.

I'm attaching a small patch that appears to resolve the issue.

Tags: patch
Revision history for this message
Michael Zhivich (mzhivich) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "proposed patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

@Chris Coulson: This is your patch, can you have a look at the proposed fix?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Rui Salvaterra (rsalvaterra) wrote :

Is this bug going to be fixed at all? It's been almost two years. It's extremely annoying having to bloat custom kernel builds with EFI stub support just to be able to boot them. ubuntu-Make-the-linux-command-in-EFI-grub-always-try.patch is broken, as this problem does NOT happen on pure Debian. Please, guys, get your act together.

Changed in grub2 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Julian Andres Klode (juliank) wrote :

I think we're not going to work on this. All these patches will be dropped eventually once we have a reasonable upstream approach, so it might happen that this will work eventually with 2.11, or not, depending on the approaches chosen upstream.

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.