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@hvornum.se>2021-04-03 16:22:09 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-03 16:22:09 +0200
commitb2927a50670d92bb99e0b8a23e6321e4a8c6f26b (patch)
tree9f28180993d1fef14a226991bb04dd942f58ba6b /archinstall/lib/installer.py
parent2bf947ba055722f58b568fc1c984a298ad230ecb (diff)
This should fix #151, by using lsblk instead of /dev/disk/by-partuuid. It also cleaned up the installer code quite a bit during the bootloader installation. Will do the same for encrypted drives later on by implementing UUID on a BlockDevice (disk) level.
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index d161c3b7..a4321893 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -384,18 +384,10 @@ class Installer():
break
else:
log(f"Identifying root partition by PART-UUID on {self.partition}, looking for '{os.path.basename(self.partition.path)}'.", level=LOG_LEVELS.Debug)
- 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))
-
- log(f"Checking root partition match {os.path.basename(real_path)} against {os.path.basename(self.partition.path)}: {os.path.basename(real_path) == os.path.basename(self.partition.path)}", level=LOG_LEVELS.Debug)
- 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')
+ entry.write(f'options root=PARTUUID={self.partition.uuid} rw intel_pstate=no_hwp\n')
- self.helper_flags['bootloader'] = bootloader
- return True
- break
+ self.helper_flags['bootloader'] = bootloader
+ return True
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.")
else: