solo-io / packer-plugin-arm-image

Packer plugin for ARM images
Apache License 2.0
426 stars 104 forks source link

Image is resized but last partition is not #170

Closed denravonska closed 7 months ago

denravonska commented 7 months ago

I'm trying this on a Debian image. It consistently claims to resize the image:

==> arm-image: Growing partition to 6144 M (6442450944 bytes)
    arm-image: mapping output-arm-image/image
==> arm-image: losetup --show -f -P output-arm-image/image
==> arm-image: partitions: [/dev/loop33p1 /dev/loop33p2 /dev/loop33p3]
==> arm-image: partitions: [/dev/loop33p1 /dev/loop33p2 /dev/loop33p3]
    arm-image: Mounting: /dev/loop33p3
    arm-image: Mounting: /dev/loop33p2
    arm-image: Mounting: /dev/loop33p1

But when I check df afterwards I get

/dev/loop33p3                    2,0G  1,4G  492M  74% /tmp/armimg-1998442362
/dev/loop33p2                    300M  4,0K  300M   1% /tmp/armimg-1998442362/boot/efi
/dev/loop33p1                     16M  3,0K   16M   1% /tmp/armimg-1998442362/config

The image seems to have been successfully resized while the last partition remains the same size as before.

-rw-r--r-- 1 root  root  4294967296 apr 11 06:15 image

Disk output-arm-image/image: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FAAC3C01-3EF8-4E00-9727-9DC300C883F7

Device                   Start     End Sectors  Size Type
output-arm-image/image1  32768   65535   32768   16M Microsoft basic data
output-arm-image/image2  65536  679935  614400  300M EFI System
output-arm-image/image3 679936 4979768 4299833  2,1G EFI System
denravonska commented 7 months ago

Oh, it only supports FAT and ext. Nvm then :(