#2524 Issue closed: ERROR: Failed to make bootable EFI image of GRUB2 (/usr/lib/grub/x86_64-efi/modinfo.sh didn't exist because grub2-efi-x64-modules package missing)

Labels: support / question, fixed / solved / done

dcz01 opened issue at 2020-11-24 12:47:

ERROR: Failed to make bootable EFI image of GRUB2

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"):

NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

CentOS Linux release 8.2.2004 (Core)

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
OUTPUT_URL=file:///tmp/rear
#BACKUP=NETFS
BACKUP=TSM
#BACKUP_PROG=tar
#BACKUP_PROG_CRYPT_ENABLED=1
#BACKUP_PROG_CRYPT_KEY=<Verschluesselungskennwort>
#BACKUP_PROG_CRYPT_OPTIONS="/usr/bin/openssl aes-256-gcm -salt -k"
#BACKUP_PROG_DECRYPT_OPTIONS="/usr/bin/openssl aes-256-gcm -d -k"
#BACKUP_URL=nfs://<IP-Adresse oder DNS-Name>/<Freigabepfad>
#BACKUP_URL=cifs://<Server>/<Freigabe>
#BACKUP_OPTIONS="cred=/etc/rear/cifs,sec=ntlmsspi"
#BACKUP_TYPE=incremental
#FULLBACKUPDAY="Sat"
#BACKUP_PROG_EXCLUDE=( '/tmp/*' '/dev/shm/*' $VAR_DIR/output/\* '/opt/tivoli/tsm/rear/*' '/mnt/*' '/media/*' '/var/lib/pgsql/*/data/base/*' '/var/lib/pgsql/*/data/global/*' '/var/lib/pgsql/*/data/pg*/*' )
SSH_ROOT_PASSWORD='$6$CFQoHxuu57fA8oWc$RCLWE/ZiSlKFAjNADp6ob.feRYxy/zk1Hch/QK9awCMhtTwPmEdddza/w5WlpnK85pcCVhh/MJ4evHTg73sl//'
#NON_FATAL_BINARIES_WITH_MISSING_LIBRARY='/opt/tivoli/tsm/client/ba/bin/libvixMntapi.so.1.1.0'
BOOTLOADER="GRUB2-EFI"
#UEFI_BOOTLOADER="/boot/efi/EFI/centos/grubx64.efi"
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    Virtual Machine on VMware ESXi

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    UEFI with GRUB2

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    Local Disk

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  200G  0 disk
├─sda1   8:1    0  200M  0 part /boot/efi
├─sda2   8:2    0  500M  0 part /boot
├─sda3   8:3    0 97,7G  0 part /
├─sda4   8:4    0  7,9G  0 part [SWAP]
├─sda5   8:5    0    1M  0 part
└─sda6   8:6    0 93,8G  0 part /var/lib/pgsql
sr0     11:0    1  624M  0 rom
  • Description of the issue (ideally so that others can reproduce it):
