Skip to content

pmb.install._install: fix subpartitions size calculation

Daniele Debernardi requested to merge feature/fix-partition-size into master

The calculation is wrong because when the boot partition size is big, it gets multiplied by 2, while the full disk image only by 1.2, this results in the remaining size not enough for the actual rootfs size.

simple example with the old calculation:
full = 1000 MB
boot = 400 MB

full = 1000 * 1.2 + 50 = 1250
boot = 400 * 2 + 25 = 825
root = full - boot = 425

as you can already see from the initial values, the actual root size is 600 MB but the calculation returned 425, which is not enough.

Edited by Daniele Debernardi

Merge request reports