This is one additional change that's needed for software raid for ppc on installation. This change is actually in booty, and will allow anaconda/booty to accurately write the yaboot.conf configuration file when the user has created more than one bootable PReP partition.
The code used to simply write: boot=/dev/<PReP partition>
With this new functionality, a list is created containing any PReP partitions that are flagged for formatting. And that list is written to the boot= line of yaboot.conf.
Credit where credit is due... Peter Jones developed this version of the patch. (My original didn't work). I've tested it and it writes boot=<dev list> to yaboot.conf accurately.
(Slight munging may be necessary--this patch is against booty as of RHEL4).
:-Dustin
--- booty-0.44/checkbootloader.py 2005-06-14 15:35:38.000000000 -0400 +++ booty-0.44-raid/checkbootloader.py 2005-06-14 15:35:39.000000000 -0400 @@ -75,8 +75,6 @@ dev = string.split(field, '[')[0] if len(dev) == 0: continue - disk = getDiskPart(dev)[0] - rc.append(disk)
return rc
@@ -117,6 +115,14 @@ dev = string.replace(dev, "'", "") return dev
+def getBootDevList(line): + devs = string.split(line, '=')[1] + rets = [] + for dev in devs: + dev = getBootDevString("=%s" % (dev,)) + rets.append(dev) + return string.join(rets) + def getBootloaderTypeAndBoot(instRoot = "/"): haveGrubConf = 1 haveLiloConf = 1 @@ -177,7 +183,7 @@ lines = f.readlines() for line in lines: if line[0:5] == "boot=": - bootDev = getBootDevString(line) + bootDev = getBootDevList(line)
if bootDev: return ("YABOOT", bootDev) --- booty-0.44/bootloaderInfo.py 2004-10-04 12:51:41.000000000 -0400 +++ booty-0.44-raid/bootloaderInfo.py 2005-06-14 15:32:30.000000000 -0400 @@ -1501,12 +1501,21 @@
class ppcBootloaderInfo(bootloaderInfo): + def getPrepBootDevs(self, fs): + import fsset + devs = [] + for entry in fs.entries: + if isinstance(entry.fsystem, fsset.prepbootFileSystem) \ + and entry.format: + devs.append('/dev/%s' % (entry.device.getDevice(),)) + return devs + def writeYaboot(self, instRoot, fsset, bl, langs, kernelList, chainList, defaultDev, justConfigFile):
from flags import flags
- yabootTarget = '/dev/%s' %(bl.getDevice()) + yabootTarget = string.join(self.getPrepBootDevs(fsset))
bootDev = fsset.getEntryByMountPoint("/boot") if bootDev:
ack or no-ack? Opinions anyone?
:-Dustin
On 6/15/05, Dustin Kirkland dustin.kirkland@us.ibm.com wrote:
This is one additional change that's needed for software raid for ppc on installation. This change is actually in booty, and will allow anaconda/booty to accurately write the yaboot.conf configuration file when the user has created more than one bootable PReP partition.
The code used to simply write: boot=/dev/<PReP partition>
With this new functionality, a list is created containing any PReP partitions that are flagged for formatting. And that list is written to the boot= line of yaboot.conf.
Credit where credit is due... Peter Jones developed this version of the patch. (My original didn't work). I've tested it and it writes boot=<dev list> to yaboot.conf accurately.
(Slight munging may be necessary--this patch is against booty as of RHEL4).
:-Dustin
--- booty-0.44/checkbootloader.py 2005-06-14 15:35:38.000000000 -0400 +++ booty-0.44-raid/checkbootloader.py 2005-06-14 15:35:39.000000000 -0400 @@ -75,8 +75,6 @@ dev = string.split(field, '[')[0] if len(dev) == 0: continue
disk = getDiskPart(dev)[0]
rc.append(disk)
return rc
@@ -117,6 +115,14 @@ dev = string.replace(dev, "'", "") return dev
+def getBootDevList(line):
- devs = string.split(line, '=')[1]
- rets = []
- for dev in devs:
dev = getBootDevString("=%s" % (dev,))
rets.append(dev)
- return string.join(rets)
def getBootloaderTypeAndBoot(instRoot = "/"): haveGrubConf = 1 haveLiloConf = 1 @@ -177,7 +183,7 @@ lines = f.readlines() for line in lines: if line[0:5] == "boot=":
bootDev = getBootDevString(line)
bootDev = getBootDevList(line) if bootDev: return ("YABOOT", bootDev)
--- booty-0.44/bootloaderInfo.py 2004-10-04 12:51:41.000000000 -0400 +++ booty-0.44-raid/bootloaderInfo.py 2005-06-14 15:32:30.000000000 -0400 @@ -1501,12 +1501,21 @@
class ppcBootloaderInfo(bootloaderInfo):
def getPrepBootDevs(self, fs):
import fsset
devs = []
for entry in fs.entries:
if isinstance(entry.fsystem, fsset.prepbootFileSystem) \
and entry.format:
devs.append('/dev/%s' % (entry.device.getDevice(),))
return devs
def writeYaboot(self, instRoot, fsset, bl, langs, kernelList, chainList, defaultDev, justConfigFile):
from flags import flags
yabootTarget = '/dev/%s' %(bl.getDevice())
yabootTarget = string.join(self.getPrepBootDevs(fsset)) bootDev = fsset.getEntryByMountPoint("/boot") if bootDev:
BodyID:138912578.2.n.logpart (stored separately)
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
Bueller? Bueller? Bueller?
---------- Forwarded message ---------- From: Dustin kirkland dustin.kirkland@gmail.com Date: Jun 22, 2005 4:22 PM Subject: Re: PATCH - software raid for ppc on installation (booty) To: anaconda-devel-list@redhat.com
ack or no-ack? Opinions anyone?
:-Dustin
On 6/15/05, Dustin Kirkland dustin.kirkland@us.ibm.com wrote:
This is one additional change that's needed for software raid for ppc on installation. This change is actually in booty, and will allow anaconda/booty to accurately write the yaboot.conf configuration file when the user has created more than one bootable PReP partition.
The code used to simply write: boot=/dev/<PReP partition>
With this new functionality, a list is created containing any PReP partitions that are flagged for formatting. And that list is written to the boot= line of yaboot.conf.
Credit where credit is due... Peter Jones developed this version of the patch. (My original didn't work). I've tested it and it writes boot=<dev list> to yaboot.conf accurately.
(Slight munging may be necessary--this patch is against booty as of RHEL4).
:-Dustin
--- booty-0.44/checkbootloader.py 2005-06-14 15:35:38.000000000 -0400 +++ booty-0.44-raid/checkbootloader.py 2005-06-14 15:35:39.000000000 -0400 @@ -75,8 +75,6 @@ dev = string.split(field, '[')[0] if len(dev) == 0: continue
disk = getDiskPart(dev)[0]
rc.append(disk)
return rc
@@ -117,6 +115,14 @@ dev = string.replace(dev, "'", "") return dev
+def getBootDevList(line):
- devs = string.split(line, '=')[1]
- rets = []
- for dev in devs:
dev = getBootDevString("=%s" % (dev,))
rets.append(dev)
- return string.join(rets)
def getBootloaderTypeAndBoot(instRoot = "/"): haveGrubConf = 1 haveLiloConf = 1 @@ -177,7 +183,7 @@ lines = f.readlines() for line in lines: if line[0:5] == "boot=":
bootDev = getBootDevString(line)
bootDev = getBootDevList(line) if bootDev: return ("YABOOT", bootDev)
--- booty-0.44/bootloaderInfo.py 2004-10-04 12:51:41.000000000 -0400 +++ booty-0.44-raid/bootloaderInfo.py 2005-06-14 15:32:30.000000000 -0400 @@ -1501,12 +1501,21 @@
class ppcBootloaderInfo(bootloaderInfo):
def getPrepBootDevs(self, fs):
import fsset
devs = []
for entry in fs.entries:
if isinstance(entry.fsystem, fsset.prepbootFileSystem) \
and entry.format:
devs.append('/dev/%s' % (entry.device.getDevice(),))
return devs
def writeYaboot(self, instRoot, fsset, bl, langs, kernelList, chainList, defaultDev, justConfigFile):
from flags import flags
yabootTarget = '/dev/%s' %(bl.getDevice())
yabootTarget = string.join(self.getPrepBootDevs(fsset)) bootDev = fsset.getEntryByMountPoint("/boot") if bootDev:
BodyID:138912578.2.n.logpart (stored separately)
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
On Wed, 2005-06-15 at 17:28 -0400, Dustin Kirkland wrote:
--- booty-0.44/checkbootloader.py 2005-06-14 15:35:38.000000000 -0400 +++ booty-0.44-raid/checkbootloader.py 2005-06-14 15:35:39.000000000 -0400 @@ -75,8 +75,6 @@ dev = string.split(field, '[')[0] if len(dev) == 0: continue
disk = getDiskPart(dev)[0]
rc.append(disk)
return rc
Just to be sure, since this change isn't in my rhel4 tree (which I think some of this code came from originally), is some of the anaconda code you've got on ppc calling getRaidDisks in a way that it wasn't before? If so, it needs to passing in the (newish) optional third param "stripPart=0".
( ...sentence fragment on top of post to annoy Peter, good stuff follows... )
On Wed, 2005-06-29 at 15:33 -0400, Peter Jones wrote:
Just to be sure, since this change isn't in my rhel4 tree (which I think some of this code came from originally), is some of the anaconda code you've got on ppc calling getRaidDisks in a way that it wasn't before? If so, it needs to passing in the (newish) optional third param "stripPart=0".
A quick perusal of the files I changed reveals only:
checkbootloader.py:90: bootDevs = getRaidDisks(bootDev[5:])
Which shouldn't present a problem and it's not within the code my patches modified.
:-Dustin
anaconda-devel@lists.stg.fedoraproject.org