summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-01-11 22:56:00 +0000
committerMike Fulbright <msf@redhat.com>2001-01-11 22:56:00 +0000
commit5c96939d1b033a744cb9ad64416f188eadcf6eb8 (patch)
tree8106ea7c804158fb53a80a4a31ea19a6deb4080f
parent8ce4df95abe673ffa8b76c5f8957a45d1aa05c52 (diff)
downloadanaconda-5c96939d1b033a744cb9ad64416f188eadcf6eb8.tar.gz
anaconda-5c96939d1b033a744cb9ad64416f188eadcf6eb8.tar.xz
anaconda-5c96939d1b033a744cb9ad64416f188eadcf6eb8.zip
Made two different calls to get maxcyl of partitions, one for reading from drive directly, the other for getting it from the ddruid object. Added one entity to tuple returned from partitionList(), fixed up code to reflect change
-rw-r--r--fstab.py24
-rw-r--r--iw/rootpartition_gui.py3
-rw-r--r--lilo.py4
-rw-r--r--silo.py4
-rw-r--r--textw/partitioning_text.py2
5 files changed, 27 insertions, 10 deletions
diff --git a/fstab.py b/fstab.py
index 636ccd5dc..93b6f7bff 100644
--- a/fstab.py
+++ b/fstab.py
@@ -129,11 +129,14 @@ class Fstab:
else:
return None
- def getBootPartitionMaxCyl(self):
+ # returns max cylinder, starting counting from 1
+ # reads DIRECTLY from drive partition table, not the desired
+ # partition table we construct at the start of the install
+ # in disk druid/autopartitioning!!!
+ def getBootPartitionMaxCylFromDrive(self):
bootpart = self.getBootDevice()
boothd = self.getMbrDevice()
-
maxcyl = None
try:
@@ -157,12 +160,27 @@ class Fstab:
maxcyl = (sector+size) / string.atoi(bootgeom[2])
maxcyl = maxcyl / string.atoi(bootgeom[1])
- log("Boot part ends on cyl %s" % maxcyl)
+ log("Boot part %s ends on cyl %s" % (bootpart, maxcyl))
os.remove ('/tmp/' + boothd)
return maxcyl
+ # returns max cylinder, starting counting from 1
+ # this is read from the ddruid object of the partitioning scheme we
+ # are currently building up from disk druid/autopartitioning
+ # NOT guaranteed to be same as getBootPartitionMaxCylFromDrive() result
+ def getBootPartitionMaxCylFromDesired(self):
+ bootpart = self.getBootDevice()
+ boothd = self.getMbrDevice()
+ (drives, raid) = self.partitionList()
+
+ for (dev, devName, type, start, size, maxcyl) in drives:
+ if dev == bootpart:
+ log ("maxcyl of %s is %d" % (dev, maxcyl))
+ return maxcyl
+
+ return None
def getMbrDevice(self):
return self.driveList()[0]
diff --git a/iw/rootpartition_gui.py b/iw/rootpartition_gui.py
index 97d9d8217..746a8f6b7 100644
--- a/iw/rootpartition_gui.py
+++ b/iw/rootpartition_gui.py
@@ -390,10 +390,9 @@ class LBA32WarningWindow(InstallWindow):
if iutil.getArch() != "i386":
return INSTALL_NOOP
- if self.todo.fstab.getBootPartitionMaxCyl() > 1023:
+ if self.todo.fstab.getBootPartitionMaxCylFromDesired() > 1023:
vbox = GtkVBox (FALSE, 5)
-
if not self.todo.fstab.edd:
label = GtkLabel (
_("You have put the partition containing the kernel (the "
diff --git a/lilo.py b/lilo.py
index c969514e9..bec6d6473 100644
--- a/lilo.py
+++ b/lilo.py
@@ -275,9 +275,9 @@ class LiloConfiguration:
useLBA32 = 0
if self.edd:
from log import log
- maxcyl = fstab.getBootPartitionMaxCyl()
+ maxcyl = fstab.getBootPartitionMaxCylFromDrive()
if maxcyl > 1023:
- log("Using lba32")
+ log("Maximum cyling is %d, using lba32" % maxcyl)
useLBA32 = 1
if (self.liloDevice == "mbr"):
diff --git a/silo.py b/silo.py
index 74f3374c2..d4b7071d1 100644
--- a/silo.py
+++ b/silo.py
@@ -102,7 +102,7 @@ class SiloInstall:
self.siloImages = {}
nSolaris = 0
nSunOS = 0
- for (dev, devName, type, start, size) in drives:
+ for (dev, devName, type, start, size, maxcyl) in drives:
# ext2 and raid partitions get listed if
# 1) they're /
# 2) they're not mounted
@@ -152,7 +152,7 @@ class SiloInstall:
i = i - 1
boothd = bootpart[:i+1]
(drives, raid) = fstab.partitionList()
- for (dev, devName, type, start, size) in drives:
+ for (dev, devName, type, start, size, maxcyl) in drives:
i = len (dev) - 1
while i > 0 and dev[i] in string.digits:
i = i - 1
diff --git a/textw/partitioning_text.py b/textw/partitioning_text.py
index 8a341102f..830685947 100644
--- a/textw/partitioning_text.py
+++ b/textw/partitioning_text.py
@@ -351,7 +351,7 @@ class LBA32WarningWindow:
if iutil.getArch() != "i386":
return INSTALL_NOOP
- if todo.fstab.getBootPartitionMaxCyl() > 1023:
+ if todo.fstab.getBootPartitionMaxCylFromDesired() > 1023:
if not todo.fstab.edd:
rc = ButtonChoiceWindow(screen, _("Boot Partition Warning"),
_("You have put the partition containing the kernel (the "