How do you repair a damaged or corrupt partition? [closed]

Do not attempt any recovery of a HDD while it's still in an enclosure.

Cut that sucker out if you need to and plug it in directly via IDE or SATA.

Best software for partition recovery http://www.cgsecurity.org/wiki/TestDisk
Best software for file recovery http://www.cgsecurity.org/wiki/PhotoRec

I've succesfully used both several times a year with clients who get nuked drives.

On a drive that may have 'bad' or 'damaged' sectors it is highly recommended to do a Block level clone of the problem drive onto a new drive using GNU ddrescue. There are a couple of 'dd' based programmes. That one is the best.

Check the Cgsecurity article on Disk Duplication

Duplicating the disk and working on the new one will improve your chances of success due to possible mechanical failure of the problem drive during recovery.

Or if you just want to do it on the problem drive then run a Seatools test which is fine for any brand drive (they each have thier own progs but this is best):

  • Seagate Seatools http://www.seagate.com/www/en-us/support/downloads/seatools/

All the programmes mentioned are available on livecd's. Below is a good list.

  • http://www.cgsecurity.org/wiki/TestDisk_Livecd

To answer the question title and since it's not tagged Windows I figured I'd throw in this for completeness:

If this was on a Mac, and the drive was formatted for HFS+ (standard for most Mac drives) or FAT32 I'd recommend the following steps:

  1. Open Disk Utility.app in /Applications/Utilties
  2. See if the partition is simply unmounted or if Disk First Aid will fix the issue - use Verify Disk first.
  3. Try DiskWarrior - it's a mainly one trick pony that any sys admin who works with Macs should know about because it works.
  4. If you need to do File Recovery try using FileSalvage or Data Rescue II