Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-01-25 13:39:27 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2022-01-25 12:40:04 +0000
commit26f9b681a45842d9a1ffd90e8b1397048b3c3645 (patch)
tree26b3b73a5a9312b5a2b2afa1a30fcb90d8af776c /archinstall/lib/disk
parentb5f50889eb5fa544ff11199626329df5679dac8e (diff)
Removed last lsblk to grab PARTUUID (#901)
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/filesystem.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 3b09ec6c..3aa09b15 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -45,12 +45,14 @@ class Filesystem:
self.partprobe()
time.sleep(5)
- # TODO: Convert to blkid (or something similar, but blkid doesn't support traversing to list sub-PARTUUIDs based on blockdevice path?)
- output = json.loads(SysCommand(f"lsblk --json -o+PARTUUID {self.blockdevice.device}").decode('UTF-8'))
+ # We'll use unreliable lbslk to grab children under the /dev/<device>
+ output = json.loads(SysCommand(f"lsblk --json {self.blockdevice.device}").decode('UTF-8'))
for device in output['blockdevices']:
for index, partition in enumerate(device['children']):
- if (partuuid := partition.get('partuuid', None)) and partuuid.lower() == uuid:
+ # But we'll use blkid to reliably grab the PARTUUID for that child device (partition)
+ partition_uuid = SysCommand(f"blkid -s PARTUUID -o value /dev/{partition.get('name')}").decode().strip()
+ if partition_uuid.lower() == uuid.lower():
return index
time.sleep(storage['DISK_TIMEOUTS'])