Bug 1703872

Summary: Xen package GRUB configuration doesn't boot on EFI bootloader
Product: [Fedora] Fedora Reporter: mathieu.tarral
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 30CC: fmartine, jforbes, lkundrak, marmarek, m.a.young, pasik, pjones, robinlee.sysu
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: grub2-2.02-91.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-15 06:20:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Xen GRUB entry boot failure error messages none

Description mathieu.tarral 2019-04-29 00:54:41 UTC
Created attachment 1559723 [details]
Xen GRUB entry boot failure error messages

Description of problem:

The GRUB configuration installed by the xen package is invalid for EFI bootloaders.

the GRUB entry is looking for non existent modules, and fails to boot the Xen kernel.

Version-Release number of selected component (if applicable):
xen-4.11.1-4.cf29

How reproducible:
always

Steps to Reproduce:
1. setup an EFI bootloader
2. install Xen on Fedora 29
3. reboot on Xen GRUB boot entry

Actual results:
GRUB boot entry fails to load Xen kernel

See the attachment for the error messages

Expected results:
Xen kernel should have been loaded and booted

Comment 1 Michael Young 2019-04-29 07:31:48 UTC
This issue is in how grub handles xen rather than the xen package.

Comment 2 mathieu.tarral 2019-05-09 20:37:57 UTC
Hi,

did you ping the Fedora GRUB team ?
What's their opinion on this issue ?

I have a demo to make using Xen in a few weeks, i would rather not do it using nested virtualization.

Thank you for your help.

Comment 3 Michael Young 2019-05-09 20:54:30 UTC
If you want to workaround the issues with the grub file something like the following might work (though it is probably worth making a back up of the grub.cfg file first)

sed -i -e '/insmod module2/d' /boot/efi/EFI/fedora/grub.cfg
mkdir /boot/efi/EFI/fedora/x86_64-efi
cp -p /usr/lib/grub/x86_64-efi/{relocator.mod,multiboot2.mod} /boot/efi/EFI/fedora/x86_64-efi

Comment 4 mathieu.tarral 2019-05-26 23:00:14 UTC
Hi Michael,

thanks for your answer.

I noticed 2 important things:

1) I was missing the grub2-efi-x64-modules package, so I didn't have /usr/lib/grub/x86_64-efi/* on my system.
Maybe this was supposed to be installed by Grub or the Xen package ?

2) Even if I install this package, "/usr/lib/grub/x86_64-efi/multiboot2.mod" is absent from the package.

However, "/usr/lib/grub/i386-pc/multiboot2.mod" is present.

-> I think the GRUB team should look closely at grub2-efi-x64-modules, and understand why multiboot2.mod is missing.
-> why do I have to copy it manually in "/boot/efi/EFI/fedora/x86_64-efi" ? shouldn't it be done by grub2-mkconfig ?

I just want Xen to work on Fedora, I have invested/lost some hours already with this bug, and other people might be
blocked at this moment by this issue.

Let's find a way to solve it.

Thank you.

Comment 5 mathieu.tarral 2019-05-26 23:02:19 UTC
Also I upgraded to Fedora 30, and bug is still here.

Comment 6 Javier Martinez Canillas 2019-07-15 10:58:53 UTC
Fixed in grub2-2.02-91.fc31.

Comment 7 Javier Martinez Canillas 2019-10-15 08:08:32 UTC
*** Bug 1691559 has been marked as a duplicate of this bug. ***