summaryrefslogtreecommitdiffstats
path: root/bootloader.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-02 22:05:16 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-02 22:05:16 +0000
commit3ca6f2efd424677112cc8347dfb89dcad320ec4f (patch)
treeba601749b756c5e3443a30f49fce80594209379a /bootloader.py
parent7157a4ea77f0d3f8817ca7eb5c9c4a91f5d3f1fa (diff)
downloadanaconda-3ca6f2efd424677112cc8347dfb89dcad320ec4f.tar.gz
anaconda-3ca6f2efd424677112cc8347dfb89dcad320ec4f.tar.xz
anaconda-3ca6f2efd424677112cc8347dfb89dcad320ec4f.zip
fix another niggle and add the ia64 bits
Diffstat (limited to 'bootloader.py')
-rw-r--r--bootloader.py38
1 files changed, 36 insertions, 2 deletions
diff --git a/bootloader.py b/bootloader.py
index 8d1b4b5d8..bea8c6c2f 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -123,7 +123,7 @@ class BootImages:
if not self.images.has_key(self.default):
entry = fsset.getEntryByMountPoint('/')
self.default = entry.device.getDevice()
- (label, type) = self.images[self.default]
+ (label, longlabel, type) = self.images[self.default]
if not label:
self.images[self.default] = ("linux", "Red Hat Linux", type)
@@ -270,6 +270,28 @@ class bootloaderInfo:
self.useGrubVal = 0 # only used on x86
self.configfile = None
self.kernelLocation = "/boot/"
+
+class ia64BootloaderInfo(bootloaderInfo):
+ def writeLilo(self, instRoot, fsset, bl, langs, kernelList,
+ chainList, defaultDev, justConfig):
+ config = self.getBootloaderConfig(instRoot, fsset, bl, langs,
+ kernelList, chainList, defaultDev)
+ config.write(instRoot + self.configfile, perms = self.perms)
+
+ return ""
+
+ def write(self, instRoot, fsset, bl, langs, kernelList, chainList,
+ defaultDev, justConfig):
+ str = self.writeLilo(instRoot, fsset, bl, langs, kernelList,
+ chainList, defaultDev, justConfig)
+
+
+ def __init__(self):
+ bootloaderInfo.__init__(self)
+ self.useGrubVal = 1
+ self.kernelLocation = "/boot/efi"
+ self.configfile = "/boot/efi/elilo.conf"
+
class x86BootloaderInfo(bootloaderInfo):
def setUseGrub(self, val):
@@ -494,7 +516,10 @@ def writeBootloader(intf, instRoot, fsset, bl, langs, comps):
def makeInitrd (kernelTag, instRoot):
global initrdsMade
- initrd = "/boot/initrd%s.img" % (kernelTag, )
+ if iutil.getArch() == 'ia64':
+ initrd = "/boot/efi/initrd%s.img" % (kernelTag, )
+ else:
+ initrd = "/boot/initrd%s.img" % (kernelTag, )
if not initrdsMade.has_key(initrd) and flags.setupFilesystems:
iutil.execWithRedirect("/sbin/mkinitrd",
@@ -531,3 +556,12 @@ def grubbyPartitionName(dev):
break
return "(%s,%d)" % (grubbyDiskName(name), partNum)
+
+# return instance of the appropriate bootloader for our arch
+def getBootloader():
+ if iutil.getArch() == 'i386':
+ return x86BootloaderInfo()
+ elif iutil.getArch() == 'ia64':
+ return ia64BootloaderInfo()
+ else:
+ return bootloaderInfo()