2

I created a DMG file using Disk utility in Recovery Mode (File -> New Image -> Image from Folder).

Corrupt Image dmg

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?

12
  • Do you have any idea what might've happened to it? What all has happened to it between when you created it and now? Commented Aug 31, 2018 at 18:35
  • @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. Commented Sep 1, 2018 at 6:09
  • Does that happen if you create and open the file when you Start up in safe mode ?
    – harrymc
    Commented Sep 6, 2018 at 9:46
  • @harrymc yes, if i try to open file in safe mode, it is display above message Commented Sep 8, 2018 at 11:56
  • Try 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.
    – harrymc
    Commented Apr 2, 2019 at 17:04

1 Answer 1

0

Found this online. Here is the link: How to repair a corrupted sparse bundle/image or dmg file

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)
4
  • Thanks for your answer! I tried first command but it gives this error "hdiutil: attach failed - Operation not permitted" Commented Sep 5, 2018 at 9:21
  • 1
    Use the term sudo before the command in order to elevate permissions Commented Sep 10, 2018 at 15:52
  • 'sudo' not working Commented Sep 16, 2018 at 6:58
  • 2
    It should be hdiutil attach -nomount -noverify -noautofsck -readwrite <path to image>, i.e. hdiutil attach -nomount -noverify -noautofsck -readwrite ~/Downloads/image.dmg. The /Volumes (note not /volumes) is a total red herring. Also the error in the video is different "no mountable file systems", which is not the same issue as the OP has. It just goes to show that you shouldn't copy information from a youtube video without actually testing the commands.... Commented May 6, 2022 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .