Recovering data from a hard drive with bad sectors

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.


Possibly recover bad sectors first.

SpinRite

SpinRite is a computer software program for scanning magnetic data storage devices such as hard disks, recovering data from them and refreshing their surfaces.

HDD Regenerator

Program features

  • Fast hard drive problems detection.
  • Ability to detect physical bad sectors on a hard disk drive surface.
  • Ability to repair physical bad sectors (magnetic errors) on a hard disk surface.
  • ...