situation: i receive notebook with hdd in agonal state. winxp no longer boots up. i decide to connect hdd to desktop pc. bios detects it, but operating system [another winxp] is unable to recognize partitions. surprisingly linux [namely knoppix] detects partitions and is even able to read some files from secondary partition.
i take another ide hard drive, under windows i create similar partitioning as on original – faulty – disk: primary partition, one logical drive, with size a bit bigger than in original.
i reboot again to knoppix and use dd with syntax as below to copy data:
dd if=/dev/hdcX of=/dev/hddX conv=noerror,sync
when dd got stuck on bad sectors area i’ve terminated it and got as result sth similar:
29072+0 records in
29072+0 records out
14884864 bytes transferred in 0.627128 seconds (23734970 bytes/sec)
so dd managed to read 14884864 bytes from src hard drive and got stuck on bad sectors area. it’ll slow down significantly and make multiple attempts to read each of bad sectors. but we can skip this area and continue after few megabytes. obviously it means loss of few MB of data, but still – rest of it will be recovered.
dd if=/dev/hdcX of=/dev/hddX conv=noerror,sync seek=XXXXXXX skip=XXXXXXX ibs=512
where XXXXXXX is (14884864+some number of bytes to skip)/512
thus i skip [and loose] some amount of data, but i’m able to continue copying at the point where other tools crashed [ norton ghost and partimage were tested ].