diff options
Diffstat (limited to 'booty')
-rw-r--r-- | booty/alpha.py | 2 | ||||
-rw-r--r-- | booty/bootloaderInfo.py | 12 | ||||
-rw-r--r-- | booty/ppc.py | 11 | ||||
-rw-r--r-- | booty/s390.py | 7 | ||||
-rw-r--r-- | booty/sparc.py | 4 | ||||
-rw-r--r-- | booty/x86.py | 6 |
6 files changed, 15 insertions, 27 deletions
diff --git a/booty/alpha.py b/booty/alpha.py index e137cdd13..29b284099 100644 --- a/booty/alpha.py +++ b/booty/alpha.py @@ -17,7 +17,7 @@ class alphaBootloaderInfo(bootloaderInfo): def writeAboot(self, instRoot, bl, kernelList, chainList, defaultDev, justConfig): - rootDevice = self.storage.fsset.mountpoints["/"] + rootDevice = self.storage.fsset.rootDevice try: bootDevice = self.storage.fsset.mountpoints["/boot"] except KeyError: diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py index 5509c7681..0a32880ed 100644 --- a/booty/bootloaderInfo.py +++ b/booty/bootloaderInfo.py @@ -251,12 +251,9 @@ class BootImages: if self.partedFlags[parted.PARTITION_BOOT]: retval.append((part, type)) - try: - rootDevice = storage.fsset.mountpoints["/"] - except KeyError: - rootDevice = None + rootDevice = storage.fsset.rootDevice - if not rootDevice or not rootDevice.format.bootable: + if not rootDevice or not rootDevice.format: raise ValueError, ("Trying to pick boot devices but do not have a " "sane root partition. Aborting install.") @@ -343,10 +340,7 @@ class bootloaderInfo: lilo.addEntry("prompt", replace = 0) lilo.addEntry("timeout", self.timeout or "20", replace = 0) - try: - rootDev = self.storage.fsset.mountpoints["/"] - except KeyError: - raise RuntimeError, "Installing lilo, but there is no root device" + rootDev = self.storage.fsset.rootDevice if rootDev == defaultDev: lilo.addEntry("default", kernelList[0][0]) diff --git a/booty/ppc.py b/booty/ppc.py index 438813360..23662b91f 100644 --- a/booty/ppc.py +++ b/booty/ppc.py @@ -28,11 +28,8 @@ class ppcBootloaderInfo(bootloaderInfo): try: device = self.storage.fsset.mountpoints["/boot"] except KeyError: - try: - # Try / if we don't have this we're not going to work - device = self.storage.fsset.mountpoints["/"] - except KeyError: - return retval + # Try / if we don't have this we're not going to work + device = self.storage.fsset.rootDevice retval.append(device.path) else: @@ -54,7 +51,7 @@ class ppcBootloaderInfo(bootloaderInfo): if not os.path.isdir(instRoot + "/boot/etc"): os.mkdir(instRoot + "/boot/etc") except KeyError: - bootDev = self.storage.fsset.mountpoints["/"] + bootDevice = self.storage.fsset.rootDevice cfPath = "/boot" cf = "/etc/yaboot.conf" @@ -107,7 +104,7 @@ class ppcBootloaderInfo(bootloaderInfo): f.write("\n") - rootDev = self.storage.fsset.mountpoints["/"] + rootDev = self.storage.fsset.rootDevice for (label, longlabel, version) in kernelList: kernelTag = "-" + version diff --git a/booty/s390.py b/booty/s390.py index 32d28b463..95ac140a8 100644 --- a/booty/s390.py +++ b/booty/s390.py @@ -27,10 +27,7 @@ class s390BootloaderInfo(bootloaderInfo): if not os.access(instRoot + sl.getPath(), os.R_OK): lilo.delImage(label) - try: - rootDev = self.storage.fsset.mountpoints["/"] - except KeyError: - raise RuntimeError, "Installing zipl, but there is no root device" + rootDev = self.storage.fsset.rootDevice if rootDev == defaultDev: lilo.addEntry("default", kernelList[0][0]) @@ -124,7 +121,7 @@ class s390BootloaderInfo(bootloaderInfo): def writeZipl(self, instRoot, bl, kernelList, chainList, defaultDev, justConfigFile): images = bl.images.getImages() - rootDev = self.storage.fsset.mountpoints["/"] + rootDev = self.storage.fsset.rootDevice cf = '/etc/zipl.conf' self.perms = 0600 diff --git a/booty/sparc.py b/booty/sparc.py index 086f9786a..1eb53297f 100644 --- a/booty/sparc.py +++ b/booty/sparc.py @@ -16,7 +16,7 @@ class sparcBootloaderInfo(bootloaderInfo): if not os.path.isdir(instRoot + "/boot"): os.mkdir(instRoot + "/boot") except KeyError: - bootDev = self.storage.fsset.mountpoints["/"] + bootDev = self.storage.fsset.rootDevice cf = "/etc/silo.conf" mfdir = '/etc' @@ -45,7 +45,7 @@ class sparcBootloaderInfo(bootloaderInfo): f.write("default=%s\n" % (kernelList[0][0],)) f.write("\n") - rootDev = self.storage.fsset.mountpoints["/"] + rootDev = self.storage.fsset.rootDevice for (label, longlabel, version) in kernelList: kernelTag = "-" + version diff --git a/booty/x86.py b/booty/x86.py index d14cbc223..72fcdb9f1 100644 --- a/booty/x86.py +++ b/booty/x86.py @@ -130,7 +130,7 @@ class x86BootloaderInfo(efiBootloaderInfo): defaultDev, justConfigFile): images = bl.images.getImages() - rootDev = self.storage.fsset.mountpoints["/"] + rootDev = self.storage.fsset.rootDevice # XXX old config file should be read here for upgrade @@ -169,7 +169,7 @@ class x86BootloaderInfo(efiBootloaderInfo): f.write("# all kernel and initrd paths are relative " "to /boot/, eg.\n") except KeyError: - bootDev = self.storage.fsset.mountpoints["/"] + bootDev = self.storage.fsset.rootDevice grubPath = "/boot/grub" cfPath = "/boot/" f.write("# NOTICE: You do not have a /boot partition. " @@ -458,7 +458,7 @@ class x86BootloaderInfo(efiBootloaderInfo): grubPath = "/grub" cfPath = "/" except KeyError: - bootDev = self.storage.fsset.mountpoints["/"] + bootDev = self.storage.fsset.rootDevice grubPath = "/boot/grub" cfPath = "/boot/" |