diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index e85441538b..839a050f07 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -47,7 +47,7 @@ def devices(self) -> List[BDevice]: def load_devices(self) -> None: block_devices = {} - SysCommand('udevadm settle') + self.udev_sync() all_lsblk_info = get_all_lsblk_info() devices = getAllDevices() @@ -784,6 +784,13 @@ def wipe_dev(self, block_device: BDevice) -> None: self._wipe(block_device.device_info.path) + @staticmethod + def udev_sync() -> None: + try: + SysCommand('udevadm settle') + except SysCallError as err: + debug(f'Failed to synchronize with udev: {err}') + device_handler = DeviceHandler() diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 9af2e00cd7..a59c4342c5 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -17,7 +17,6 @@ from ..luks import Luks2 from ..menu import Menu from ..output import debug, info -from ..general import SysCommand if TYPE_CHECKING: _: Any @@ -114,7 +113,7 @@ def _format_partitions( device_handler.format(part_mod.safe_fs_type, part_mod.safe_dev_path) # synchronize with udev before using lsblk - SysCommand('udevadm settle') + device_handler.udev_sync() lsblk_info = device_handler.fetch_part_info(part_mod.safe_dev_path)