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:
Restoring a system having a software raid for /boot/efi, ReaR doesn't create the EFI entry, nor prints an error, even though an error pops up.
ReaR output:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# rear recover
[...]
Patching file 'boot/efi/EFI/redhat/grub.cfg'
Running mkinitrd...
Updated initrd with new drivers for kernel 3.10.0-1160.21.1.el7.x86_64.
Running mkinitrd...
Updated initrd with new drivers for kernel 3.10.0-1160.el7.x86_64.
Finished recovering your system. You can explore it under '/mnt/local'.
Exiting rear recover (PID 445) and its descendant processes
Running exit tasks
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Log: (showing an error)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# grep -w efibootmgr /var/log/rear/rear-*.log
2021-04-02 12:34:48.092498680 efibootmgr --create --gpt --disk /dev/md --part 125 --write-signature --label "RedHatEnterpriseServer 7" --loader "\EFI\redhat\shimx64.efi"
2021-04-02 12:34:48.096125963 Problem occurred with creating an efibootmgr entry
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
The issue is due to the code /usr/share/rear/finalize/Linux-i386/630_run_efibootmgr.sh not supporting Software Raid at all:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
9 Dev=$( get_device_name $BootEfiDev ) # /dev/sda1 or /dev/mapper/vol34_part2 or /dev/mapper/mpath99p4
10 ParNr=$( get_partition_number $Dev ) # 1 (must anyway be a low nr <9)
11 Disk=$( echo ${Dev%$ParNr} ) # /dev/sda or /dev/mapper/vol34_part or /dev/mapper/mpath99p
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Here above we have $BootEfiDev == /dev/md125. This ends up trying to open /dev/md (which doesn't exist).
With Software Raid, one of the members should be used instead, e.g. /dev/vda2.
The fact that no log is displayed is very problematic, it may end up in a Can't boot case.
Version-Release number of selected component (if applicable):
2.4 and Upstream one
How reproducible:
Always
Steps to Reproduce:
1. Install a VM with 2 disks in Software Raid
2. Take a backup
3. Try recovering
(In reply to Renaud Métrich from comment #1)
> See also https://github.com/rear/rear/issues/2595.
> On ReaR 2.6, the error is detected, because of *LogPrintError* being used
> instead of *LogIfError*
With ReaR 2.6 and CentOS 7, I noticed another strange behavior though: ReaR wants to use \EFI\centos\grubx64.efi as the bootloader, although the system is currently using \EFI\centos\shimx64.efi
Here's my attempt at a fix: https://github.com/rear/rear/pull/2608. Please review.
Note though that I haven't tested with the SECURE_BOOT_BOOTLOADER setting yet, and finalize/Linux-i386/610_EFISTUB_run_efibootmgr.sh needs the same 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 (rear bug fix and enhancement update), 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-2022:0069
Description of problem: Restoring a system having a software raid for /boot/efi, ReaR doesn't create the EFI entry, nor prints an error, even though an error pops up. ReaR output: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # rear recover [...] Patching file 'boot/efi/EFI/redhat/grub.cfg' Running mkinitrd... Updated initrd with new drivers for kernel 3.10.0-1160.21.1.el7.x86_64. Running mkinitrd... Updated initrd with new drivers for kernel 3.10.0-1160.el7.x86_64. Finished recovering your system. You can explore it under '/mnt/local'. Exiting rear recover (PID 445) and its descendant processes Running exit tasks -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Log: (showing an error) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # grep -w efibootmgr /var/log/rear/rear-*.log 2021-04-02 12:34:48.092498680 efibootmgr --create --gpt --disk /dev/md --part 125 --write-signature --label "RedHatEnterpriseServer 7" --loader "\EFI\redhat\shimx64.efi" 2021-04-02 12:34:48.096125963 Problem occurred with creating an efibootmgr entry -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The issue is due to the code /usr/share/rear/finalize/Linux-i386/630_run_efibootmgr.sh not supporting Software Raid at all: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 9 Dev=$( get_device_name $BootEfiDev ) # /dev/sda1 or /dev/mapper/vol34_part2 or /dev/mapper/mpath99p4 10 ParNr=$( get_partition_number $Dev ) # 1 (must anyway be a low nr <9) 11 Disk=$( echo ${Dev%$ParNr} ) # /dev/sda or /dev/mapper/vol34_part or /dev/mapper/mpath99p -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Here above we have $BootEfiDev == /dev/md125. This ends up trying to open /dev/md (which doesn't exist). With Software Raid, one of the members should be used instead, e.g. /dev/vda2. The fact that no log is displayed is very problematic, it may end up in a Can't boot case. Version-Release number of selected component (if applicable): 2.4 and Upstream one How reproducible: Always Steps to Reproduce: 1. Install a VM with 2 disks in Software Raid 2. Take a backup 3. Try recovering