summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r--perl-install/partition_table/gpt.pm6
1 files changed, 5 insertions, 1 deletions
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;
}