Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-07-08 15:43:54 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-07-08 15:43:54 +0000
commit078567f81c17492d0f3bc857a6efa09cc3503fa5 (patch)
tree198e5f53a5e4b7c4adb67fce16fea047bbe22d89 /archinstall/lib/installer.py
parent99944634e3705057749c1950d893c685b82c1c8f (diff)
Using two different methods for encrypted/non encrypted drives.
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 229481be..07b31a14 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -62,18 +62,27 @@ class Installer():
## so we'll use the old manual method until we get that sorted out.
- for root, folders, uids in os.walk('/dev/disk/by-partuuid'):
- for uid in uids:
- real_path = os.path.realpath(os.path.join(root, uid))
- if not os.path.basename(real_path) == os.path.basename(self.partition.path): continue
+ if self.partition.encrypted:
+ print(f'Trying to locate {os.path.basename(self.partition.path)} under /dev/disk/by-partuuid')
+ for root, folders, uids in os.walk('/dev/disk/by-partuuid'):
+ for uid in uids:
+ real_path = os.path.realpath(os.path.join(root, uid))
+ if not os.path.basename(real_path) == os.path.basename(self.partition.path): continue
- if self.partition.encrypted:
entry.write(f'options cryptdevice=PARTUUID={uid}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n')
- else:
+ return True
+ break
+ else:
+ print(f'Trying to locate {os.path.basename(self.partition.path)} under /dev/disk/by-uuid')
+ for root, folders, uids in os.walk('/dev/disk/by-uuid'):
+ for uid in uids:
+ real_path = os.path.realpath(os.path.join(root, uid))
+ if not os.path.basename(real_path) == os.path.basename(self.partition.path): continue
+
entry.write(f'options root=PARTUUID={uid} rw intel_pstate=no_hwp\n')
- return True
- break
- raise RequirementError(f'Could not identify the UUID of {partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.')
+ return True
+ break
+ raise RequirementError(f'Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.')
def add_additional_packages(self, *packages):
self.pacstrap(*packages)