#2692 Issue closed: Gentoo: mkisofs misses -e flag to create ISO for UEFI (using ebiso works)

Labels: support / question, fixed / solved / done

redglobuli opened issue at 2021-10-05 08:22:

Relax-and-Recover (ReaR) Issue Template

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 / Git

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

Gentoo Base System release 2.7

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

BACKUP=BAREOS
BAREOS_CLIENT=server-fd
OUTPUT_URL=nfs://192.168.212.8/mnt/array1/rear

  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):

Intel Server Bare Metal

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

UEFI / Grub 2.06

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

SSD / NVMe

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

/dev/sda 8:0 0 1.7T 0 disk
|-/dev/sda1 8:1 0 256M 0 part /boot
|-/dev/sda2 8:2 0 4G 0 part [SWAP]
`-/dev/sda3 8:3 0 1.7T 0 part /

  • Description of the issue (ideally so that others can reproduce it):

trying to rear mkrescue and upload the iso to a nfs share.

stopping with the following error:

2021-10-05 09:40:20.341110953 Including ISO UEFI boot (as triggered by USING_UEFI_BOOTLOADER=1)
Bad Option '-e' (error -1 BADFLAG).
Usage: mkisofs [options] [-find] file... [find expression]

mkisofs version: mkisofs 3.02a09 (x86_64-pc-linux-gnu) from app-cdr/cdrtools-3.02_alpha09-r3

  • Workaround, if any:

none, yet

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

posting down below

To paste verbatim text like command output or file content,
include it between a leading and a closing line of three backticks like

```
Relax-and-Recover 2.6 / Git
Running rear mkrescue (PID 19872)
Using log file: /var/log/rear/rear-server.log
Running workflow mkrescue on the normal/original system
Found EFI system partition /dev/sda1 on /boot type vfat
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Using autodetected kernel '/boot/vmlinuz-5.10.68-gentoo-dist' as kernel in the recovery system
Creating disk layout
Overwriting existing disk layout file /var/lib/rear/layout/disklayout.conf
Using guessed bootloader 'EFI' (found in first bytes on /dev/nvme0n1)
Verifying that the entries in /var/lib/rear/layout/disklayout.conf are correct ...
Creating recovery system root filesystem skeleton layout
Handling network interface 'br0'
br0 is a bridge
br0 has lower interface bond0
Couldn't determine if network interface 'bond0' is a Team, skipping.
bond0 is a bond
bond0 has lower interface eno0
eno0 is a physical device
bond0 has lower interface enp26s0f1
enp26s0f1 is a physical device
br0 has lower interface vnet21
br0 has lower interface vnet23
br0 has lower interface vnet24
br0 has lower interface vnet27
br0 has lower interface vnet28
br0 has lower interface vnet29
br0 has lower interface vnet7
Handled network interface 'br0'
Skipping 'virbr0': not bound to any physical interface.
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/gentoo/grubx64.efi' as UEFI bootloader file
Copying logfile /var/log/rear/rear-server.log into initramfs as '/tmp/rear-server-partial-2021-10-05T10:19:00+02:00.log'
Copying files and directories
Copying binaries and libraries
Copying all kernel modules in /lib/modules/5.10.68-gentoo-dist (MODULES contains 'all_modules')
Copying all files in /lib*/firmware/
Skip copying broken symlink '/etc/mtab' target '/proc/32207/mounts' on /proc/ /sys/ /dev/ or /run/
Symlink '/lib/modules/5.10.68-gentoo-dist/build' -> '/usr/src/linux-5.10.68-gentoo-dist' refers to a non-existing directory on the recovery system.
It will not be copied by default. You can include '/usr/src/linux-5.10.68-gentoo-dist' via the 'COPY_AS_IS' configuration variable.
Symlink '/lib/modules/5.10.68-gentoo-dist/source' -> '/usr/src/linux-5.10.68-gentoo-dist' refers to a non-existing directory on the recovery system.
It will not be copied by default. You can include '/usr/src/linux-5.10.68-gentoo-dist' via the 'COPY_AS_IS' configuration variable.
Testing that the recovery system in /tmp/rear.5qpEsuQcXMDtdIL/rootfs contains a usable system
There are binaries or libraries in the ReaR recovery system that need additional libraries
/usr/lib64/syslog-ng/loggen/libloggen_socket_plugin.so requires additional libraries
        libloggen_plugin-3.30.so.0 => not found
        libloggen_helper-3.30.so.0 => not found
/usr/lib64/syslog-ng/loggen/libloggen_ssl_plugin.so requires additional libraries
        libloggen_plugin-3.30.so.0 => not found
        libloggen_helper-3.30.so.0 => not found
ReaR recovery system in '/tmp/rear.5qpEsuQcXMDtdIL/rootfs' needs additional libraries, check /var/log/rear/rear-server.log for details
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (127325554 bytes) in 21 seconds
GRUB2 modules to load: fat part_gpt
Making ISO image
ERROR: Could not create ISO image (with /usr/bin/mkisofs)
Some latest log messages since the last called script 820_create_iso_image.sh:
        -UDF                    Generate UDF file system
        -dvd-audio              Generate DVD-Audio compliant UDF file system
        -dvd-video              Generate DVD-Video compliant UDF file system
        -dvd-hybrid             Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system
        -iso-level LEVEL        Set ISO9660 level (1..3) or 4 for ISO9660 v 2
        -V ID, -volid ID        Set Volume ID
        -graft-points           Allow to use graft points for filenames
        -M FILE, -prev-session FILE     Set path to previous session to merge
Aborting due to an error, check /var/log/rear/rear-server.log for details
Exiting rear mkrescue (PID 19872) and its descendant processes ...
Running exit tasks
You should also rm -Rf /tmp/rear.5qpEsuQcXMDtdIL
[1]    19872 terminated  rear -D mkrescue
```

jsmeix commented at 2021-10-06 11:22:

Because you use UEFI it may work for you to use "ebiso" instead of "mkisofs",
see usr/share/rear/conf/default.conf about "ebiso" and for an example see
usr/share/rear/conf/examples/SLE11-SLE12-SAP-HANA-UEFI-example.conf
but I cannot tell you where you could download "ebiso" binaries for Gentoo.

Alternatively use another ISO creation tool that supports UEFI
which is already ready-to-use provided by Gentoo
and then you may have to adapt
usr/share/rear/output/ISO/Linux-i386/820_create_iso_image.sh
so that your particular ISO creation tool is called with appropriate
command line options as needed for UEFI in your case.

redglobuli commented at 2021-10-11 08:27:

thanks for your answer, i downloaded the centos rpm from here
https://software.opensuse.org//download.html?project=Archiving%3ABackup%3ARear&package=ebiso
and did:

rpm2targz ebiso-0.1.4-1.el6.x86_64.rpm
tar xzfv ebiso-0.1.4-1.el6.x86_64.tar.gz
mkdir /opt/ebiso
mv usr/bin/ebiso /opt/ebiso/ebiso

and added the line

ISO_MKISOFS_BIN=/opt/ebiso/ebiso

to /etc/rear/local.conf

no complaining anymore and the iso is created and uploaded to my nfs share.

I'll start testing the created image now.

thanks again.

edit: latest rpm from here
https://software.opensuse.org//download.html?project=home%3Agozora&package=ebiso
seems to work too.

jsmeix commented at 2021-10-11 10:24:

@redgloboli
thank you for your explanatory feedback
what exact steps you did to make it work for you.
This could be helpful for other Gentoo users.


[Export of Github issue for rear/rear.]