FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Desktop

 
 
LinkBack Thread Tools
 
Old 03-19-2010, 10:05 AM
Hans de Goede
 
Default Add boot= argument to kernel cmdline when in fips mode (#573178)

And also make sure the necessary storage activation dracut cmds
are there for /boot if needed.
---
booty/bootloaderInfo.py | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 0c4882b..3903e01 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -86,21 +86,24 @@ def rootIsDevice(dev):

class KernelArguments:

- def getDracutStorageArgs(self):
+ def getDracutStorageArgs(self, devices):
args = []
types = {}
- root = self.anaconda.storage.rootDevice
- for d in self.anaconda.storage.devices:
- if d is not root and not root.dependsOn(d):
- continue
-
- s = d.dracutSetupString()
- types[s.split("=")[0]] = True
- args.append(s)
-
- import storage
- if isinstance(d, storage.devices.NetworkStorageDevice):
- args.append(self.anaconda.network.dracutSetupStrin g(d))
+ for device in devices:
+ for d in self.anaconda.storage.devices:
+ if d is not device and not device.dependsOn(d):
+ continue
+
+ s = d.dracutSetupString()
+ types[s.split("=")[0]] = True
+ if s not in args:
+ args.append(s)
+
+ import storage
+ if isinstance(d, storage.devices.NetworkStorageDevice):
+ s = args.append(self.anaconda.network.dracutSetupStrin g(d))
+ if s not in args:
+ args.append(s)

for i in [ [ "rd_LUKS_UUID", "rd_NO_LUKS" ],
[ "rd_LVM_LV", "rd_NO_LVM" ],
@@ -113,7 +116,18 @@ class KernelArguments:

def get(self):
args = ""
- for s in self.getDracutStorageArgs() + [
+ bootArgs = []
+ rootDev = self.anaconda.storage.rootDevice
+ neededDevs = [ rootDev ]
+
+ if flags.cmdline.get("fips") == "1":
+ bootDev = self.anaconda.storage.mountpoints.get("/boot", rootDev)
+ bootArgs = [ "boot=%s" % bootDev.fstabSpec ]
+ if bootDev is not rootDev:
+ neededDevs = [ rootDev, bootDev ]
+
+ for s in bootArgs +
+ self.getDracutStorageArgs(neededDevs) + [
self.anaconda.instLanguage.dracutSetupString(),
self.anaconda.keyboard.dracutSetupString(),
self.args,
--
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org