raspberrypi / cmprovision

Provisioning system for CM4 products
BSD 3-Clause "New" or "Revised" License
88 stars 11 forks source link

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

Open synaption opened 4 days ago

synaption commented 4 days ago

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?

maxnet commented 4 days ago

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.

synaption commented 4 days ago

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

maxnet commented 4 days ago

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