Trying to recover the contents of a DMG which fails to mount with "Corrupt Image"

0

So about a week ago I used the disk Utility to make a few images of some folders in my MacBook pro as a backup (1 small with docs, one about 15GB with miscellaneous stuff and 1 about 265 GB full of photos, jpg and raw). After they were successful and mounted. I put them in an external SSD and formatted my Mac...

Today I try to get some of those into my newly formatted Mac and surprise, the two big images cannot be mounted because they are corrupted.

Error when trying to mount

I attempted to use the Disk Utility to either analyse, convert or resize and it also complains about the image being corrupted.

Error from disk Utility

I did a quick search around and attempted to use hdiutil to force mount, ignore some flags etc, but it would not mount complaining of the same thing diutil: convert failed - corrupt image

Then I found something that looked promising:

hdiutil attach -nomount -noverify -noautofsck -readwrite /volumes/"name of your image"
fsck_hfs -drfy /dev/diskxsx  (x is your disk number)
hdiutil detach /dev/diskxsx  (x is your disk number)

But that command fails with hdiutil: attach failed - Operation not permitted even when using sudo.

I then tried again with the -debug flag and got

DIResolveURLToDiskImage: resolving disk image format failed. 107.

I hope somebody has any idea how to get these images back to life.

Minoru Tsuru

Posted 2019-03-19T18:26:57.067

Reputation: 1

Did you test they were OK when you first moved them to your storage medium? [afaik, .dmg will checksum on 'open' but you'd have to rely on the storage medium being OK until then.] i've no idea how to recover one that will not pass checksum, I'm afraid. – Tetsujin – 2019-03-19T18:36:16.857

Yeah, actually now that i think about it, i created the images directly on the SSD and they were good. – Minoru Tsuru – 2019-03-19T19:26:19.063

No answers