summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/fs/mount_options.pm2
-rw-r--r--perl-install/fs/type.pm4
-rw-r--r--perl-install/fsedit.pm2
4 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 38d55ac89..8cdead039 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -308,7 +308,7 @@ sub prepare_write_fstab {
my ($freq, $passno) =
exists $_->{freq} ?
($_->{freq}, $_->{passno}) :
- isTrueLocalFS($_) && $_->{options} !~ /encryption=/ && !$_->{is_removable} ?
+ isTrueLocalFS($_) && $_->{options} !~ /encryption=/ && (!$_->{is_removable} || member($_->{mntpoint}, fs::type::directories_needed_to_boot())) ?
(1, $_->{mntpoint} eq '/' ? 1 : loopback::carryRootLoopback($_) ? 0 : 2) :
(0, 0);
diff --git a/perl-install/fs/mount_options.pm b/perl-install/fs/mount_options.pm
index 117bbd0b2..77aef9aac 100644
--- a/perl-install/fs/mount_options.pm
+++ b/perl-install/fs/mount_options.pm
@@ -168,7 +168,7 @@ sub set_default {
my ($options, $unknown) = &unpack($part);
if (!$opts{ignore_is_removable} && $part->{is_removable}
- && !member($part->{mntpoint}, qw(/ /usr /var /boot))
+ && !member($part->{mntpoint}, fs::type::directories_needed_to_boot())
&& (!$part->{fs_type} || $part->{fs_type} eq 'auto' || $part->{fs_type} =~ /:/)) {
$options->{supermount} = $opts{useSupermount} && !($opts{useSupermount} eq 'magicdev' && $part->{media_type} eq 'cdrom');
$part->{fs_type} = !$options->{supermount} ? 'auto' :
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index a858556a6..57de303c3 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -369,3 +369,7 @@ sub check {
$fs_type eq "jfs" && $part->{size} < 16 << 11 and die N("You can not use JFS for partitions smaller than 16MB");
$fs_type eq "reiserfs" && $part->{size} < 32 << 11 and die N("You can not use ReiserFS for partitions smaller than 32MB");
}
+
+sub directories_needed_to_boot() {
+ qw(/ /usr /var /boot /tmp);
+}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index b9c63ba3e..e2bf8d955 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -416,7 +416,7 @@ Please be sure to add a /boot partition") if $mntpoint eq "/" && isLVM($part) &&
die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
if !isTrueLocalFS($part) && $mntpoint eq '/';
die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
- if !isTrueFS($part) && member($mntpoint, qw(/home /tmp /usr /var));
+ if !isTrueFS($part) && member($mntpoint, fs::type::directories_needed_to_boot());
die N("You can not use an encrypted file system for mount point %s", $mntpoint)
if $part->{options} =~ /encrypted/ && member($mntpoint, qw(/ /usr /var /boot));