Raw-disk-image-shrink-rootfs failing on MacOs using docker

I am attempting to shrink the size of a golden .img file so it will fit on my beaglebone green wireless 4GB EMMc after using mender-convert. My OS is MacOs version 10.14.4. I am using Docker community edition version 2.0.0.3. I have pasted in the terminal session below. The .img file is the same size after it runs. I am assuming the warnings are telling me that the process if failing. Any help would be greatly appreciated.

sudo ./docker-mender-convert raw-disk-image-shrink-rootfs --raw-disk-image “golden-May4.img”
Running mender-convert raw-disk-image-shrink-rootfs --raw-disk-image golden-May4.img
*** Data partition size set to default value: 128MB ***
*** Total storage size set to default value: 8GB ***
1/1 Shrinking raw disk image root filesystem…
dumpe2fs 1.44.1 (24-Mar-2018)
resize2fs 1.44.1 (24-Mar-2018)
Root filesystem size:
minimal: 2274193408
aligned: 2281701376
sectors: 4456448
Warning: Unable to open /dev/sr2 read-write (Read-only file system). /dev/sr2 has been opened read-only.
Warning: Unable to open /dev/sr2 read-write (Read-only file system). /dev/sr2 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr1 read-write (Read-only file system). /dev/sr1 has been opened read-only.
Warning: Unable to open /dev/sr1 read-write (Read-only file system). /dev/sr1 has been opened read-only.
Raw disk image new endsector: 4449975
New root filesystem size (sectors): 4456448
The rootfs partition in the raw disk image has been shrinked successfully!
You can now convert the output raw disk image
/mender-convert/golden-May4.img
to a Mender disk image.

hi @chetferry,

First of all we do not run much tests on this tool using MacOs, and there might be some gotchas.

But to shrink the image further you must also specific --storage-total-size-mb 4096 along with the raw-disk-image-shrink-rootfs command, and essentially all your calls to mender-convert should have the --storage-total-size-mb 4096 argument.

Please feel free to post output of fdisk -l <path to disk> before and after you attempt to shrink with the mentioned arguments.