[root@FBD01PSS ~]# rear -v mkrescue
Relax-and-Recover 2.6 / 2020-06-17
Running rear mkrescue (PID 532551)
Using log file: /var/log/rear/rear-FBD01PSS.log
Running workflow mkrescue on the normal/original system
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Using autodetected kernel '/boot/vmlinuz-4.18.0-193.28.1.el8_2.x86_64' as kernel in the recovery system
Creating disk layout
Overwriting existing disk layout file /var/lib/rear/layout/disklayout.conf
Using specified bootloader 'GRUB2-EFI'
Verifying that the entries in /var/lib/rear/layout/disklayout.conf are correct ...
Creating recovery system root filesystem skeleton layout
Adding biosdevname=0 to KERNEL_CMDLINE
Adding net.ifnames=0 to KERNEL_CMDLINE
Using '/boot/efi/EFI/centos/grubx64.efi' as UEFI bootloader file
Copying logfile /var/log/rear/rear-FBD01PSS.log into initramfs as '/tmp/rear-FBD01PSS-partial-2020-11-23T16:08:30+01:00.log'
Copying files and directories
Copying binaries and libraries
Copying all kernel modules in /lib/modules/4.18.0-193.28.1.el8_2.x86_64 (MODULES contains 'all_modules')
Copying all files in /lib*/firmware/
Broken symlink '/etc/grub2.cfg' in recovery system because 'readlink' cannot determine its link target
Broken symlink '/usr/lib/modules/4.18.0-193.28.1.el8_2.x86_64/build' in recovery system because 'readlink' cannot determine its link target
Broken symlink '/usr/lib/modules/4.18.0-193.28.1.el8_2.x86_64/source' in recovery system because 'readlink' cannot determine its link target
Testing that the recovery system in /tmp/rear.gYWaSSaJMarZWWg/rootfs contains a usable system
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (543328145 bytes) in 80 seconds
grub2-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 grub2-mkstandalone of /tmp/rear.gYWaSSaJMarZWWg/tmp/mnt/EFI/BOOT/BOOTX64.efi)
Some latest log messages since the last called script 250_populate_efibootimg.sh:
  mkdir: created directory '/tmp/rear.gYWaSSaJMarZWWg/tmp/mnt/EFI/BOOT/fonts'
  mkdir: created directory '/tmp/rear.gYWaSSaJMarZWWg/tmp/mnt/EFI/BOOT/locale'
  '/boot/efi/EFI/centos/grubx64.efi' -> '/tmp/rear.gYWaSSaJMarZWWg/tmp/mnt/EFI/BOOT/BOOTX64.efi'
  /usr/share/rear/lib/_input-output-functions.sh: line 476: type: grub-mkstandalone: not found
  /usr/share/rear/lib/_input-output-functions.sh: line 476: type: grub-probe: not found
  2020-11-23 16:10:50.300123883 grub2-mkstandalone may fail to make a bootable EFI image of GRUB2 (no /usr/*/grub*/x86_64-efi/moddep.lst file)
  2020-11-23 16:10:50.303031967 GRUB2 modules to load: fat part_gpt xfs
  grub2-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-FBD01PSS.log for details
Exiting rear mkrescue (PID 532551) and its descendant processes ...
Running exit tasks
Beendet



[root@fbd01pss ~]# ls /boot/efi/EFI/
BOOT  centos
[root@fbd01pss ~]# ls /boot/efi/EFI/BOOT/
BOOTX64.EFI  fbx64.efi
[root@fbd01pss ~]# ls /boot/efi/EFI/centos/
BOOTX64.CSV  fonts  grub.cfg  grubenv  grubx64.efi  mmx64.efi  shimx64-centos.efi  shimx64.efi
[root@fbd01pss ~]# ls /boot/efi/
EFI
  • Workaround, if any:
    None

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
    rear-FBD01PSS.log

jsmeix commented at 2020-11-25 10:14:

@pcahyna @rmetrich
because this issue is about grub2-mkstandalone (on CentOS 8)
could you have a look here (as far as time permits)?

rmetrich commented at 2020-11-25 12:05:

Hi @jsmeix ,
sorry for being silent these days/months and even maybe years, I'm busy with many other things and have no time left for ReaR, unfortunately.
Anyway the issue is due to not having installed grub2-efi-x64-modules package on the system.

dcz01 commented at 2020-11-25 12:57:

@rmetrich Thanks a lot for your short answer.
That was the right thing we where searching for.
I installed that package on our minimal installation of CentOS 8 and it worked fine.
Now we finally got an working ISO image.

jsmeix commented at 2020-11-25 13:23:

Special thanks to @rmetrich
who solved this issue even with no time left for ReaR!

@rmetrich
if you can solve issues within no time,
couldn't you just spend some more no time on ReaR
and have still all time left for your many other things?
;-))


[Export of Github issue for rear/rear.]