[PATCH] Support discovery of preexisting rootfs on LV.

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

 



Add another pass at opening encrypted devices after starting RAID and LVM so that we can see what's on encrypted high-level devices. Also look for the correct key in the encryptedDevices dict when checking for encryption info.
---
 partedUtils.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/partedUtils.py b/partedUtils.py
index 4c050ef..6cb4830 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -809,6 +809,11 @@ class DiskSet:
 	lvm.vgscan()
 	lvm.vgactivate()
 
+        for dev, crypto in self.anaconda.id.partitions.encryptedDevices.items():
+            # FIXME: order these so LVM and RAID always work on the first try
+            if crypto.openDevice():
+                log.error("failed to open encrypted device %s" % (dev,))
+
         for (vg, lv, size, lvorigin) in lvm.lvlist():
             if lvorigin:
                 continue
@@ -816,7 +821,8 @@ class DiskSet:
             found = 0
             theDev = dev
             node = "%s/%s" % (vg, lv)
-            crypto = self.anaconda.id.partitions.encryptedDevices.get(node)
+            dmnode = "mapper/%s-%s" % (vg, lv)
+            crypto = self.anaconda.id.partitions.encryptedDevices.get(dmnode)
             if crypto and not crypto.openDevice():
                 theDev = "/dev/%s" % (crypto.getDevice(),)
             elif crypto:
-- 
1.5.4.1

_______________________________________________
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