Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
On Fedora and RHEL systems, Grub2 UEFI modules live in /usr/lib/grub*/x86_64-efi, not /boot, unless grub2-install is executed, but executing this tool is not needed with UEFI at all.
Additionally, only UEFI modules should be looked for, so /boot cannot be
searched but only /boot/grub2/x86_64-efi (similarly /usr/lib/grub*/x86_64-efi), otherwise we could get some false positives on dual boot systems (UEFI + Legacy), since modules for Legacy will also match, which is wrong.
This is a backport request for PR #2199 (https://github.com/rear/rear/pull/2199)
This causes the following error when booting the ReaR ISO:
Unknown command 'configfile'.
error: ../../grub-core/kern/fs.c:120:unknown filesystem
Entering rescue mode...
grub rescue> _
Version-Release number of selected component (if applicable):
rear-2.4 (RHEL7 and RHEL8)
How reproducible:
Always with UEFI systems
Steps to Reproduce:
1. Install a UEFI system
2. Install and execute ReaR
# yum -y install rear
# rear -dD mkrescue
3. Check the ReaR log and search for "grub2-mkimage -v -O x86_64-efi"
# grep "grub2-mkimage -v -O x86_64-efi" /var/log/rear/rear-*.log
Actual results:
++ grub2-mkimage -v -O x86_64-efi -c /tmp/rear.BUo5lpm4WBrgx8w/tmp/mnt/EFI/BOOT/embedded_grub.cfg -o /tmp/rear.BUo5lpm4WBrgx8w/tmp/mnt/EFI/BOOT/BOOTX64.efi -p /EFI/BOOT
--> no module listed
Expected results:
++ grub2-mkimage -v -O x86_64-efi -c /tmp/rear.RhzDyyF3zXrQsWs/tmp/mnt/EFI/BOOT/embedded_grub.cfg -o /tmp/rear.RhzDyyF3zXrQsWs/tmp/mnt/EFI/BOOT/BOOTX64.efi -p /EFI/BOOT part_gpt part_msdos fat ext2 normal chain boot configfile linux jfs iso9660 usb usbms usb_keyboard video udf ntfs all_video gzio efi_gop reboot search test echo btrfs
--> modules being built into the image
Additional info:
The root cause is that only /boot is searched for Grub2 modules (ReaR tries to embed modules which do not exist on RHEL, see PR#2001). /usr/lib/grub*/x86_64-efi should be searched instead, and *only* this path (not /usr/lib/grub* globally).
(In reply to Pavel Cahyna from comment #1)
> Is it a new bug in ReaR 2.4? ISTR testing a restore on UEFI successfully
> with some previous ReaR version.
I was probably mistaken - I think I tested only a non-UEFI case because UEFI was harder to automate.
Hi Renaud, I made what I believe is an improvement upstream, because I find the current code very fragile, as it uses many assumptions on what modules to use and where to find them. It is https://github.com/rear/rear/pull/2293. Can you please review it? I would like to include it in the backport. It also fixes a related issue that GRUB_RESCUE is not working on UEFI (xfs is not among the default modules, so /boot can not be found).
I propose to change the summary to something like "Error when booting the ReaR ISO on UEFI: Unknown command 'configfile'", because the current summary is misleading after my fix.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1648