summaryrefslogtreecommitdiffstats
path: root/booty
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-03-20 10:47:48 +0100
committerHans de Goede <hdegoede@redhat.com>2009-03-20 17:26:21 +0100
commite4c81910ee1c7223c8c8697400d0e628f095500f (patch)
treeb05583c0d185807c4c3516da0707ed11b2b88d95 /booty
parent4f42f8ea3a4431fc66f39d6410f1b8a4186b700f (diff)
downloadanaconda-e4c81910ee1c7223c8c8697400d0e628f095500f.tar.gz
anaconda-e4c81910ee1c7223c8c8697400d0e628f095500f.tar.xz
anaconda-e4c81910ee1c7223c8c8697400d0e628f095500f.zip
Make root= line in grub.conf and path spec in fstab consistent
booty was using its own code to find out wether to pass in UUID=.... or /dev/.... as root= option, leading to inconsistencies between fstab (/dev/mapper/Volgroup-lv_root) and grub.conf (UUID=...) Harmless, but confusing. This patch fixes this by removing the no longer needed getRootDevName method from booty and instead using device.fstabSpec
Diffstat (limited to 'booty')
-rw-r--r--booty/alpha.py2
-rw-r--r--booty/bootloaderInfo.py16
-rw-r--r--booty/ppc.py2
-rw-r--r--booty/s390.py2
-rw-r--r--booty/sparc.py2
-rw-r--r--booty/x86.py3
6 files changed, 6 insertions, 21 deletions
diff --git a/booty/alpha.py b/booty/alpha.py
index ca715560d..461086c1e 100644
--- a/booty/alpha.py
+++ b/booty/alpha.py
@@ -86,7 +86,7 @@ class alphaBootloaderInfo(bootloaderInfo):
if os.path.isfile(instRoot + initrd):
f.write(" initrd=%sinitrd%s.img" %(kernelPath, kernelTag))
- realroot = getRootDevName(instRoot+initrd, rootDevice)
+ realroot = rootDevice.fstabSpec
f.write(" root=%s" %(realroot,))
args = self.args.get()
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 8419645fa..ff9592ecb 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -82,20 +82,6 @@ def rootIsDevice(dev):
return False
return True
-# hackery to determine if we should do root=LABEL=/ or whatnot
-# as usual, knows too much about anaconda
-def getRootDevName(initrd, rootDevice):
- if not os.access(initrd, os.R_OK):
- return rootDevice.path
-
- try:
- if rootDevice.format.uuid:
- return "UUID=%s" % rootDevice.format.uuid
- except:
- pass
-
- return rootDevice.path
-
class KernelArguments:
def get(self):
@@ -359,7 +345,7 @@ class bootloaderInfo:
sl.addEntry("read-only")
append = "%s" %(self.args.get(),)
- realroot = getRootDevName(instRoot+initrd, rootDev)
+ realroot = rootDev.fstabSpec
if rootIsDevice(realroot):
sl.addEntry("root", rootDev.path)
else:
diff --git a/booty/ppc.py b/booty/ppc.py
index 7ac9299a3..706f1989b 100644
--- a/booty/ppc.py
+++ b/booty/ppc.py
@@ -121,7 +121,7 @@ class ppcBootloaderInfo(bootloaderInfo):
append = "%s" %(self.args.get(),)
- realroot = getRootDevName(instRoot+initrd, rootDev)
+ realroot = rootDev.fstabSpec
if rootIsDevice(realroot):
f.write("\troot=%s\n" %(realroot,))
else:
diff --git a/booty/s390.py b/booty/s390.py
index 8cddb053d..575ab2813 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -144,7 +144,7 @@ class s390BootloaderInfo(bootloaderInfo):
if os.access (instRoot + initrd, os.R_OK):
f.write('\tramdisk=%sinitrd%s.img\n' %(self.kernelLocation,
kernelTag))
- realroot = getRootDevName(instRoot+initrd, rootDev)
+ realroot = rootDev.fstabSpec
f.write('\tparameters="root=%s' %(realroot,))
if bl.args.get():
f.write(' %s' % (bl.args.get()))
diff --git a/booty/sparc.py b/booty/sparc.py
index 4ea2ceaf5..b094a4512 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -62,7 +62,7 @@ class sparcBootloaderInfo(bootloaderInfo):
append = "%s" % (self.args.get(),)
- realroot = getRootDevName(instRoot+initrd, rootDev)
+ realroot = rootDev.fstabSpec
if rootIsDevice(realroot):
f.write("\troot=%s\n" % (realroot,))
else:
diff --git a/booty/x86.py b/booty/x86.py
index 221186a41..d710fbb8e 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -237,8 +237,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
f.write('title %s (%s)\n' % (longlabel, version))
f.write('\troot %s\n' % self.grubbyPartitionName(bootDevs[0]))
- realroot = getRootDevName(instRoot+initrd, rootDev)
- realroot = " root=%s" %(realroot,)
+ realroot = " root=%s" % rootDev.fstabSpec
if version.endswith("xen0") or (version.endswith("xen") and not os.path.exists("/proc/xen")):
# hypervisor case