[Bug 1895912] Re: grub2 does not boot kernels built without CONFIG_EFI_STUB

Rui Salvaterra 1895912 at bugs.launchpad.net
Wed Feb 23 10:39:33 UTC 2022


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.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1895912

Title:
  grub2 does not boot kernels built without CONFIG_EFI_STUB

Status in grub2 package in Ubuntu:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1895912/+subscriptions




More information about the foundations-bugs mailing list