#2897 Issue closed
: ERROR: Failed to make bootable EFI image of GRUB2 on Oracle linux 8.7 (/usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist)¶
Labels: support / question
, fixed / solved / done
sk0al opened issue at 2022-12-13 16:31:¶
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
-
ReaR version ("/usr/sbin/rear -V"):
Relax-and-Recover 2.6 / 2020-06-17 -
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
Red Hat Enterprise Linux release 8.7 (Ootpa) -
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
grep -v ^# /etc/rear/local.conf
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib64/bind9-export:/usr/lib64/eog:/usr/lib64/python3.6/site-packages:/usr/lib64/samba:/usr/lib64/firefox:/usr/lib64/python3.6/site-packages/hawkey:/usr/lib64/mutter-4"
grep -v ^# /etc/rear/site.conf
OUTPUT=ISO
ISO_DIR=/db/var/tmp
BACKUP=NETFS
BACKUP_URL=file:///db/var/tmp
BACKUP_PROG_EXCLUDE+=( '/db/*' )
NETFS_PREFIX=image
NETFS_KEEP_OLD_BACKUP_COPY=y
AUTOEXCLUDE_DISKS=n
-
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
Dell esx VM -
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
x86_64 -
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
-
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
FC SAN -
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME KNAME PKNAME TRAN TYPE FSTYPE LABEL SIZE MOUNTPOINT
/dev/sda /dev/sda disk 32G
|-/dev/sda1 /dev/sda1 /dev/sda part vfat 600M /boot/efi
|-/dev/sda2 /dev/sda2 /dev/sda part xfs 1G /boot
`-/dev/sda3 /dev/sda3 /dev/sda part LVM2_member 30.4G
|-/dev/mapper/ol-root /dev/dm-0 /dev/sda3 lvm xfs 28.8G /
`-/dev/mapper/ol-swap /dev/dm-1 /dev/sda3 lvm swap 1.6G [SWAP]
/dev/sdb /dev/sdb disk LVM2_member 48G
`-/dev/mapper/vgdb-lvdb01 /dev/dm-2 /dev/sdb lvm xfs lvdb01 47G /db
/dev/sr0 /dev/sr0 sata rom 1024M
-
Description of the issue (ideally so that others can reproduce it):
rear -D -v mkbackup is failing. -
Workaround, if any:
-
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
[root@zzpos02 ~]# rear -Dv mkbackup
Relax-and-Recover 2.6 / 2020-06-17
Running rear mkbackup (PID 111361)
Using log file: /var/log/rear/rear-zzpos02.log
Running workflow mkbackup on the normal/original system
Using backup archive '/db/var/tmp/image/backup.tar.gz'
Found EFI system partition /dev/sda1 on /boot/efi type vfat
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Using autodetected kernel '/boot/vmlinuz-5.15.0-3.60.5.1.el8uek.x86_64' as kernel in the recovery system
Creating disk layout
Overwriting existing disk layout file /var/lib/rear/layout/disklayout.conf
Excluding component fs:/db
Using guessed bootloader 'EFI' (found in first bytes on /dev/sda)
Verifying that the entries in /var/lib/rear/layout/disklayout.conf are correct ...
Creating recovery system root filesystem skeleton layout
Handling network interface 'ens192'
ens192 is a physical device
Handled network interface 'ens192'
To log into the recovery system via ssh set up /root/.ssh/authorized_keys or specify SSH_ROOT_PASSWORD
Trying to find what to use as UEFI bootloader...
Trying to find a 'well known file' to be used as UEFI bootloader...
Using '/boot/efi/EFI/redhat/grubx64.efi' as UEFI bootloader file
Copying logfile /var/log/rear/rear-zzpos02.log into initramfs as '/tmp/rear-zzpos02-partial-2022-12-13T11:16:44-05:00.log'
Copying files and directories
Copying binaries and libraries
Copying all kernel modules in /lib/modules/5.15.0-3.60.5.1.el8uek.x86_64 (MODULES contains 'all_modules')
Copying all files in /lib*/firmware/
Skip copying broken symlink '/etc/mtab' target '/proc/122825/mounts' on /proc/ /sys/ /dev/ or /run/
Ignoring irrelevant broken symlink /usr/lib/modules/5.15.0-3.60.5.1.el8uek.x86_64/build
Ignoring irrelevant broken symlink /usr/lib/modules/5.15.0-3.60.5.1.el8uek.x86_64/source
Testing that the recovery system in /tmp/rear.8uHCjwrFQvp0OrX/rootfs contains a usable system
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (580158701 bytes) in 63 seconds
grub-mkstandalone may fail to make a bootable EFI image of GRUB2 (no /usr/*/grub*/x86_64-efi/moddep.lst file)
GRUB2 modules to load: fat part_gpt xfs
ERROR: Failed to make bootable EFI image of GRUB2 (error during grub-mkstandalone of /tmp/rear.8uHCjwrFQvp0OrX/tmp/mnt/EFI/BOOT/BOOTX64.efi)
Some latest log messages since the last called script 250_populate_efibootimg.sh:
'/boot/efi/EFI/redhat/grubx64.efi' -> '/tmp/rear.8uHCjwrFQvp0OrX/tmp/mnt/EFI/BOOT/BOOTX64.efi'
$gprobe --target=fs "$p"
$gprobe --target=partmap "$p" | sed -e 's/^/part_/'
$gprobe --target=abstraction "$p"
done | sort -u ))
2022-12-13 11:19:12.624288906 grub-mkstandalone may fail to make a bootable EFI image of GRUB2 (no /usr/*/grub*/x86_64-efi/moddep.lst file)
2022-12-13 11:19:12.629004392 GRUB2 modules to load: fat part_gpt xfs
grub-mkstandalone: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
Aborting due to an error, check /var/log/rear/rear-zzpos02.log for details
Exiting rear mkbackup (PID 111361) and its descendant processes ...
Running exit tasks
You should also rm -Rf --one-file-system /tmp/rear.8uHCjwrFQvp0OrX
[root@zzpos02 ~]# rpm -qa |grep grub
grub2-tools-efi-2.02-142.0.1.el8.x86_64
grubby-8.40-47.0.1.el8.x86_64
grub2-common-2.02-142.0.1.el8.noarch
grub2-tools-2.02-142.0.1.el8.x86_64
grub2-tools-minimal-2.02-142.0.1.el8.x86_64
grub2-tools-extra-2.02-142.0.1.el8.x86_64
grub2-efi-x64-2.02-142.0.1.el8.x86_64
# grep -i 'not found' /var/log/rear/rear-zzpos02.log
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: getty: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: dhcpcd: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: sedutil-cli: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: sedutil-cli: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: hpacucli: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: hpssacli: not found
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: ssacli: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: lilo: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: vol_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udev_volume_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: portmap: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: killall5: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: ifconfig: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: route: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: ifrename: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: nameif: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: klogd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: syslog-ng: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: syslogd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mingetty: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: getty: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: netstat: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: traceroute: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: xxd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: pico: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: nano: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: netcat: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: iptraf: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: joe: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: strace: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: rsync: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mkfs.ext4dev: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mkfs.jfs: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mkfs.reiserfs: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mkreiserfs: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: fsck.ext4dev: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: fsck.reiserfs: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: reiserfsck: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: tune4fs: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: jfs_tune: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: reiserfstune: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: logd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: initctl: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: strace: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mpath_wait: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: mount.file: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: umount.file: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: dhcpcd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: dhcp6c: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: dhclient6: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: systemd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: systemd-udevd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: systemd-journald: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: upstart-udev-bridge: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-bios-setup: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-install: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-mkconfig: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-mkdevicemap: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub2-mkdevicemap: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-mkimage: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-mkpasswd-pbkdf2: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-mkrelpath: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-reboot: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-set-default: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub-setup: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: grub2-setup: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: uefivars: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: edd_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: path_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: usb_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: vol_id: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udev: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevcontrol: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevd: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevsettle: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevstart: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevtest: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevtrigger: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: udevinfo: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: scsi_tur: not found
/usr/share/rear/build/default/990_verify_rootfs.sh: line 201: type: ldconfig.real: not found
sk0al commented at 2022-12-13 16:40:¶
I noticed I was getting a grub-mkstandalone error. Well there is no binary called grub-mkstandalone. Its grub2-mkstandalone and I do have the correct grub2 rpms installed. Thank you!
jsmeix commented at 2022-12-14 13:23:¶
@sk0al
as far as I see the actual (error) messages are
grub-mkstandalone may fail to make a bootable EFI image of GRUB2
(no /usr/*/grub*/x86_64-efi/moddep.lst file)
...
grub-mkstandalone: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. ...
so it seems a program named grub-mkstandalone
exists and is executed
but that fails with an error because there is no
/usr/lib/grub/x86_64-efi/modinfo.sh
and also some /usr/*/grub*/x86_64-efi/moddep.lst
file
is missing that is usually needed.
Similar as I wrote in
https://github.com/rear/rear/issues/2893#issuecomment-1337038775
you need to find out what RPM package provides
/usr/lib/grub/x86_64-efi/modinfo.sh
and then install that RPM package.
I am not a Red Hat user so I cannot check myself
how things are on Red Hat Enterprise Linux 8.7.
Because
grub-mkstandalone: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. ...
is the same error message as in
https://github.com/rear/rear/issues/2783
and that one is like "rhel centos fedora ... 8.5"
I guess your issue here is same as that one
so that
https://github.com/rear/rear/issues/2783#issuecomment-1085678921
should also help in your case here in particular because
it seems you don't have grub2-efi-x64-modules
installed
according to what you wrote
[root@zzpos02 ~]# rpm -qa |grep grub
grub2-tools-efi-2.02-142.0.1.el8.x86_64
grubby-8.40-47.0.1.el8.x86_64
grub2-common-2.02-142.0.1.el8.noarch
grub2-tools-2.02-142.0.1.el8.x86_64
grub2-tools-minimal-2.02-142.0.1.el8.x86_64
grub2-tools-extra-2.02-142.0.1.el8.x86_64
grub2-efi-x64-2.02-142.0.1.el8.x86_64
sk0al commented at 2022-12-14 14:39:¶
Once I installed the grub2-efi-x64-module rpm it started working. Thank you!
jsmeix commented at 2022-12-15 09:37:¶
@sk0al
thank you for your feedback that
https://github.com/rear/rear/issues/2783#issuecomment-1085678921
actually makes it work also for you.
There are so many Linux distributions each one with its own special
things
that it is impossible for us to imagine how ReaR behaves on each of
them
so we appreciate explicit feedback.
Only as a side note FYI:
I am wondering why you have in your /etc/rear/local.conf
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib64/bind9-export:/usr/lib64/eog:/usr/lib64/python3.6/site-packages:/usr/lib64/samba:/usr/lib64/firefox:/usr/lib64/python3.6/site-packages/hawkey:/usr/lib64/mutter-4"
Normally ReaR works without special LD_LIBRARY_PATH settings.
Only when some special third party backup tools are used
then some special LD_LIBRARY_PATH settings could be needed
but even then the needed LD_LIBRARY_PATH settings are usually
done automatically via predefined *_LD_LIBRARY_PATH
variables
in /usr/share/rear/conf/default.conf (see the descriptions there).
In general using LD_LIBRARY_PATH is known to cause troubles and
in particular export LD_LIBRARY_PATH="..."
is likely harmful.
In general regarding LD_LIBRARY_PATH see
https://github.com/rear/rear/issues/2674#issuecomment-935821409
and follow the links therein.
sk0al commented at 2022-12-15 14:05:¶
It was there initally for troubleshooting when I was reading the other issues documented here. I have since removed this LD_LIBRARY_PATH entry,
[Export of Github issue for rear/rear.]