summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-01-23 21:01:32 +0000
committerMike Fulbright <msf@redhat.com>2001-01-23 21:01:32 +0000
commite08ff592837bfbea5f94a29a0f0038f438267708 (patch)
tree68d0542cb8505f443e0ea437f78eded48a44a0dc
parent1aae45d8ce07c079881c8815b657762ee216dbd8 (diff)
downloadanaconda-e08ff592837bfbea5f94a29a0f0038f438267708.tar.gz
anaconda-e08ff592837bfbea5f94a29a0f0038f438267708.tar.xz
anaconda-e08ff592837bfbea5f94a29a0f0038f438267708.zip
fixed so we just ignore RAID booting when doing maximum cylinder test, also fixed some problems in rescue mode
-rw-r--r--fstab.py18
-rw-r--r--iw/rootpartition_gui.py6
-rw-r--r--rescue.py9
-rw-r--r--textw/partitioning_text.py5
-rw-r--r--upgrade.py2
5 files changed, 33 insertions, 7 deletions
diff --git a/fstab.py b/fstab.py
index 8d878f78f..45bf62180 100644
--- a/fstab.py
+++ b/fstab.py
@@ -168,7 +168,12 @@ class Fstab:
bootpart = self.getBootDevice()
boothd = self.getMbrDevice()
- maxcyl = None
+ # for now just assume this will work on RAID systems, not simple to
+ # test at all
+ if bootpart[0:2] == "md":
+ return 0
+
+ maxcyl = 0
try:
bootgeom = isys.getGeometry(boothd)
@@ -204,14 +209,21 @@ class Fstab:
def getBootPartitionMaxCylFromDesired(self):
bootpart = self.getBootDevice()
boothd = self.getMbrDevice()
+
+ # for now just assume this will work on RAID systems, not simple to
+ # test at all
+ if bootpart[0:2] == "md":
+ return 0
+
+
(drives, raid) = self.partitionList()
for (dev, devName, type, start, size, maxcyl, preexist) in drives:
if dev == bootpart:
-# log ("maxcyl of %s is %d" % (dev, maxcyl))
+ log ("maxcyl of %s is %s" % (dev, maxcyl))
return maxcyl
- return None
+ return 0
def getMbrDevice(self):
return self.driveList()[0]
diff --git a/iw/rootpartition_gui.py b/iw/rootpartition_gui.py
index 775d25174..7a3a8aec2 100644
--- a/iw/rootpartition_gui.py
+++ b/iw/rootpartition_gui.py
@@ -7,6 +7,7 @@ import gui
from fdisk_gui import *
import isys
import iutil
+from log import log
CHOICE_FDISK = 1
CHOICE_DDRUID = 2
@@ -391,7 +392,10 @@ class LBA32WarningWindow(InstallWindow):
if iutil.getArch() != "i386":
return None
- if self.todo.fstab.getBootPartitionMaxCylFromDesired() > 1023:
+ maxcyl = self.todo.fstab.getBootPartitionMaxCylFromDesired()
+ log("Maximum cylinder is %s" % maxcyl)
+
+ if maxcyl > 1023:
vbox = GtkVBox (FALSE, 5)
if not self.todo.fstab.edd:
diff --git a/rescue.py b/rescue.py
index 0d21cf69d..a10efcc37 100644
--- a/rescue.py
+++ b/rescue.py
@@ -1,6 +1,6 @@
import upgrade
from snack import *
-from text import WaitWindow
+from text import WaitWindow, OkCancelWindow
from translate import _
import raid
import os
@@ -10,6 +10,13 @@ class RescueInterface:
def waitWindow(self, title, text):
return WaitWindow(self.screen, title, text)
+ def messageWindow(self, title, text, type = "ok"):
+ if type == "ok":
+ ButtonChoiceWindow(self.screen, _(title), _(text),
+ buttons = [ _("OK") ])
+ else:
+ return OkCancelWindow(self.screen, _(title), _(text))
+
def __init__(self, screen):
self.screen = screen
diff --git a/textw/partitioning_text.py b/textw/partitioning_text.py
index 77fd298d0..92ba573e4 100644
--- a/textw/partitioning_text.py
+++ b/textw/partitioning_text.py
@@ -4,6 +4,7 @@ import isys
from snack import *
from constants_text import *
from translate import _
+from log import log
class PartitionMethod:
def __call__(self, screen, todo):
@@ -360,7 +361,9 @@ class LBA32WarningWindow:
if iutil.getArch() != "i386":
return INSTALL_NOOP
- if todo.fstab.getBootPartitionMaxCylFromDesired() > 1023:
+ maxcyl = todo.fstab.getBootPartitionMaxCylFromDesired()
+ log("Maximum cylinder is %s" % maxcyl)
+ if maxcyl > 1023:
if not todo.fstab.edd:
rc = ButtonChoiceWindow(screen, _("Boot Partition Warning"),
_("You have put the partition containing the kernel (the "
diff --git a/upgrade.py b/upgrade.py
index c0c5f1715..1f17c300f 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -15,7 +15,7 @@ def findExistingRoots (intf, theFstab):
mdList = raid.startAllRaid(drives)
for dev in mdList:
- if theFstab.isValidExt2 (dev):
+ if fstab.isValidExt2 (dev):
try:
isys.mount(dev, '/mnt/sysimage', readOnly = 1)
except SystemError, (errno, msg):