summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/fsedit.pm5
-rw-r--r--perl-install/partition_table.pm3
-rw-r--r--perl-install/partition_table/lvm.pm12
3 files changed, 14 insertions, 6 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index a8d5c3f33..adfc22f9d 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -178,11 +178,6 @@ sub get_hds {
push @raw_hds, $hd;
$hd = '';
1;
- } elsif ($type->{pt_type} == 0x8e) {
- #- LVM on full disk
- require partition_table::lvm;
- partition_table::lvm->initialize($hd);
- 1;
} else {
0;
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index a18dc0bb9..9a66afc50 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -230,7 +230,7 @@ sub read_primary {
#- but other sectors (typically for extended partition ones) have to match this type!
my @parttype = (
if_(arch() =~ /^ia64/, 'gpt'),
- arch() =~ /^sparc/ ? ('sun', 'bsd') : ('dos', 'bsd', 'sun', 'mac'),
+ arch() =~ /^sparc/ ? ('sun', 'bsd') : ('dos', 'lvm', 'bsd', 'sun', 'mac'),
);
foreach ('empty', @parttype, 'unknown') {
/unknown/ and die "unknown partition table format on disk " . $hd->{file};
@@ -238,6 +238,7 @@ sub read_primary {
# perl_checker: require partition_table::bsd
# perl_checker: require partition_table::dos
# perl_checker: require partition_table::empty
+ # perl_checker: require partition_table::lvm
# perl_checker: require partition_table::gpt
# perl_checker: require partition_table::mac
# perl_checker: require partition_table::sun
diff --git a/perl-install/partition_table/lvm.pm b/perl-install/partition_table/lvm.pm
index b0bc88cf3..0e8090772 100644
--- a/perl-install/partition_table/lvm.pm
+++ b/perl-install/partition_table/lvm.pm
@@ -23,3 +23,15 @@ sub initialize {
bless $hd, $class;
}
+
+sub read_primary {
+ my ($hd) = @_;
+
+ my $wanted = fs::type::type_name2subpart('Linux Logical Volume Manager');
+ my $type = fs::type::type_subpart_from_magic($hd);
+
+ $type && $type->{pt_type} == $wanted->{pt_type} or return;
+
+ partition_table::lvm->initialize($hd);
+ 1;
+}