grml2iso: disable UEFI mode by default, only enable for xorriso under according prere...
authorMichael Prokop <mika@grml.org>
Wed, 26 Jun 2013 14:06:49 +0000 (16:06 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 26 Jun 2013 14:12:42 +0000 (16:12 +0200)
Getting an error message like:

| isohybrid version supports --uefi option, enabling
| Creating dd-able ISO using isohybrid
| isohybrid: custom_grml.iso: unable to find efi image

is quite confusing, especially if the /efi/boot/bootx64.efi
and /boot/efi.img files are actually present on the image.

When using xorriso everything is fine, but when using genisoimage
within grml2iso the ISO lacks according UEFI support and the
above mention error message appears. So instead only enable UEFI
mode if building with xorriso and all the other prerequisites are
fulfilled as well.

grml2iso

index 31406c5..632806a 100755 (executable)
--- a/grml2iso
+++ b/grml2iso
@@ -179,7 +179,7 @@ Options:
 # efi boot {{{
   # default, independent of UEFI support
   BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"
-  UEFI_ENABLE=true
+  UEFI_ENABLE=false
 
   case "$MKISOFS" in
     xorriso*)
@@ -188,6 +188,7 @@ Options:
         echo "Disabling (U)EFI boot support since xorriso version is not recent enough."
       else
         echo "xorriso with -eltorito-alt-boot support present"
+        UEFI_ENABLE=true
 
         if ! [ -r "${WRKDIR}/cddir/boot/efi.img" ] ; then
           echo "Warning: File /boot/efi.img not found, not extending boot arguments for (U)EFI boot."
@@ -199,10 +200,7 @@ Options:
       fi
       ;;
     *)
-      if ! [ -r "${WRKDIR}/cddir/boot/efi.img" ] ; then
-        echo "Warning: File /boot/efi.img not found."
-        UEFI_ENABLE=false
-      fi
+      echo "Using $MKISOFS for ISO generation (lacking UEFI option), disabling (U)EFI boot support."
       ;;
   esac
 # }}}
@@ -284,7 +282,7 @@ Options:
 
 # make ISO dd-able {{{
   if ! $UEFI_ENABLE ; then
-    echo "Skipping check for --uefi option in isohybrid since /boot/efi.img does not exist."
+    echo "Skipping check for --uefi option in isohybrid since prerequisites are not fulfilled."
   else
     if ! isohybrid --help | grep -q -- --uefi ; then
       echo "isohybrid version does NOT support --uefi option, disabling"