index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | codefiles <11915375+codefiles@users.noreply.github.com> | 2024-03-12 05:25:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 10:25:15 +0100 |
commit | df2884085dc06f71f2bb201a316828c23b6299dd (patch) | |
tree | 52a2b94f506aa9e1f8b47b75d276f006af9e53d7 /archinstall/lib/disk/device_handler.py | |
parent | 613bec6562c4d67c4c93d443e6d7e93fdb41ba66 (diff) |
-rw-r--r-- | archinstall/lib/disk/device_handler.py | 18 |
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index c06247e6..6e91ac2e 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -2,7 +2,6 @@ from __future__ import annotations import json import os -import time import logging from pathlib import Path from typing import List, Dict, Any, Optional, TYPE_CHECKING @@ -316,6 +315,9 @@ class DeviceHandler(object): else: self._perform_formatting(part_mod.safe_fs_type, part_mod.safe_dev_path) + # synchronize with udev before using lsblk + SysCommand('udevadm settle') + lsblk_info = self._fetch_part_info(part_mod.safe_dev_path) part_mod.partn = lsblk_info.partn @@ -384,19 +386,7 @@ class DeviceHandler(object): part_mod.dev_path = Path(partition.path) def _fetch_part_info(self, path: Path) -> LsblkInfo: - attempts = 3 - lsblk_info: Optional[LsblkInfo] = None - - for attempt_nr in range(attempts): - time.sleep(attempt_nr + 1) - lsblk_info = get_lsblk_info(path) - - if lsblk_info.partn and lsblk_info.partuuid and lsblk_info.uuid: - break - - if not lsblk_info: - debug(f'Unable to get partition information: {path}') - raise DiskError(f'Unable to get partition information: {path}') + lsblk_info = get_lsblk_info(path) if not lsblk_info.partn: debug(f'Unable to determine new partition number: {path}\n{lsblk_info}') |