#214 Issue closed: openSUSE 12.3 genisoimage -efi-boot option missing

Labels: bug, documentation

gdha opened issue at 2013-03-26 08:41:

Cannot create a bootable UEFI ISO image on openSUSE 12.3 (and previous versions I guess) due to the fact that the -efi-boot option is missing in genisoimage executable.
Logged a bugzilla request at openSUSE:

https://bugzilla.novell.com/show_bug.cgi?id=811636

gdha commented at 2013-05-30 13:05:

paste from the bugzilla bug:

--- Comment #1 from Jörg Schiling <joerg.schilling@fokus.fraunhofer.de> 2013-05-16 16:01:01 UTC ---
genisoimage is unmaintained, use mkisofs and check the -eltorito-platform option

gdha commented at 2013-06-03 15:36:

The mkisofs (version 2.01, or genisoimage 1.1.11) command part of the cdrkit-cdrtools-compat-1.1.11-10.1.1.x86_64 (OpenSuse) RPM is not EFI aware. Too bad.

What the author suggests is to replace it with his sources (and recompile it), and use syntax like:

mkisofs -o "efi.iso" \
  -R -J -A "comment" \
  -hide-rr-moved \
  -v -d -N \
  -eltorito-catalog "[BOOT]/boot.catalog" \
  -eltorito-platform x86 -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-boot "isolinux/isolinux.bin" \
  -eltorito-alt-boot -eltorito-platform efi -no-emul-boot  \
  -eltorito-boot "$ESPIMG"
  ...

Not gonna do that as we cannot force the end-users to do such actions - we will mark it in our release notes as not (yet) supported on OpenSuse 12.x

dagwieers commented at 2013-06-05 08:47:

Can't we fall back to xorriso as an alternative ? Not sure what the state of EFI support is in xorriso, but xorriso for years has seen very active development.

gdha commented at 2013-07-03 06:32:

@dagwieers Is indeed a possibility - see https://lists.alioth.debian.org/pipermail/debburn-devel/2013-February/000903.html

gdha commented at 2013-11-07 13:28:

The bug report at Novell got assigned to the right person (after some private communication with my SuSe contacts)

gdha commented at 2014-02-04 16:02:

From the bugzilla report (see above):

--- Comment #13 from Jörg Schiling joerg.schilling@fokus.fraunhofer.de 2014-02-04 15:55:33 UTC ---
Just a note:

-eltorito-platform is not compatible to the patch avilable from RedHat
for an outdated mkisofs version that is distributed
under the name "genisoimage". It is howerver
compatible to the rest of mkisofs previous concepts.

As far as I understand, the RedHat option modified the main Eltorito entry
and is used instead of the normal boot option, but this is in conflict
with the Eltorito boot concept.

The option -eltorito-platform allows to start a new entry in a Eltorito
multi boot environment, making this entry of type "efi". The option
-eltorito-platform takes no parameter. After you specify it, you continue
with the standard Eltorito boot options.

The shell script mentioned in this bug calls "mkisofs" under this name
but expects behavior that is only available from a patched genisoimage.
To fix the problem, you need to do more than just to replace option names.

omeier commented at 2014-03-13 14:14:

@gdha
I tried using rear on an IBM server x3650M4 with UEFI runnig SLES11SP3 and elilo as bootloader. But it failed creating the boot ISO.
To me it looks like I ran into issue #214. What option do I have to get rear running?
I assume PXE boot and USB is possible. ISO doesn't work with SLES version of genisoimage/mkisofs. Am I right?
I still would like to use the ISO options. You mentioned compiling mkisofs with your sources could solve the problem. Is possible to get them? Or is it possible to use the Fedora/Ubuntu binary on SLES/OpenSUSE?
Kind regards, Otmar

backupserver:/ # rear -v mkrescue
Relax-and-Recover 1.15-git201402111621 / 2014-02-11
Using log file: /var/log/rear/rear-backupserver.log
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Making ISO image
ERROR: Could not create ISO image (with /usr/bin/mkisofs)
Aborting due to an error, check /var/log/rear/rear-backupserver.log for details
Terminated

/var/log/rear/rear-backupserver.log
...
2014-03-13 12:04:54 Starting '/usr/bin/mkisofs'
2014-03-13 12:04:54 Making ISO image
2014-03-13 12:04:54 Including ISO UEFI boot (as triggered by USING_UEFI_BOOTLOADER=1)
genisoimage: option '-e' is ambiguous
Usage: genisoimage [options] -o file directory ...
Use genisoimage -help
to get a list of valid options.
...

backupserver:/ # cat /etc/rear/site.conf
BACKUP=NETFS
OUTPUT=ISO
BACKUP_URL=nfs://dd990.fqdn/data/col1/rear/backup
OUTPUT_URL=nfs://dd990.fqdn/data/col1/rear/output
BACKUP_PROG=rsync
BACKUP_PROG_EXCLUDE=( '/tmp/' '/dev/shm/' '/nsr/cores/' '/nsr/index/' '/nsr_backup/*' )
USE_CFG2HTML=y
UEFI_BOOTLOADER=/boot/efi/efi/SuSE/elilo.efi
ISO_ISOLINUX_BIN="/usr/share/syslinux/isolinux.bin"

gdha commented at 2014-03-13 19:20:

@omeier You could download the latest sources from Jörg Schiling and use his mkisofs executable. Copy it over from another distro will probably not work.
Of course, you can still use OUTPUT=USB (or PXE) instead of OUTPUT=ISO which does not require mkisofs. However, I never tested PXE or USB with an UEFI capable system. You can test it out and you know it soon enough...

omeier commented at 2014-03-13 21:33:

@gdha
Thank you once again for your quick response. Soon time will come for some tests ;)
Otmar

gdha commented at 2014-10-28 08:32:

