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 <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C168962297313.22523.18408902364202107570-1@git.sr.ht%3E
This commit is contained in:
Anton Bambura 2023-07-17 21:52:56 +03:00 committed by Oliver Smith
parent 1b8edd9abb
commit 94f697c7f5
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 2 additions and 1 deletions

View File

@ -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 += [
[