Hi,
I am trying to use mender-convert (latest 2.2.0) to convert a golden image of Raspbian buster lite for Raspberry Pi Zero Wifi. I thought I set it up correctly for a 16GB SD card, but the resulting image is… 17.18GB.
I set the following config values:
MENDER_STORAGE_TOTAL_SIZE_MB=“16384”
MENDER_BOOT_PART_SIZE_MB=“256”
MENDER_DATA_PART_SIZE_MB=“256”
IMAGE_ROOTFS_SIZE=0
I also got the following output:
2020-10-13 05:23:27 [INFO] [mender-convert-package] Using configuration file: configs/mender_convert_config
2020-10-13 05:23:27 [INFO] [mender-convert-package] Using configuration file: watt_config
2020-10-13 05:23:30 [INFO] [mender-convert-package] Rootfs filesystem size will be 3974 MiB
2020-10-13 05:23:30 [INFO] [mender-convert-package] Creating a file-system image from: work/rootfs/data/
2020-10-13 05:23:30 [INFO] [mender-convert-package] Creating a file-system image from: work/rootfs/
2020-10-13 05:27:25 [INFO] [mender-convert-package] Copying root filesystem image to deploy directory
2020-10-13 05:27:45 [INFO] [mender-convert-package] Writing Mender artifact to: deploy/101320-raspberrypi0w-mender.mender
2020-10-13 05:27:45 [INFO] [mender-convert-package] This can take up to 20 minutes depending on which compression method is used
2020-10-13 05:28:40 [INFO] [mender-convert-package] Creating Mender compatible disk-image
2020-10-13 05:28:40 [INFO] [mender-convert-package] Total disk size: 16384 MiB
2020-10-13 05:28:40 [INFO] [mender-convert-package] Boot partition 256 MiB
2020-10-13 05:28:40 [INFO] [mender-convert-package] RootFS partitions 7924 MiB x 2
2020-10-13 05:28:40 [INFO] [mender-convert-package] Data partition 256 MiB
2020-10-13 05:28:40 [INFO] [mender-convert-package] Using input diskimage partition scheme (dos)
2020-10-13 05:28:40 [INFO] [mender-convert-package] Writing DOS (MBR) partition table
2020-10-13 05:28:41 [INFO] [mender-convert-package] Writing boot partition image
2020-10-13 05:29:37 [INFO] [mender-convert-package] Writing rootfsa partition image
2020-10-13 05:53:19 [INFO] [mender-convert-package] Writing rootfsb partition image
2020-10-13 06:14:43 [INFO] [mender-convert-package] Writing data partition image
2020-10-13 06:14:43 [INFO] [mender-convert-package] Performing platform specific package operations (if any)
2020-10-13 06:14:43 [INFO] [mender-convert-package] Running hook: platform_package
2020-10-13 06:14:43 [INFO] [mender-convert-package] Compressing deploy/101320-raspberrypi0w-mender.img.gz
This already confused me:
Rootfs filesystem size will be 3974 MiB
RootFS partitions 7924 MiB x 2
So which is it? I expected 7924 since it is approximately (16GB - 256MB - 256MB)/2.
Is the incorrect final size of the image (17.18GB vs 16GB) related to the fact that a 16GB card is really 2^34 = 17179869184 bits? Not that this helps because I can’t in the end burn the image, it complains the size of the card is too small for the image.
Please let me know if I should provide other details. Thanks!