summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-02-22 20:46:26 +0000
committerErik Troan <ewt@redhat.com>2001-02-22 20:46:26 +0000
commit0217e463e81b0da7b0ce05ec8faf9d7f87e49a47 (patch)
treeae94970cf74ba3f0766eeb77fd53ebc5e8e169e5
parent213c4241ed89208234764c4a790566247278e787 (diff)
downloadanaconda-0217e463e81b0da7b0ce05ec8faf9d7f87e49a47.tar.gz
anaconda-0217e463e81b0da7b0ce05ec8faf9d7f87e49a47.tar.xz
anaconda-0217e463e81b0da7b0ce05ec8faf9d7f87e49a47.zip
let rescue mode be more tolerant of mount failures
-rw-r--r--fstab.py5
-rw-r--r--rescue.py2
-rw-r--r--upgrade.py5
3 files changed, 7 insertions, 5 deletions
diff --git a/fstab.py b/fstab.py
index a0f25fbf3..03f78525c 100644
--- a/fstab.py
+++ b/fstab.py
@@ -799,7 +799,7 @@ class Fstab:
return 0
- def mountFilesystems(self, instPath):
+ def mountFilesystems(self, instPath, raiseErrors = 0):
if (not self.setupFilesystems): return
self.startExistingRaid()
@@ -820,12 +820,13 @@ class Fstab:
iutil.mkdirChain(instPath + mntpoint)
isys.mount(device, instPath + mntpoint, fstype = fsystem)
except SystemError, (errno, msg):
+ if raiseErrors:
+ raise SystemError, (errno, msg)
self.messageWindow(_("Error"),
_("Error mounting device %s as %s: %s\n\n"
"This most likely means this partition has "
"not been formatted.\n\nPress OK to reboot your "
"system.") % (device, mntpoint, msg))
-# raise SystemError, (errno, msg)
sys.exit(0)
try:
diff --git a/rescue.py b/rescue.py
index 255516e49..c4c7d803f 100644
--- a/rescue.py
+++ b/rescue.py
@@ -84,7 +84,7 @@ def runRescue(serial):
"automatically when you exit from the shell."),
[_("OK")] )
rootmounted = 1
- except SystemError, msg:
+ except SystemError:
ButtonChoiceWindow(screen, _("Rescue").
_("An error occured trying to mount some or all of your "
"system. Some of it may be mounted under /mnt/sysimage.\n\n"
diff --git a/upgrade.py b/upgrade.py
index 788734b82..e15f83637 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -72,7 +72,8 @@ def findExistingRoots (intf, theFstab):
win.pop ()
return rootparts
-def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0):
+def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0,
+ raiseErrors = 0):
(root, rootFs) = rootInfo
mdList = raid.startAllRaid(theFstab.driveList())
@@ -100,4 +101,4 @@ def mountRootPartition(intf, rootInfo, theFstab, instPath, allowDirty = 0):
"shut down cleanly to upgrade."))
sys.exit(0)
- theFstab.mountFilesystems (instPath)
+ theFstab.mountFilesystems (instPath, raiseErrors = raiseErrors)