From 94f697c7f5f45c761cce1c2a8b34110d3613559c Mon Sep 17 00:00:00 2001 From: Anton Bambura Date: Mon, 17 Jul 2023 21:52:56 +0300 Subject: [PATCH] pmb/partition: fix cgpt root_size to not cause resize on boot Current setup leaves 991 unused sectors which causes root partition to be resized on boot. Fix it. Reviewed-by: Oliver Smith Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C168962297313.22523.18408902364202107570-1@git.sr.ht%3E --- 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 08f9094d..cd97d676 100644 --- a/pmb/install/partition.py +++ b/pmb/install/partition.py @@ -172,7 +172,8 @@ def partition_cgpt(args, layout, size_boot, size_reserve): dev_size = pmb.chroot.root( args, ["blockdev", "--getsz", "/dev/install"], output_return=True) - root_size = str(int(dev_size) - int(s_root_start) - 1024) + # 33: Sec GPT table (32) + Sec GPT header (1) + root_size = str(int(dev_size) - int(s_root_start) - 33) commands += [ [