index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-12-16 09:00:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 09:00:10 +0000 |
commit | 7a018415862677c165494decc5d8ad9e06c65fb7 (patch) | |
tree | 0d216ce16b2e02f5270560621185db6ea8afee0d /archinstall/lib/disk/partition.py | |
parent | 3c2e71b4bbfa2168afb54eb70aeecce9064c8435 (diff) |
-rw-r--r-- | archinstall/lib/disk/partition.py | 16 |
diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py index 0da991ef..b696d9dd 100644 --- a/archinstall/lib/disk/partition.py +++ b/archinstall/lib/disk/partition.py @@ -159,15 +159,13 @@ class Partition: for i in range(storage['DISK_RETRY_ATTEMPTS']): self.partprobe() - partuuid_struct = SysCommand(f'lsblk -J -o+PARTUUID {self.path}') - if partuuid_struct.exit_code == 0: - if partition_information := next(iter(json.loads(partuuid_struct.decode('UTF-8'))['blockdevices']), None): - if partuuid := partition_information.get('partuuid', None): - return partuuid + partuuid = self._safe_uuid + if partuuid: + return partuuid time.sleep(storage['DISK_TIMEOUTS']) - raise DiskError(f"Could not get PARTUUID for {self.path} using 'lsblk -J -o+PARTUUID {self.path}'") + raise DiskError(f"Could not get PARTUUID for {self.path} using 'blkid -s PARTUUID -o value {self.path}'") @property def _safe_uuid(self) -> Optional[str]: @@ -178,11 +176,7 @@ class Partition: """ self.partprobe() - partuuid_struct = SysCommand(f'lsblk -J -o+PARTUUID {self.path}') - if partuuid_struct.exit_code == 0: - if partition_information := next(iter(json.loads(partuuid_struct.decode('UTF-8'))['blockdevices']), None): - if partuuid := partition_information.get('partuuid', None): - return partuuid + return SysCommand(f'blkid -s PARTUUID -o value {self.path}').decode('UTF-8').strip() @property def encrypted(self): |