Damaged Hard Disk
From CGSecurity
You can also use TestDisk to help analyze the sectors copied from a hard drive with physical problems onto a good drive. If there are any bad sectors on your hard disk, you should first copy its data to another hard disk before attempting to recover its data. The new disk must be at least exactly the same size (check the number of LBA sectors) or larger; when larger, it's usually not a problem because the number of heads per cylinder and sectors per head will be the same if both disks use LBA mode.
Windows may have some problems to deal with bad sectors/damaged Hard Disk, so the best solution I have is to use Linux to duplicate the data.
Contents |
Identifying Linux device
Under Linux, the Primary Master IDE disk device is /dev/hda
Primary Slave IDE device is /dev/hdb
Secondary Master IDE device is /dev/hdc and so on.
SATA HDD device filenames usually begin at /dev/hde or /dev/sda
SCSI device filenames always begin at /dev/sda
USB device are often using an SCSI device /dev/sda
To list the partitions of a disk, log in as root and run fdisk -l device.
If needed, download the Knoppix Live CD , a bootable CD with a fully functional Linux OS that runs only in memory!
Disk duplication
Once you have verified the device names for your damaged disk and the new one, in a command shell (CLI) or terminal, not from within any OS on the damaged disk, you can start to duplicate the data.
The old and slow method using dd
Run
dd if=/dev/old_disk of=/dev/new_disk conv=noerror,sync
or to create an image file:
dd if=/dev/old_disk of=image_file conv=noerror
to copy the data.
To speed up the copy process, you can append bs=8k
, it will read/write the disk by 16 sectors at a time.
Kurt Garloff's 'dd_rescue'
If you believe there are many damaged sectors on the drive, you can try using either Kurt Garloff's 'dd_rescue' (dd_rescue) instead of dd.
The best method: Antonio Diaz's 'ddrescue'
The best solution, both faster and more efficient, seems to be Antonio Diaz's 'ddrescue'
(ddrescue)
# first, grab most of the error-free areas in a hurry: ddrescue -B -n /dev/old_disk /dev/new_disk rescued.log # then try to recover as much of the dicy areas as possible: ddrescue -B -r 1 /dev/old_disk /dev/new_disk rescued.log
Return to TestDisk