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/filesystem.py | |
parent | 3c2e71b4bbfa2168afb54eb70aeecce9064c8435 (diff) |
-rw-r--r-- | archinstall/lib/disk/filesystem.py | 10 |
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index ac970b2a..72be7e70 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -36,6 +36,9 @@ class Filesystem: def partuuid_to_index(self, uuid): for i in range(storage['DISK_RETRY_ATTEMPTS']): 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')) for device in output['blockdevices']: @@ -127,7 +130,6 @@ class Filesystem: def partprobe(self): SysCommand(f'bash -c "partprobe"') - time.sleep(1) def raw_parted(self, string: str): if (cmd_handle := SysCommand(f'/usr/bin/parted -s {string}')).exit_code != 0: @@ -205,5 +207,9 @@ class Filesystem: SysCommand(f'bash -c "umount {device}?"') except: pass + + self.partprobe() + worked = self.raw_parted(f'{device} mklabel {disk_label}').exit_code == 0 self.partprobe() - return self.raw_parted(f'{device} mklabel {disk_label}').exit_code == 0 + + return worked |