by wiping the partition table after the initial sanity checks regarding
minimal size and blocksize of the device, no data is destroyed for an
install that would fail in any case.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
die "unknown partition type '$ptype'"
if !($ptype eq '8E00' || $ptype eq '8300' || $ptype eq 'BF01');
- syscmd("sgdisk -Z ${target_dev}");
my $hdsize = hd_size($target_dev); # size in KB (1024 bytes)
my $restricted_hdsize_mb = 0; # 0 ==> end of partition
my $hdgb = int($hdsize/(1024*1024));
die "hardisk '$target_dev' too small (${hdgb}GB)\n" if $hdgb < 8;
+ syscmd("sgdisk -Z ${target_dev}");
+
# 1 - BIOS boot partition (Grub Stage2): first free 1M
# 2 - EFI ESP: next free 512M
# 3 - OS/Data partition: rest, up to $maxhdsize in MB