From 40d9bcb4e25b9525e9e325b9f011567dae2a9c6e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 26 Nov 2018 21:35:27 +0000 Subject: Improved control of isohybrid protective partition start and type. --- NEWS | 1 + lib/MGA/DrakISO/BuildISO.pm | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8a71fc0..7d3e705 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- improved control of isohybrid protective partition start and type - avoid full file path appearing in checksum files - undo accidental commit of changes to examples diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm index c905f1e..2711e4c 100644 --- a/lib/MGA/DrakISO/BuildISO.pm +++ b/lib/MGA/DrakISO/BuildISO.pm @@ -97,6 +97,12 @@ sub build_iso_image { my $iso_name = $build->get_name . '.iso'; + my $iso_part_start = $build->{media}{iso_part_start} || 0; + $iso_part_start == 0 || $iso_part_start == 1 + or die "ERROR: unsupported start sector for ISO protective partition\n"; + + my $iso_part_type = $build->{media}{iso_part_type} || '0x00'; + my $dest = $build_dir . '/' . $iso_name; my $xorriso_version = `xorriso -version 2> /dev/null | head -1`; @@ -130,8 +136,8 @@ sub build_iso_image { '--efi-boot', '--interval:appended_partition_2:all::', # for USB EFI boot '-part_like_isohybrid', - '-iso_mbr_part_type', '0x00', - if_($build->{media}{protect_sector_0} eq 'no', + '-iso_mbr_part_type', $iso_part_type, + if_($build->{media}{iso_part_start} == 1, '--protective-msdos-label', ), '-append_partition', 2, '0xef', $esp_image, -- cgit v1.2.1