diff --git a/frontend/grub-mkrescue-sed.sh b/frontend/grub-mkrescue-sed.sh index 73573333..d772ff22 100755 --- a/frontend/grub-mkrescue-sed.sh +++ b/frontend/grub-mkrescue-sed.sh @@ -145,6 +145,13 @@ then echo >&2 fi +# Check for option -iso_mbr_part_type which is new in 1.4.8 +iso_mbr_part_type= +if "$xorriso" -as mkisofs -help 2>&1 | grep iso_mbr_part_type >/dev/null +then + iso_mbr_part_type="-iso_mbr_part_type 0x00" +fi + # Look for the name of the /tmp directory with the GRUB2 files. # It is the next argument after -r. But as default accept any /tmp/grub.* next_is_dir=0 @@ -203,7 +210,7 @@ then efi_tmp_name=grub-mkrescue-sed-efi-img.$$ mv "$dir"/efi.img /tmp/$efi_tmp_name x=$(echo " $*" | sed \ - -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \ + -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/--protective-msdos-label/$protective/" \ @@ -213,7 +220,7 @@ elif test x"$mode" = xmbr_only_copy then # Exchange arguments for no-HFS MBR-only layout x=$(echo " $*" | sed \ - -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ + -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/--protective-msdos-label/$protective/" \ ) @@ -224,7 +231,7 @@ then efi_tmp_name=grub-mkrescue-sed-efi-img.$$ mv "$dir"/efi.img /tmp/$efi_tmp_name x=$(echo " $*" | sed \ - -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \ + -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$efi_tmp_name/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot/" \ -e "s/--protective-msdos-label/$protective/" \ ) @@ -233,7 +240,7 @@ elif test x"$mode" = xmbr_hfs_copy then # Exchange arguments for MBR and HFS+ layout x=$(echo " $*" | sed \ - -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ + -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_partition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ -e "s/--protective-msdos-label/$protective/" \ )