If you have another large disk available, and you're patient, you can get a copy of the disk minus any bad bits by making a clone
of the disk using dd, which is capable of ignoring unreadable portions of the disk -- although it can take it a long time to give up on those portions that can't be read.
To do so, open terminal
and type the command: Code:
and locate the device number of the disk. It'll be something like /dev/disk1.
Then unmount the drive by dragging it to the eject icon in the dock, clicking its eject icon in a Finder window, or unmounting it from Disk Utility. Then issue the following command to make an image of it on another drive, substituting "/dev/disk3" for whatever device you identified in the first step, and substituting "/Volumes/My\ Big\ Drive/backup
.dmg" with a path to the disk image file you'd like to create (don't forget to put backslashes in front of spaces): Code:
sudo dd if=/dev/disk# of=/Volumes/My\ Big\ Drive/backup.dmg conv=noerror bs=16384
The command works as follows:
dd is the name of the command to duplicate the disk, bit-for-bit.
if=/dev/disk# is the parameter telling dd where it should read data
of=/Volumes/My\ Big\ Drive/backup
.dmg is the parameter telling dd where to put the output.
conv=noerror tells dd that if errors are encountered to pad the unreadable portions with null bytes and keep going. NOTE: I don't know if it pads the entire I/O block, or just the unreadable bits, or the hardware block, which leads us to...
bs=16384 which tells dd to use a block size of 16384 bytes. This is a lot faster than copying in 512 byte chunks, which is the default as well as the hardware block size, but I don't know how it will interact with errors. For efficiency, keep this an integer multiple of 512.
When the drive encounters bad sectors it won't give up easily. If there are lots of bad sectors, this means it may take a very
long time to get past them. You also won't see any indication of progress in the terminal
, except for when bad blocks are encountered and dd spits up an error notification, but you can see the output file size growing by doing Get Info in the Finder.
Once you're done, you can double-click the dmg file to mount it and copy the files anywhere you want. Good luck...
Last edited by -anonymous on Sun Jun 03, 2007 2:53 pm; edited 1 time in total