Skip to content

container: Fix resizing disk image containing multiple partitions

Closes: #2324 (closed).

The arm64 image contains two partitions in a GPT partition table. First is the EFI partition and the second is the root partition. The container script currently assumes that there will only be one partition in the image file. Fix this by picking up the partition number of the last partition and resizing that. GPT partition table also requires relocating the second copy of the partition table to the end before partition resize can succeed.

Tests:

  • Create testing containers in arm64 and amd64 architectures.

Signed-off-by: Sunil Mohan Adapa sunil@medhas.org

Merge request reports

Loading