From b0c8346fa7969f8b10029fdd68ece0fef0f65a4f Mon Sep 17 00:00:00 2001 From: Wilhelm Ã…kermark Date: Sun, 12 Dec 2021 08:58:24 +0100 Subject: Fixing possible race condition with partprobe (#796) * Update partition.py * Added sleep after partprobe Added sleep after partprobe. Without this tools such as lsblk may be unable to retrieve certain properties of devices (such as partuuid). --- archinstall/lib/disk/filesystem.py | 1 + archinstall/lib/disk/partition.py | 1 + 2 files changed, 2 insertions(+) diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index edf54eb5..ac970b2a 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -127,6 +127,7 @@ 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: diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py index d3efe5cf..0da991ef 100644 --- a/archinstall/lib/disk/partition.py +++ b/archinstall/lib/disk/partition.py @@ -207,6 +207,7 @@ class Partition: def partprobe(self): SysCommand(f'bash -c "partprobe"') + time.sleep(1) def detect_inner_filesystem(self, password): log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=logging.INFO) -- cgit v1.2.3-54-g00ecf