How to copy a defective hard drive to another hard drive on the same machine in Linux using ddBy angsuman, Gaea News Network
Monday, December 6, 2010
Use dd with low buffer size:
dd if=/dev/sda bs=1k of=/dev/sdb conv=sync,noerror
1. Replace sda with the drive being copied from
2. Replace sdb with the drive being copied to
3. noerror ensures continuation in case of errors
4. sync ensures if a block can’t be read due error, then it should at least write something to its output of the correct length.
5. The command works for non-defective hard drive to
8. For seriously defective drive use dd_rescue with optionally dd_rhelp or a new tool: ddrescue
9. dd_rhelp will use dd_rescue on your entire disc, but it will try to gather the maximum valid data before trying for ages on bunches of badsectors
10. Read more about dd_rescue and dd_rhelp in the links specified above. They are very well tested and robust software.