Description of problem:
rear fails while looking for efibootmgr and /boot/efi on ppc64/ppc64le which are not UEFI platforms.
~]# uname -i
~]# rear -dv mkbackup
ERROR: Cannot find required programs: efibootmgr
~]# rear -dv mkbackup
ERROR: Could not find a matching kernel in /boot/efi/efi/redhat !
This is because it assumes the system is a UEFI platform if the /boot/efi directory merely exists, however, the new grub2-common package in RHEL 7.4 creates this empty directory on all systems, regardless of firmware type. A better check would be to look for the /sys/firmware/efi directory.
~]# rpm -q grub2-common
~]# rpm -ql grub2-common | grep efi
~]# less /usr/share/rear/prep/default/310_include_uefi_tools.sh
# When /boot/efi is mounted we copy the UEFI binaries we might need
# If noefi is set, we can ignore UEFI altogether
if grep -qw 'noefi' /proc/cmdline; then
# next step, is checking /boot/efi directory (we need it)
if [[ ! -d /boot/efi ]]; then # <--- BUG
return # must be mounted
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run rear on non-UEFI platforms with an empty /boot/efi directory
rear fails trying to do UEFI-ish things
rear does not do UEFI-ish things on non-UEFI platforms
grub2-install had a similar problem, see bug 1443809
310_include_uefi_tools.sh is not the only file with this check:
~]# rpm -ql rear | xargs grep -l -- '-d /boot/efi' 2>/dev/null
There may be more files that need updates to look for /sys/firmware/efi instead of /boot/efi.
This is almost certainly a duplicate of bz1479002, please try the test build provided there.
(In reply to Jeff Bastian from comment #0)
> ~]# rear -dv mkbackup
> ERROR: Could not find a matching kernel in /boot/efi/efi/redhat !
It tries to find it there only if not found under /boot. If we remove the EFI part, it will just fail with an error message that it can not find a matching kernel under /boot. Where does one find the kernel on RS/6000 (or what machine is that)?
I was testing on a PowerNV (non-virt or bare metal) ppc64le system. The kernel is in the usual spot in /boot.
~]# ls /boot/vmlinuz*
Agreed, this is a dup of 1479002. Sorry for the noise!
*** This bug has been marked as a duplicate of bug 1479002 ***
BTW, the test build for bug 1479002 works on my test system, thanks!
[root@localhost ~]# rpm -q rear
[root@localhost ~]# rear -dv mkbackup
Relax-and-Recover 2.00 / Git
Using log file: /var/log/rear/rear-localhost.log
Creating disk layout
Creating root filesystem layout
Copying logfile /var/log/rear/rear-localhost.log into initramfs as '/tmp/rear-localhost-partial-2017-09-15T19:26:40-0400.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Making ISO image
Wrote ISO Image /var/lib/rear/output/rear-localhost.iso (163M)
You should also rm -Rf /tmp/rear.KOdGysGFQTwhSrQ