Recovering data from a hard drive with bad sectors

data-recoveryhard drive

A friend of mine recently gave me a laptop that wasn't booting past the Windows screen. I replaced the hard drive with a new one and put the old hard drive in my comp. to try and recover the data.

Windows 7 didn't recognise the main OS partition indicating some filesystem corruption (disk manager showed it as a RAW drive instead of NTFS). Incidentally, the hard drive has two other partitions: the small 100 MB one was fine in Windows and the 10 GB Recovery partition was fine after Windows ran a disk check).

Then I booted up with a Linux live CD (Slax) and the filesystem was recognised fine. However, when trying to copy files, many files would cause errors each one holding up the copy process by about a minute. I'm copying about 120 GB of data with thousands of bad files so this means it takes forever to copy.

There are big files (videos and photos) and small files (documents).

What I need is a way to copy files from a dying HD so:

  • if a file is bad, it fails silently (not interactively)
  • it fails quickly (< 1 seconds ideally)
  • it optionally deletes the bad file from the destination (not necessary)

so that the process can be done overnight.

Do you know a live CD where copy behaves like that or parameters to cp I can use or the settings for ddrescue I need to use or some other method to do this (I'm a linux noob)?

Alternatively, do you know a way to mount a broken filesystem in Windows (it looks like there are errors in important locations so Windows doesn't recognise it as NTFS). Then I can try xcopy.

Best Answer

DDrescue or some other recovery oriented dd variant is a good choice.

RIP has ddrescue in it – if you want a distribution with it baked in. The ddrescue manpage should give you an idea of what to look for, it's basically

ddrescue source destination

Then run fsck or some other drive error correction method, or recover files as needed.

Related Question