summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/gpt.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-07-05 16:25:28 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-07-05 16:41:48 +0200
commit767048570e8c44061cb0d6faf689698d3313870c (patch)
treedb8fe63269d6b36a45d224354f8c3d905e5326af /perl-install/partition_table/gpt.pm
parent71175c3d5deb4b9c3e14b609766112c4cecaba8c (diff)
downloaddrakx-767048570e8c44061cb0d6faf689698d3313870c.tar
drakx-767048570e8c44061cb0d6faf689698d3313870c.tar.gz
drakx-767048570e8c44061cb0d6faf689698d3313870c.tar.bz2
drakx-767048570e8c44061cb0d6faf689698d3313870c.tar.xz
drakx-767048570e8c44061cb0d6faf689698d3313870c.zip
prevent GPT partition to use the 33 last sectors
Resolves: mga#18666, mga#17796
Diffstat (limited to 'perl-install/partition_table/gpt.pm')
-rw-r--r--perl-install/partition_table/gpt.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 30a129772..5ef358e82 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -14,6 +14,12 @@ my $nb_primary = 128;
# See https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs for a list of exitings GUIDs
+sub last_usable_sector {
+ my ($hd) = @_;
+ #- do not use totalsectors because backup GPT is at end
+ $hd->{totalsectors} - 33;
+}
+
my %parted_mapping = (
'linux-swap(v1)' => 'swap',
'ntfs' => 'ntfs-3g',