Bug 2335558

Summary: Failure in loading multiboot2 prevent Xen from boot
Product: [Fedora] Fedora Reporter: Andrea Perotti <aperotti>
Component: xenAssignee: Michael Young <m.a.young>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 41CC: jforbes, lkundrak, lsandova, m.a.young, mlewando, nfrayer, pgnd, pjones
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: xen-4.19.1-3.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-12 01:39:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrea Perotti 2025-01-04 12:47:51 UTC
In Fedora 41 on x86_64, `xen-hypervisor` package %post take care of copying needed multiboot2 modules (relocator.mod multiboot2.mod) into /boot/grub2/x86_64-efi to allow booting xen kernel in grub via module2 .

But that is not enough and a fresh F41 or an updated one fails to boot Xen kernel.

Reproducible: Always

Steps to Reproduce:
1. Update to F41 or Fresh Install
2. install Xen packages

This the situation on fs now:

[root@xen boot]# tree
.
├── config-6.12.7-200.fc41.x86_64
├── efi
│   └── EFI
│       ├── BOOT
│       │   ├── BOOTX64.EFI
│       │   └── fbx64.efi
│       └── fedora
│           ├── BOOTX64.CSV
│           ├── grub.cfg
│           ├── grubx64.efi
│           ├── mmx64.efi
│           ├── shim.efi
│           ├── shimx64.efi
├── flask
│   └── xenpolicy-4.19.0
├── grub2
│   ├── fonts
│   │   └── unicode.pf2
│   ├── grub.cfg
│   ├── grubenv
│   ├── i386-pc
│   │   ├── multiboot2.mod
│   │   └── relocator.mod
│   └── x86_64-efi
│       ├── multiboot2.mod
│       └── relocator.mod
├── initramfs-0-rescue-810ad643518a4741a5e22ed605b99e4f.img
├── initramfs-6.12.7-200.fc41.x86_64.img
├── loader
│   └── entries
│       ├── 810ad643518a4741a5e22ed605b99e4f-0-rescue.conf
│       └── 810ad643518a4741a5e22ed605b99e4f-6.12.7-200.fc41.x86_64.conf
├── symvers-6.12.7-200.fc41.x86_64.xz
├── System.map-6.12.7-200.fc41.x86_64
├── vmlinuz-0-rescue-810ad643518a4741a5e22ed605b99e4f
├── vmlinuz-6.12.7-200.fc41.x86_64
├── xen-4.19.0.config
└── xen-4.19.0.gz

13 directories, 30 files

3. reboot
4. try to boot "Fedora, with Xen 4.19.0 and Linux 6.12.7-200.fc41.x86_64"
Actual Results:  
Loading Xen 4.19.0 
error: ../grub-core/fs/fshelp.c:257:file `/grub2/x86_64-efi/elf.mod" not found. 
error: ../grub-core/script/function.c:119:can't find command `multiboot2". 

Loading Linux 6.12.7-200.fc41.x86_64 
error: ../../grub-core/script/function.c:119:can't find comnand `module2'. 

Loading initial ramdisk 
error: ../../grub-core/fs/fshelp.c:257:file `/grub2/x86_64-efi/elf.mod" not found.
error:../../grub-core/script/function.c:119:can't find comnand `module2'. 



Expected Results:  
Boot fine

Comment 2 Andrea Perotti 2025-01-04 13:23:56 UTC
I've installed rawhide and the problem is present there as well, with the difference that there was an additional error about "elf.mod"...

Adding elf.mod to "/boot/grub2/x86_64-efi/" fixed the issue.

Testing now here:
https://src.fedoraproject.org/fork/andreamtp/rpms/xen/commits/BZ2335558

Comment 3 Andrea Perotti 2025-01-04 13:51:41 UTC
Build works, tests are fine on both rawhide (it hangs when booting but its after grub, so from a test pov is passed) and F41 (no problem at all).

Sent a PR to address this:
https://src.fedoraproject.org/rpms/xen/pull-request/5

Unable to spot what has changed in grub2 and why now is also needed elf.mod.

Comment 4 Fedora Update System 2025-01-09 22:15:10 UTC
FEDORA-2025-933a9a977e (xen-4.19.1-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-933a9a977e

Comment 5 Fedora Update System 2025-01-10 03:13:02 UTC
FEDORA-2025-933a9a977e has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-933a9a977e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-933a9a977e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2025-01-12 01:39:46 UTC
FEDORA-2025-933a9a977e (xen-4.19.1-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.