From a676bdef0c166d427878a64cd95508eb03570ab7 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 10 Oct 2021 19:28:11 +0200 Subject: [PATCH] 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. --- pmb/install/partition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmb/install/partition.py b/pmb/install/partition.py index 5a5219b4..fbe4d63d 100644 --- a/pmb/install/partition.py +++ b/pmb/install/partition.py @@ -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%"],