Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/filesystem.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/disk/filesystem.py')
-rw-r--r--archinstall/lib/disk/filesystem.py10
1 files changed, 8 insertions, 2 deletions
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