pmb.install.partition: fix mb_reserved calculation (MR 2123)

Calculate the end of the reserved space properly. Instead of:
	from size_boot to size_reserve
it is:
	from size_boot to (size_reserve + size_boot)

The reserved space is used by the on-device installer. Without this
patch, the reserved space could easily end up being too small, resulting
in no space left errors during the installation.
This commit is contained in:
Oliver Smith 2021-10-10 19:28:11 +02:00
parent 97f59ffe93
commit a676bdef0c
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ def partition(args, size_boot, size_reserve):
]
if size_reserve:
commands += [["mkpart", "primary", mb_boot, mb_reserved]]
mb_reserved_end = f"{round(size_reserve + size_boot)}M"
commands += [["mkpart", "primary", mb_boot, mb_reserved_end]]
commands += [
["mkpart", "primary", mb_root_start, "100%"],