

Over 12 hours later, imaging was complete.Īs the image would not mount, testdisk was used to repair the partition table: sudo testdisk ~/temp/flashdrive.dmg diskutil list revealed it had been assigned to /dev/disk2, so imaging was begun: sudo ddrescue -v /dev/disk2 ~/temp/flashdrive.dmg ~/temp/logfile.log

After a dozen or so attempts, Disk Utility finally registered its presence, but reported that it was unformatted. In another recent instance, an 8GB USB flash drive would not mount or even be recognized by the OS.
#Diskwarrior 5 blogspot mac os x#
UPDATE: On a related note, Recovering a non-readable disk on Mac OS X describes resolving a " The disk you inserted you inserted was not readable by this computer" error caused by a corrupt partition map via sudo gpt recover /dev/disk x or diskutil repairDisk /dev/disk x Which was then mountable in Finder with just a double click.


Indeed, DiskWarrior repaired the image successfully: DiskWarrior has successfully built a new optimized directory for the disk named "foobar." The new directory is ready to replace the original directory. The image should now be attached and appear in DiskWarrior / Disk Utility for repair.sudo hdiutil mount -nomount -readwrite ~/temp/foobar.dmg.Happily, a blog post by bbum entitled Recovering Disk Images with DiskWarrior held the answer: $ mount -t hfs -r /dev/disk5 ~/temp/ GetMasterBlock: Error 16 opening /dev/rdisk5 (Despite the promising "Volume(s) mounted successfully" message, nothing was mounted.) $ mount -t hfs -r /dev/disk5s0 ~/temp/ GetMasterBlock: Error 2 opening /dev/rdisk5s0 $ diskutil mountDisk readOnly /dev/disk5 Volume(s) mounted successfully $ diskutil mount readOnly /dev/disk5 Volume on disk5 failed to mount if it has a partitioning scheme, use "diskutil mountDisk" $ mount /dev/disk5 ~/temp/ mount: You must specify a filesystem type with -t. $ mount -t hfs -r /dev/disk5s0 ~/temp/ GetMasterBlock: Error 2 opening /dev/rdisk5s0 $ mount -t hfs -r /dev/disk5 ~/temp/ mount_hfs: Invalid argument Next, the HFS+ volume was imaged with ddrescue: $ sudo ddrescue -v /dev/disk3s2 ~/temp/foobar.dmg ~/temp/logfile.logĪttempting to mount the image failed as well: $ hdiutil attach -nomount ~/temp/foobar.dmg /dev/disk5 If the volume is damaged, try the "readOnly" option So mounting in Terminal was attempted: $ sudo mount -t hfs /dev/disk3s2 ~/temp/ Password:Īgain: $ sudo /System/Library/Filesystems/hfs.fs/hfs.util -MU disk3s2 ~/temp/ fixed readonly nosuid nodev Password:Īnd again: $ sudo diskutil mount readOnly /dev/disk3s2 Password: The HFS+ volume on the following USB hard drive would not mount in Finder: $ diskutil list. OS X: Imaging and repairing a volume that won't mount # OS X: Imaging and repairing a volume that won't mount
