summaryrefslogtreecommitdiffstats
path: root/silo.py
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-04 16:34:35 +0000
committerjakub <jakub>1999-10-04 16:34:35 +0000
commite6f04ab5542cd5ad05f8153aac3eaf59edefbcc6 (patch)
tree78efa26a9a31cb029dcd4ec19e0227b00779e4a2 /silo.py
parent6b1bc260c3f21f05874046edcf1d70d75e993a3e (diff)
downloadanaconda-e6f04ab5542cd5ad05f8153aac3eaf59edefbcc6.tar.gz
anaconda-e6f04ab5542cd5ad05f8153aac3eaf59edefbcc6.tar.xz
anaconda-e6f04ab5542cd5ad05f8153aac3eaf59edefbcc6.zip
Use start sector to find out in which partition if any is MBR located in.
Diffstat (limited to 'silo.py')
-rw-r--r--silo.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/silo.py b/silo.py
index 43812bbf2..c9b912ab1 100644
--- a/silo.py
+++ b/silo.py
@@ -88,7 +88,7 @@ class SiloInstall:
todo.liloImages = {}
nSolaris = 0
nSunOS = 0
- for (dev, devName, type) in drives:
+ for (dev, devName, type, start, size) in drives:
# ext2 partitions get listed if
# 1) they're /
# 2) they're not mounted
@@ -139,6 +139,27 @@ class SiloInstall:
return (bootpart, boothd)
+ def getSiloMbrDefault(self):
+ # Check partition at cylinder 0 on the boot disk
+ # is /, /boot or Linux swap
+ (bootpart, boothd) = self.getSiloOptions()
+ (drives, raid) = self.todo.ddruid.partitionList()
+ for (dev, devName, type, start, size) in drives:
+ i = len (dev) - 1
+ while i > 0 and dev[i] in string.digits:
+ i = i - 1
+ devhd = dev[:i+1]
+ if devhd == boothd and start == 0:
+ if type == 5:
+ return "mbr'"
+ elif type == 2:
+ if dev == bootpart:
+ return "mbr"
+ elif dev == self.todo.mounts['/'][0]:
+ return "mbr"
+ return "partition"
+ return "partition"
+
def hasUsableFloppy(self):
try:
f = open("/proc/devices", "r")