From de8e97a540900e64701063a58c47d95017c62b11 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 8 Aug 2002 17:58:38 +0000 Subject: make sure fsck is called for ext3 partition (due to possible kernel panic on corrupted ext3 partition, even after mounting ext3, umounting and remounting ext2). --- perl-install/fs.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index f3b2c1733..63e03f542 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -711,7 +711,7 @@ sub mount { } elsif ($fs eq 'jfs' && !$rdonly) { #- needed if the system is dirty otherwise mounting read-write simply fails run_program::run("fsck.jfs", $dev) or die "fsck.jfs failed"; - } elsif ($fs eq 'ext2') { + } elsif ($fs eq 'ext2' || $fs eq 'ext3' && $::isInstall) { foreach ('-a', '-y') { run_program::run("fsck.ext2", $_, $dev); my $err = $?; @@ -723,19 +723,14 @@ sub mount { last; } } + # really mount as ext2 during install for speed up + $fs = 'ext2'; } if (member($fs, @fs_modules)) { eval { modules::load($fs) }; } elsif ($fs eq 'iso9660') { eval { modules::load('isofs') }; } - if ($fs eq 'ext3' && $::isInstall) { - # ext3 mount to use the journal - syscall_('mount', $dev, $where, $fs, $flag, $mount_opt) or die _("mounting partition %s in directory %s failed", $dev, $where) . " ($!)"; - syscall_('umount', $where); - # really mount as ext2 during install for speed up - $fs = 'ext2'; - } log::l("calling mount($dev, $where, $fs, $flag, $mount_opt)"); syscall_('mount', $dev, $where, $fs, $flag, $mount_opt) or die _("mounting partition %s in directory %s failed", $dev, $where) . " ($!)"; } else { -- cgit v1.2.1