From bc58011804080303cd6e3c15a3f39bc95c961431 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 3 Feb 2015 22:41:49 +0000 Subject: Fix GPT initialization on empty disk --- perl-install/NEWS | 1 + perl-install/install/NEWS | 1 + perl-install/partition_table/gpt.pm | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 802d30a49..e5c42f118 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -4,6 +4,7 @@ swap is 1/19th up to 4G and /home is the rest (12/19th) o https://ml.mageia.org/l/arc/dev/2014-12/msg00330.html - recognize new kernel-3.19 drivers +- fix GPT initialization on empty disk Version 16.50 - 9 January 2015 diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index ae674ff17..a73a53efc 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,5 @@ - default to GPT on disks larger than 4TB, not LVM +- fix GPT initialization on empty disk Version 16.51 - 3 February 2015 diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 04caf937e..170afc5ea 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -153,7 +153,11 @@ sub write { sub initialize { my ($class, $hd) = @_; - $hd->{primary} = { raw => [] }; + my @raw; + for (my $part_number = 0; $part_number < $nb_primary-1; $part_number++) { + $raw[$part_number] = { part_number => $part_number }; + } + $hd->{primary} = { raw => \@raw }; bless $hd, $class; } -- cgit v1.2.1