summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2015-02-03 22:41:49 +0000
committerPascal Terjan <pterjan@gmail.com>2015-02-03 22:41:49 +0000
commitbc58011804080303cd6e3c15a3f39bc95c961431 (patch)
treed6e7ff981c6969dbf33d24d5db0b2915eed979c8
parent586710269d03201dcc2b698376e6f332c971825b (diff)
downloaddrakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar
drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.gz
drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.bz2
drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.xz
drakx-bc58011804080303cd6e3c15a3f39bc95c961431.zip
Fix GPT initialization on empty disk
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/partition_table/gpt.pm6
3 files changed, 7 insertions, 1 deletions
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;
}