From e30507dd968569203c870bb936852907f6b8a149 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 10 Apr 2017 09:58:55 +0200 Subject: [PATCH] Made -iso_mbr_part_type 0x00 default of grub-mkrescue-sed.sh mode "mbr_only" --- frontend/grub-mkrescue-sed.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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/" \ )