Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-09-21 11:13:22 -0400
committerGitHub <noreply@github.com>2023-09-21 17:13:22 +0200
commit6d908e8cd7d395a1f8f2473b2dc9ca3e2ace1226 (patch)
treedd831c9218a633bfd838d6610a1e5efce76d6784 /archinstall/lib/disk
parentc75ae97f007f7f7d1d8921e1bd38bcc01b6035f1 (diff)
Fix `_add_efistub_bootloader()` partition number with partn (#2084)
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/device_handler.py7
-rw-r--r--archinstall/lib/disk/device_model.py3
2 files changed, 9 insertions, 1 deletions
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index a95e21e3..494319a1 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -293,6 +293,7 @@ class DeviceHandler(object):
lsblk_info = self._fetch_part_info(part_mod.safe_dev_path)
+ part_mod.partn = lsblk_info.partn
part_mod.partuuid = lsblk_info.partuuid
part_mod.uuid = lsblk_info.uuid
@@ -371,7 +372,7 @@ class DeviceHandler(object):
time.sleep(attempt_nr + 1)
lsblk_info = get_lsblk_info(path)
- if lsblk_info.partuuid and lsblk_info.uuid:
+ if lsblk_info.partn and lsblk_info.partuuid and lsblk_info.uuid:
break
self.partprobe(path)
@@ -380,6 +381,10 @@ class DeviceHandler(object):
debug(f'Unable to get partition information: {path}')
raise DiskError(f'Unable to get partition information: {path}')
+ if not lsblk_info.partn:
+ debug(f'Unable to determine new partition number: {path}\n{lsblk_info}')
+ raise DiskError(f'Unable to determine new partition number: {path}')
+
if not lsblk_info.partuuid:
debug(f'Unable to determine new partition uuid: {path}\n{lsblk_info}')
raise DiskError(f'Unable to determine new partition uuid: {path}')
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index 69038b01..ec0207a1 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -627,6 +627,7 @@ class PartitionModification:
# only set if the device was created or exists
dev_path: Optional[Path] = None
+ partn: Optional[int] = None
partuuid: Optional[str] = None
uuid: Optional[str] = None
@@ -933,6 +934,7 @@ class LsblkInfo:
ptuuid: str = ''
rota: bool = False
tran: Optional[str] = None
+ partn: Optional[int] = None
partuuid: Optional[str] = None
parttype :Optional[str] = None
uuid: Optional[str] = None
@@ -957,6 +959,7 @@ class LsblkInfo:
'ptuuid': self.ptuuid,
'rota': self.rota,
'tran': self.tran,
+ 'partn': self.partn,
'partuuid': self.partuuid,
'parttype' : self.parttype,
'uuid': self.uuid,