diff options
author | Erik Troan <ewt@redhat.com> | 1999-12-27 20:25:52 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-12-27 20:25:52 +0000 |
commit | 40a7ac8a2d293dae57751cc7074372b786287425 (patch) | |
tree | 23f2020ca1c56bff720d3ee225d93b5d3a7bd0a5 | |
parent | 92660a36c7def307bb06319dcad468ba17199212 (diff) | |
download | anaconda-40a7ac8a2d293dae57751cc7074372b786287425.tar.gz anaconda-40a7ac8a2d293dae57751cc7074372b786287425.tar.xz anaconda-40a7ac8a2d293dae57751cc7074372b786287425.zip |
boot/root on raid should work now
-rw-r--r-- | fstab.py | 20 | ||||
-rw-r--r-- | isys/devnodes.c | 4 | ||||
-rw-r--r-- | iw/installpath.py | 1 | ||||
-rw-r--r-- | iw/lilo.py | 41 | ||||
-rw-r--r-- | textw/lilo.py | 3 | ||||
-rw-r--r-- | todo.py | 33 |
6 files changed, 67 insertions, 35 deletions
@@ -14,9 +14,6 @@ # we always store as much of the fstab within the disk druid structure # as we can -- Don't Duplicate Data. - #self.todo.setLiloLocation(("raid", liloBoot)) - #self.todo.instClass.addToSkipList("lilo") - import isys import iutil import os @@ -52,6 +49,23 @@ class Fstab: return None + def getMbrDevice(self): + return self.driveList()[0] + + def getBootDevice(self): + bootDevice = None + rootDevice = None + for (mntpoint, partition, fsystem, doFormat, size) in self.mountList(): + if mntpoint == '/': + rootDevice = partition + elif mntpoint == '/boot': + bootDevice = partition + + if not bootDevice: + bootDevice = rootDevice + + return bootDevice + def setDruid(self, druid, raid): self.ddruid = druid self.fsCache = {} diff --git a/isys/devnodes.c b/isys/devnodes.c index e713c7000..5ddbb64a9 100644 --- a/isys/devnodes.c +++ b/isys/devnodes.c @@ -46,6 +46,10 @@ int devMakeInode(char * devName, char * path) { char *ptr; char *dir; + printf("hi there jturner\n"); + mknod("/something", S_IFBLK | 0600, 0x800); + printf("mknod worked\n"); + if (devName[0] == 's' && devName[1] == 'd') { type = S_IFBLK; major = 8; diff --git a/iw/installpath.py b/iw/installpath.py index bcd856322..cc7150402 100644 --- a/iw/installpath.py +++ b/iw/installpath.py @@ -95,6 +95,7 @@ class InstallPathWindow (InstallWindow): def getNext(self): # This makes the error message delivery come at a sane place + print "here" if not self.todo.fstab: from fstab import GuiFstab diff --git a/iw/lilo.py b/iw/lilo.py index ca9b64f25..518e596ba 100644 --- a/iw/lilo.py +++ b/iw/lilo.py @@ -30,13 +30,13 @@ class LiloWindow (InstallWindow): else: self.todo.bootdisk = 0 - if self.lilo.get_active (): - self.todo.setLiloLocation (None) - else: - if self.mbr.get_active (): - self.todo.setLiloLocation ("mbr") - else: - self.todo.setLiloLocation ("partition") + if self.lilo.get_active (): + self.todo.setLiloLocation (None) + elif self.todo.allowLiloLocationConfig(): + if self.mbr.get_active (): + self.todo.setLiloLocation ("mbr") + else: + self.todo.setLiloLocation ("partition") self.todo.setLiloImages(self.images) @@ -59,9 +59,16 @@ class LiloWindow (InstallWindow): else: state = TRUE - for n in [self.radioBox, self.editBox, self.imageList ]: + for n in [self.mbr, self.part, self.appendEntry, self.editBox, + self.imageList, self.liloLocationBox, self.radioBox ]: n.set_sensitive (state) + if state and not self.todo.allowLiloLocationConfig(): + self.liloLocationBox.set_sensitive(0) + self.mbr.set_sensitive(0) + self.part.set_sensitive(0) + self.linearCheck.set_sensitive(0) + def labelUpdated(self, *args): index = self.imageList.selection[0] device = self.imageList.get_text(index, 1) @@ -117,7 +124,9 @@ class LiloWindow (InstallWindow): self.ignoreSignals = 0 if self.todo.fstab.mountList()[0][0] != '/': return None - (bootpart, boothd) = self.todo.getLiloOptions() + + bootpart = self.todo.fstab.getBootDevice() + boothd = self.todo.fstab.getMbrDevice() format = "/dev/%s" @@ -130,21 +139,29 @@ class LiloWindow (InstallWindow): label = GtkLabel(_("Install LILO boot record on:")) label.set_alignment(0.0, 0.5) - self.radioBox.attach(label, 0, 2, 1, 2) + self.liloLocationBox = GtkVBox (FALSE, 0) + self.liloLocationBox.pack_start(label) + self.radioBox.attach(self.liloLocationBox, 0, 2, 1, 2) self.mbr = GtkRadioButton(None, ("/dev/%s %s" % (boothd, _("Master Boot Record (MBR)")))) self.radioBox.attach(self.mbr, 1, 2, 2, 3) - part = GtkRadioButton(self.mbr, + self.part = GtkRadioButton(self.mbr, ("/dev/%s %s" % (bootpart, _("First sector of boot partition")))) - self.radioBox.attach(part, 1, 2, 3, 4) + self.radioBox.attach(self.part, 1, 2, 3, 4) self.linearCheck = GtkCheckButton( _("Use linear mode (needed for some SCSI drives)")) self.linearCheck.set_active(self.todo.liloLinear) self.radioBox.attach(self.linearCheck, 0, 2, 4, 5) + if not self.todo.allowLiloLocationConfig(): + self.liloLocationBox.set_sensitive(0) + self.mbr.set_sensitive(0) + self.part.set_sensitive(0) + self.linearCheck.set_sensitive(0) + label = GtkLabel(_("Kernel parameters") + ":") label.set_alignment(0.0, 0.5) self.appendEntry = GtkEntry() diff --git a/textw/lilo.py b/textw/lilo.py index d86996c1d..1e242772a 100644 --- a/textw/lilo.py +++ b/textw/lilo.py @@ -58,7 +58,8 @@ class LiloWindow: if mount != '/': return INSTALL_NOOP if todo.skipLilo: return INSTALL_NOOP - (bootpart, boothd) = todo.getLiloOptions() + bootpart = self.fstab.getBootDevice() + boothd = self.fstab.getMbrDevice() if (todo.getLiloLocation () == "mbr"): default = 0 @@ -376,24 +376,13 @@ class ToDo: def setTimezoneInfo(self, timezone, asUtc = 0, asArc = 0): self.timezone = (timezone, asUtc, asArc) - def getLiloOptions(self): - mountPoints = {} - for (mntpoint, device, fsystem, doFormat, size) in \ - self.fstab.mountList(): - mountPoints[mntpoint] = device - - if mountPoints.has_key ('/boot'): - bootpart = mountPoints['/boot'] - else: - bootpart = mountPoints['/'] - i = len (bootpart) - 1 - while i < 0 and bootpart[i] in digits: - i = i - 1 - drives = self.drives.available().keys() - drives.sort(isys.compareDrives) - boothd = drives[0] + def allowLiloLocationConfig(self): + bootDevice = self.fstab.getBootDevice() + if bootDevice[0:2] == "md": + self.setLiloLocation(("raid", bootDevice)) + return None - return (bootpart, boothd) + return 1 def setLiloImages(self, images): self.liloImages = images @@ -410,6 +399,10 @@ class ToDo: self.fstab.mountList(): mountsByDev[device] = mntpoint + for (mntpoint, device, fstype, raidType, start, size, makeup) in raid: + mountsByDev[device] = mntpoint + drives.append(device, "", 2, 0, 0) + oldImages = {} for dev in self.liloImages.keys(): oldImages[dev] = self.liloImages[dev] @@ -417,7 +410,7 @@ class ToDo: self.liloImages = {} foundDos = 0 for (dev, devName, type, start, size) in drives: - # ext2 partitions get listed if + # ext2 and raid partitions get listed if # 1) they're / # 2) they're not mounted @@ -559,7 +552,9 @@ class ToDo: os.rename(self.instPath + '/etc/lilo.conf', self.instPath + '/etc/lilo.conf.rpmsave') - (bootpart, boothd) = self.getLiloOptions() + bootpart = self.fstab.getBootDevice() + boothd = self.fstab.getMbrDevice() + if (type((1,)) == type(bootpart)): (kind, self.liloDevice) = bootpart elif (self.liloDevice == "mbr"): |