SLES12 contains SLES12-12-0 | genisoimage | 1.1.11-19.12 | x86_64 and mkisofs does not have the -eltorito-platform option on-board.
BTW, bug report https://bugzilla.novell.com/show_bug.cgi?id=811636 has been closed as the upstream mkisofs project of J. Schilling supports UEFI with the -eltorito-platform option.

pavoldomin commented at 2014-11-03 11:24:

Hi,

I face the same on SLES11SP3

# rpm -qf $(which mkisofs)
cdrkit-cdrtools-compat-1.1.8-3.32.3
# rpm -qf $(which genisoimage)
genisoimage-1.1.8-3.32.3
# ll /usr/bin/genisoimage /usr/bin/mkisofs
-rwxr-xr-x 1 root root 597048 Feb  4  2012 /usr/bin/genisoimage
lrwxrwxrwx 1 root root     11 May 26 14:53 /usr/bin/mkisofs -> genisoimage

Do I understand this correctly, the only solution would be to replace the SLES shipped mkisofs by the upstream mkisofs from J. Schilling to make this work? Or would there be some other workaround to recover the UEFI booting machine possible?

gdha commented at 2014-11-03 12:30:

@pavoldomin I'm afraid so. I understood that genisoimage is becoming obsolete, or at least un-maintained... I would be much easier if mkisofs would be a separate package, not?

pavoldomin commented at 2014-11-20 09:35:

Let me report about our tests here: we tried the approach described above (compiled mkisofs from J. Schilling). We were able to create rescue ISO now, with the following change in output/ISO/Linux-i386/82_create_iso_image.sh (I used Johannes Meixner ReaR fork with SuSE btrfs support, as mentioned in #497 ):

 #EFIBOOT="-eltorito-alt-boot -e boot/efiboot.img -no-emul-boot"
 EFIBOOT="-eltorito-platform efi -eltorito-boot boot/efiboot.img -no-emul-boot"

However I was not able to boot that ISO in UEFI mode anyway. Non-the-less, with the little manual work, we recovered system easily:

  1. one-time booted ISO in BIOS mode
  2. rear recover
  3. manually loaded UEFI in chroot (elilo is used on our system)
  4. rebooted system now from EFI (manually from EFI shell)
  5. restored the bootloader with yast (or efibootmgr).

My question is: would it possible to disable ReaR UEFI code in mkrescue in terms of config file (such that USING_UEFI_BOOTLOADER is not set)? I do not want to use upstream mkisofs, as it does not seem to work anyway. But without it I cannot create ISO at all, when I'm booted in EFI mode. Aim is to do all ReaR recovery in BIOS mode and switch back to EFI from the recovered system itself.

gdha commented at 2014-12-02 09:25:

@pavoldomin sure, good idea, if I find the time I'll add it in rear-1.17 + document this

gdha commented at 2015-02-06 19:59:

Need to add it in the release notes that OpenSuse ISO UEFI booting is not (yet) supported.

gdha commented at 2015-02-16 18:43:

moved the milestone to rear future as we hope that OpenSuSe fixes this finally in version ??

gdha commented at 2015-05-15 19:23:

See also issue #583

gdha commented at 2015-05-15 19:47:

@pavoldomin To come back to your test with a self-compiled mkisofs (EFI compliant) which did not work. This was not the fault of the mkisofs executable, but it was due to script /usr/share/rear/output/ISO/Linux-i386/25_populate_efibootimg.sh which relies on grub2-efi package and SLES is using elilo. Perhaps, being positive if mkisofs becomes EFI compliant on SuSe then we better split the populate script up in two (grub-efi and elilo).

gdha commented at 2015-05-16 06:56:

@pavoldomin Just inspected the openSUSE-13.2-DVD-x86_64.iso EFI content - it seems SuSe is using prefix=($root)/boot/x86_64/grub2-efi to boot an ISO image. elilo is just used to boot the HD.
ok, then the grub2-efi package becomes mandatory on SuSe architecture as well. Good to know. Suddenly, it becomes clear and easier to fix. A patched mkisofs would be nice if SuSe could deliver this a standard package instead of genisoimage (or give us the option to install this). It seems to be available in Opensuse-Factory 13.2

pavoldomin commented at 2015-06-04 13:19:

Indeed, so with the recent ReaR and mkisofs from J. Schilling we should be able to recover UEFI booting (and btrfs-based) SLES12 systems. We will definitely test this in some not so distant future. Our current approach is temporary legacy bios boot of the recovery image, or - when possible - just disable UEFI completely

kostgr commented at 2015-08-24 18:28:

I've tried to make UEFI ISO on openSuse 13.2 with the rear from the Archiving repository (http://download.opensuse.org/repositories/Archiving/openSUSE_13.2/ - reported version of rear is 1.17.1???) with the patch as stated by @pavoldomin on output/ISO/Linux-i386/82_create_iso_image.sh file.

I could create an ISO, but it can't be booted from (grub rescue console appears and I couldn't do anything with it - unknown filesystem on (cd0) => insmod iso9660 doesn't work as the most of the grub2 commands).

gdha commented at 2015-08-25 08:37:

@kostgr If you have a support contract with SLES - why don't you request a solution? It takes much too long and they do not listen to me...

kostgr commented at 2015-08-25 09:06:

@gdha Unfortunately I have no support contact with SLES - only login for openSuse. And the issue seems to be related to the grub installation on the disk image. I'm not so experienced with grub to check, whether it is the grub installatoin or iso image issue.

gdha commented at 2015-11-01 09:42:

@kostgr @pavoldomin @omeier @dagwieers @schlomo A possible solution is given at http://www.it3.be/2015/10/27/uefi-iso-boot-with-ebiso/


[Export of Github issue for rear/rear.]