Red Hat Bugzilla – Bug 1479002
REAR "ERROR: Cannot find required programs: efibootmgr", after updating to 7.4.
Last modified: 2018-04-10 14:44:10 EDT
Description of problem: REAR "ERROR: Cannot find required programs: efibootmgr", after updating to 7.4. With 7.4 grub2-common is a new dependency that gets pulled in, which creates the /boot/efi/EFI/redhat directory on non-uefi installed machines. Version-Release number of selected component (if applicable): grub2-common-2.02-0.64.el7.noarch rear-2.00-2.el7.x86_64 Steps to Reproduce: ** First way 1. Install 7.4 and run # rear -v mkbackup ** Second way if on 7.3 or below. 1. Yum update grub2* and rear, then run # rear -v mkbackup Actual results: # rear -d -v mkbackup Relax-and-Recover 2.00 / Git Using log file: /var/log/rear/rear-ryan-rhel7.log ERROR: Cannot find required programs: efibootmgr Aborting due to an error, check /var/log/rear/rear-ryan-rhel7.log for details You should also rm -Rf /tmp/rear.3EZIbCfZn9geS4c Terminated Expected results: Continue with the backup and not terminate. Additional info: It looks like a similar issue has been reported upstream at https://github.com/rear/rear/issues/1239. But the fix for that issue doesn't work on 7.4, because it's only checking if the directory exist. It should be checking if /boot/efi is actually mounted. I did some testing, and the below change works correctly on non-uefi, and uefi based installs without any errors. diff -up /usr/share/rear/prep/default/310_include_uefi_tools.sh.bak /usr/share/rear/prep/default/310_include_uefi_tools.sh --- /usr/share/rear/prep/default/310_include_uefi_tools.sh.bak 2017-08-07 11:29:12.863665290 -0400 +++ /usr/share/rear/prep/default/310_include_uefi_tools.sh 2017-08-07 11:33:15.924439002 -0400 @@ -6,7 +6,7 @@ if grep -qw 'noefi' /proc/cmdline; then fi # next step, is checking /boot/efi directory (we need it) -if [[ ! -d /boot/efi ]]; then +if ! grep -q '/boot/efi' /proc/mounts; then return # must be mounted fi
Hello everyone, I have 2 different customers that have confirmed that the suggested workaround by Ryan (under Additional info section) works in their environment.
The customer on 01903555 also confirmed the workaround I proposed fixed their issue, is there anyway we can get a fix pushed quicker. This bug breaks rear backups completely on non-uefi systems?
Quick workaround without patching package files: install the dosfstools and efibootmgr packages. yum install dosfstools efibootmgr
*** Bug 1492190 has been marked as a duplicate of this bug. ***
(In reply to Ryan Blakley from comment #0) > # next step, is checking /boot/efi directory (we need it) > -if [[ ! -d /boot/efi ]]; then > +if ! grep -q '/boot/efi' /proc/mounts; then > return # must be mounted > fi I would suggest checking for the /sys/firmware/efi directory instead. This is created by the kernel only on systems with actual UEFI firmware. Even a non-UEFI system could mount a filesystem at /boot/efi so this is not a very reliable test. (I don't know _why_ someone would mount something here on a non-UEFI system, but I've seen weirder things. :-))
(In reply to Jeff Bastian from comment #31) > (In reply to Ryan Blakley from comment #0) > > # next step, is checking /boot/efi directory (we need it) > > -if [[ ! -d /boot/efi ]]; then > > +if ! grep -q '/boot/efi' /proc/mounts; then > > return # must be mounted > > fi > > > I would suggest checking for the /sys/firmware/efi directory instead. This > is created by the kernel only on systems with actual UEFI firmware. > > Even a non-UEFI system could mount a filesystem at /boot/efi so this is not > a very reliable test. (I don't know _why_ someone would mount something > here on a non-UEFI system, but I've seen weirder things. :-)) The latest fix no longer depends on the mount. My point for checking if it was mounted was due to the fact that rear depends on the efi files to be under /boot/efi. So if we only check if the directory exist, then the efi files may not be there if /boot/efi wasn't mounted. But again the upstream fixes rearrange the prep files to properly, and more cleanly fix this issue.
=================== Verified in: rear-2.00-4.el7 non-UEFI machine PASS =================== # cat /etc/rear/local.conf OUTPUT=ISO BACKUP=NETFS BACKUP_URL=nfs://localhost/mnt/rear/ # rear -v mkbackup Relax-and-Recover 2.00 / Git Using log file: /var/log/rear/rear-ibm-p8-kvm-06-guest-07.log Using backup archive 'backup.tar.gz' mkdir: created directory '/var/lib/rear/output' Creating disk layout Creating root filesystem layout Copying logfile /var/log/rear/rear-ibm-p8-kvm-06-guest-07.log into initramfs as '/tmp/rear-ibm-p8-kvm-06-guest-07-partial-2018-01-08T03:22:36-0500.log' Copying files and directories Copying binaries and libraries Copying kernel modules Creating initramfs Making ISO image Wrote ISO Image /var/lib/rear/output/rear-ibm-p8-kvm-06-guest-07.iso (80M) Copying resulting files to nfs location Saving /var/log/rear/rear-ibm-p8-kvm-06-guest-07.log as rear-ibm-p8-kvm-06-guest-07.log to nfs location Creating tar archive '/tmp/rear.GhQPqVERRYvBgLZ/outputfs/ibm-p8-kvm-06-guest-07/backup.tar.gz' Preparing archive operationOK Archived 1822 MiB in 248 seconds [avg 7524 KiB/sec] See output: http://lab-02.rhts.eng.bos.redhat.com/beaker/logs/tasks/66224+/66224272/TESTOUT.log =================== Reproduced in: rear-2.00-2.el7 non-UEFI machine FAIL =================== # cat /etc/rear/local.conf OUTPUT=ISO BACKUP=NETFS BACKUP_URL=nfs://localhost/mnt/rear/ # rear -v mkbackup Relax-and-Recover 2.00 / Git Using log file: /var/log/rear/rear-sheep-41.log Using backup archive 'backup.tar.gz' ERROR: Cannot find required programs: dosfsck efibootmgr Aborting due to an error, check /var/log/rear/rear-sheep-41.log for details
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-2018:1000