summaryrefslogtreecommitdiffstats
path: root/fstab.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-01-08 23:51:15 +0000
committerMike Fulbright <msf@redhat.com>2001-01-08 23:51:15 +0000
commit5691c18b5d559d6cdf695ca376385007e574387e (patch)
tree194f3bd17d191a24f04c47e7687ba97986b56a02 /fstab.py
parent6f670ec8ae8d1a246c66954100236c90e23ea96c (diff)
downloadanaconda-5691c18b5d559d6cdf695ca376385007e574387e.tar.gz
anaconda-5691c18b5d559d6cdf695ca376385007e574387e.tar.xz
anaconda-5691c18b5d559d6cdf695ca376385007e574387e.zip
Added support for LBA32 when we right out lilo.conf iff we need it because boot partition is over 1023 cyl. Also added warning if you put boot > 1023 cyl and we dont seem to be able to detect edd support on this system
Diffstat (limited to 'fstab.py')
-rw-r--r--fstab.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/fstab.py b/fstab.py
index f38bfe00d..636ccd5dc 100644
--- a/fstab.py
+++ b/fstab.py
@@ -129,6 +129,41 @@ class Fstab:
else:
return None
+ def getBootPartitionMaxCyl(self):
+ bootpart = self.getBootDevice()
+ boothd = self.getMbrDevice()
+
+
+ maxcyl = None
+
+ try:
+ bootgeom = isys.getGeometry(boothd)
+ except:
+ bootgeom = None
+
+ log("Boot drive is %s, geometry is %s" % (boothd, bootgeom))
+ if bootgeom != None:
+ isys.makeDevInode(boothd, '/tmp/' + boothd)
+
+ try:
+ table = _balkan.readTable ('/tmp/' + boothd)
+ except SystemError:
+ pass
+ else:
+ for i in range (len (table)):
+ part = "%s%d" % (boothd, i+1)
+ if part == bootpart:
+ (type, sector, size) = table[i]
+ maxcyl = (sector+size) / string.atoi(bootgeom[2])
+ maxcyl = maxcyl / string.atoi(bootgeom[1])
+
+ log("Boot part ends on cyl %s" % maxcyl)
+
+ os.remove ('/tmp/' + boothd)
+
+ return maxcyl
+
+
def getMbrDevice(self):
return self.driveList()[0]