[PATCH 2/4] Add dracutSetupString methods to all relevant device classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We want to move to using dracut in such a way that the initrd only
activates the minimum of storage needed to bring up the root fs. This
requires us to tell it exactly what storage to activate.
---
 storage/devices.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 1065a68..b71b669 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1555,6 +1555,9 @@ class LUKSDevice(DMCryptDevice):
         """ This device's backing device. """
         return self.parents[0]
 
+    def dracutSetupString(self):
+        return "rd_LUKS_UUID=luks-%s" % self.format.uuid
+
 
 class LVMVolumeGroupDevice(DMDevice):
     """ An LVM Volume Group
@@ -1964,6 +1967,9 @@ class LVMVolumeGroupDevice(DMDevice):
         """
         return len(self.pvs) == self.pvCount or not self.exists
 
+    def dracutSetupString(self):
+        return "rd_LVM_VG=%s" % self.name
+
 
 class LVMLogicalVolumeDevice(DMDevice):
     """ An LVM Logical Volume """
@@ -2682,6 +2688,10 @@ class MDRaidArrayDevice(StorageDevice):
     def model(self):
         return "RAID%d Array" % self.level
 
+    def dracutSetupString(self):
+        return "rd_MD_UUID=%s" % self.uuid
+
+
 class DMRaidArrayDevice(DMDevice):
     """ A dmraid (device-mapper RAID) device """
     _type = "dm-raid array"
@@ -2786,6 +2796,10 @@ class DMRaidArrayDevice(DMDevice):
         # Even if teared down we still want to show up in storage.disks
         return True
 
+    def dracutSetupString(self):
+        return "rd_DM_UUID=%s" % self.name
+
+
 class _MultipathDeviceNameGenerator:
     def __init__(self):
         self.number = 0
-- 
1.6.5.2

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux