cmprovision icon indicating copy to clipboard operation
cmprovision copied to clipboard

Image is not a valid disk image. on one provisioner but not another?

Open synaption opened this issue 1 year ago • 3 comments

I am getting this error message on one device but not another. Image is not a valid disk image. Uncompressed size not dividable by sector size of 512 bytes. They are trying to upload the same image.
One device is running the latest rasberry pi os bookworm, the other is running an old version of buster.
I'm not sure what else could be different that causes this error. Should I start from scratch?

synaption avatar Jul 01 '24 17:07 synaption

It only checks the disk size if "verify" is on in the project settings. So you probably do not have that enabled in one of the projects.

Regardless of that, you are probably taking disk images the wrong way. Your image size should never be something else than a multiple of 512 bytes. That is the smallest unit a disk can address.

maxnet avatar Jul 01 '24 18:07 maxnet

I tried "Verify that image was written correctly" set to on and off on both with no difference. I have now zero padded the image which seems to work. truncate -s %512 sdcard.img.bz2

synaption avatar Jul 01 '24 18:07 synaption

If you are going to zero pad, do make sure you are padding the uncompressed image, and not a .bz2

maxnet avatar Jul 01 '24 19:07 maxnet