summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs/partitioning.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/fs/partitioning.pm b/perl-install/fs/partitioning.pm
index b93d146b2..18fa7e114 100644
--- a/perl-install/fs/partitioning.pm
+++ b/perl-install/fs/partitioning.pm
@@ -5,12 +5,14 @@ use strict;
use common;
use fs::format;
+use fs::get;
use fs::type;
sub guess_partitions_to_format {
my ($fstab) = @_;
+ my $root_part = fs::get::root($fstab);
foreach (@$fstab) {
- $_->{mntpoint} = "swap" if isSwap($_);
+ $_->{mntpoint} = "swap" if isSwap($_) && ($_->{rootDevice} eq $root_part->{rootDevice} || !$_->{is_removable} && !$root_part->{is_removable});
$_->{mntpoint} or next;
add2hash_($_, { toFormat => $_->{notFormatted} }) if $_->{fs_type}; #- eg: do not set toFormat for isRawRAID (0xfd)