mkosi
mkosi copied to clipboard
Set squashFS minimum partition size to RootSize
When building with SquashFS (and potentially other FS types) the partition size inserted is the size of the file system blob when the partition needs to be generated (i.e.: is_generated_root() is true). For SquashFS this may be much smaller than the value specified for RootSize. In general this isn't an issue but it becomes a problem when we have the following layout:
- An EFI partition
- A SquashFS root or /usr partition
- A verity partition for the previous partition
If the SquashFS partition is ever updated (like A/B updates) and the new partition doesn't fit within the allocated space then there's an issue. sysetmd-repart will not assist here to resize the SquashFS partition either because that would require moving data around.
I mainly wanted feedback before I start a PR on this one. It seems adjusting the minimum size when inserting the partition based on the partition type and file system would be sufficient.
I decided to have a go anyway.