summaryrefslogtreecommitdiffstats
path: root/globetrotter/make_live
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-05-25 08:35:52 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-05-25 08:35:52 +0000
commit5ef8a8df8100deeb736324ce7f8ea43281d2ec61 (patch)
tree5f976a5a7dd572b2108af8330a298b01f265a018 /globetrotter/make_live
parentb67c291105ddad6c511f1539306666bbc23985d0 (diff)
downloaddrakx-5ef8a8df8100deeb736324ce7f8ea43281d2ec61.tar
drakx-5ef8a8df8100deeb736324ce7f8ea43281d2ec61.tar.gz
drakx-5ef8a8df8100deeb736324ce7f8ea43281d2ec61.tar.bz2
drakx-5ef8a8df8100deeb736324ce7f8ea43281d2ec61.tar.xz
drakx-5ef8a8df8100deeb736324ce7f8ea43281d2ec61.zip
fix fs checking prior to restoration, thus handling restoration on
fscked hard disks
Diffstat (limited to 'globetrotter/make_live')
-rwxr-xr-xglobetrotter/make_live5
1 files changed, 5 insertions, 0 deletions
diff --git a/globetrotter/make_live b/globetrotter/make_live
index 5fd121369..52ed394f8 100755
--- a/globetrotter/make_live
+++ b/globetrotter/make_live
@@ -126,6 +126,11 @@ if ($rescue) {
my $root = find_partition("MDK-ROOT", @parts);
$root = find { $_->{device} eq "sda1" } @parts if is_empty_hash_ref($root);
die "I cannot find any hard disk to restore!" if is_empty_hash_ref($root) || !$root->{device};
+ print "\nPlease wait, disk is being checked, this can take quite some time\n\n";
+ run_program::run("e2fsck -C0 -y $_") foreach map {
+ my $p = find_partition($_, @parts);
+ if_($p, $p->{device}); # handle lost labels
+ } "MDK-PKGS", "MDK-HOME"; # MDK-ROOT"
print "Please wait, disk reinstallation is in progress, this can take quite some time\n";
print "Formating $root->{device}\n";
system("mkfs.ext2 -j /dev/$root->{device} > /dev/null\n");