Unable to open DMG files - "Corrupt Image"
11,674
Found this online. Here is the link: https://www.youtube.com/watch?v=TggCS8q5yGE
Here are the commands:
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)
Related videos on Youtube
Author by
Mahesh Cheliya
I have 5+ years of experience in the iPhone app development. I'll always do my best to develop a high-quality app.
Updated on September 18, 2022Comments
-
Mahesh Cheliya over 1 year
I created a DMG file using Disk utility in Recovery Mode (File -> New Image -> Image from Folder).
I tried all the possible options from this question:
- extracting DMG using 7Zip - not working
- converting it to another format like ISO - not converting
- opening DMG using Disk Drill - not opening
- opening DMG using Data Rescue - not opening
Is there any way to extract the data from the corrupted DMG file?
-
Gordon Davisson over 5 yearsDo you have any idea what might've happened to it? What all has happened to it between when you created it and now?
-
Mahesh Cheliya over 5 years@GordonDavisson when i created image, Macbook display "Operation Successfully", that time i not got any error or any warning message. I created saveral .dmg files like this, small files are opening without any issue, but Big size (Approx more than 2 GB) file is not opening.
-
harrymc over 5 yearsDoes that happen if you create and open the file when you Start up in safe mode ?
-
Mahesh Cheliya over 5 years@harrymc yes, if i try to open file in safe mode, it is display above message
-
harrymc about 5 yearsTry using Disk Utility by dragging the damaged DMG file onto its window, click the file and select “Repair Disk” in the First Aid tab. You could also try the free utility Disk Drill, recommended in such cases.
-
Mahesh Cheliya about 5 yearsHi @harrymc, I already tried it early and I also mentioned it in question. But unfortunately, I was not able to recover that file.
-
harrymc about 5 yearsThe DMG might be too damaged.
-
Mahesh Cheliya about 5 years@harrymc I don't know why apple system generated corrupt dmg file because small files are open without any issue but large file gives an error message, and interestingly, I generated all files the same way.
-
harrymc about 5 yearsHow much large? Don't you have a reason-code associated with the error? Try also temporarily to disable checksum verification by the command
defaults write com.apple.frameworks.diskimages skip-verify -bool true
(undo if it doesn't help). -
Mahesh Cheliya about 5 yearsIt's approx. more than 3 GB file. Let me try to use this command
-
Mahesh Cheliya about 5 yearsI tried the skip-verify command, but it doesn't work.
-
harrymc about 5 yearsIt's then not a checksum problem. If size matters, then this relates probably to your method of creating the DMG.
-
Mahesh Cheliya over 5 yearsThanks for your answer! I tried first command but it gives this error "hdiutil: attach failed - Operation not permitted"
-
var firstName over 5 yearsUse the term
sudo
before the command in order to elevate permissions -
Mahesh Cheliya over 5 years'sudo' not working