Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-10 00:06:25 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-10 00:06:25 +0200
commite7ad4038bda9fb5906c4708eb8b48babe9778387 (patch)
treef940302639722ab6222f852477b2100e18be5844
parent103320b06188565f2166e0330dd3a8bedb9f8572 (diff)
Fixing UUID on encrypted partitions.
-rw-r--r--archinstall/lib/installer.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index c4e4e515..af973227 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -256,6 +256,9 @@ class Installer():
return True
+ def detect_encryption(self, partition):
+ return partition.encrypted or (partition.parent not in partition.path and Partition(partition.parent, None, autodetect_filesystem=True).filesystem == 'crypto_LUKS')
+
def minimal_installation(self):
## Add necessary packages if encrypting the drive
## (encrypted partitions default to btrfs for now, so we need btrfs-progs)
@@ -282,7 +285,7 @@ class Installer():
if '/usr/bin/btrfs-progs' not in BINARIES:
BINARIES.append('/usr/bin/btrfs')
- if (partition.encrypted or (partition.parent not in partition.path and Partition(partition.parent, None, autodetect_filesystem=True).filesystem == 'crypto_LUKS')):
+ if self.detect_encryption(partition):
if 'encrypt' not in HOOKS:
HOOKS.insert(HOOKS.index('filesystems'), 'encrypt')
@@ -372,7 +375,7 @@ class Installer():
## so we'll use the old manual method until we get that sorted out.
- if root_partition.encrypted:
+ if self.detect_encryption(root_partition):
log(f"Identifying root partition by DISK-UUID on {root_partition}, looking for '{os.path.basename(root_partition.real_device)}'.", level=LOG_LEVELS.Debug)
for root, folders, uids in os.walk('/dev/disk/by-uuid'):
for uid in uids: