summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-25 18:30:29 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-25 18:30:29 +0000
commit30f3dffc00bdc1582c74b8882c14e1b5c1260e55 (patch)
tree99b1fb8e98f3f1d43ac5bd2cfee8d79dffe64682 /rescue
parente95388927be1f0de67413bdb5430cf0031710f54 (diff)
downloaddrakx-30f3dffc00bdc1582c74b8882c14e1b5c1260e55.tar
drakx-30f3dffc00bdc1582c74b8882c14e1b5c1260e55.tar.gz
drakx-30f3dffc00bdc1582c74b8882c14e1b5c1260e55.tar.bz2
drakx-30f3dffc00bdc1582c74b8882c14e1b5c1260e55.tar.xz
drakx-30f3dffc00bdc1582c74b8882c14e1b5c1260e55.zip
fix mounting / (mga#3327)
Diffstat (limited to 'rescue')
-rw-r--r--rescue/NEWS1
-rwxr-xr-xrescue/guessmounts11
2 files changed, 9 insertions, 3 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index d47ea49e0..990543df2 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,4 +1,5 @@
- enable rescue through serial line (mga#2052)
+- fix mounting / (mga#3327)
- fix mounting / on LV
- fix mounting / on soft RAID or crypted LV (mga#3778 & mga#448)
- include xz for xz modules
diff --git a/rescue/guessmounts b/rescue/guessmounts
index f99586a63..10faa161a 100755
--- a/rescue/guessmounts
+++ b/rescue/guessmounts
@@ -55,7 +55,7 @@ if (@$raid_parts) {
}
my @fstab;
-my ($root, @roots);
+my ($root, $fs, @roots);
foreach (@$normal_parts) {
my $dev = devices::make($_->{device});
@@ -68,7 +68,7 @@ foreach (@$normal_parts) {
my $release = chomp_(cat_("$target$release_file"));
print STDERR "=> found a $release root partition on $dev\n=> type $fs, version `\n";
@fstab = fs::read_fstab($target, '/etc/fstab');
- push @roots, { dev => $dev, release => $release };
+ push @roots, { dev => $dev, release => $release, fs => $fs };
}
system('umount', $target) == 0 or die "error unmounting $target\n";
}
@@ -76,10 +76,15 @@ foreach (@$normal_parts) {
# Try Mageia first:
if (@roots) {
@roots = map { @$_ } partition { $_->{release} =~ /Mageia/ } @roots;
- $root = first(@roots)->{dev};
+ my $selected = first(@roots);
+ $root = $selected->{dev};
+ $fs = $selected->{fs};
+ print STDERR "=> Selecting $root as root fs\n";
}
if ($root) {
+ system("mount -t $fs $root $target 2>/dev/null");
+
print STDERR "\nMounting other partitions from fstab on $target...\n";
foreach (@fstab) {
my ($valued_options, $options) = fs::mount_options::unpack($_);