Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently having a close call with a hard lesson!

My 2TB WD Green drive started throwing bad blocks after a year of service. I have recovered all but 82kb of data to an image on a spare 3TB drive using the following commands:

ddrescue --no-split /dev/sda1 /media/store1/store1.img /media/store1/store1.log

Then I ran

ddrescue --direct --max-retries=3 /dev/sda1 /media/store1/store1.img /media/store1/store1.log

Followed by

ddrescue --direct --retrim --max-retries=3 /dev/sda1 /media/store1/store1.img 

I have another empty 3TB drive which can be used for a restore. But I'd quite like some advice first, as this recovery has taken 3 solid days and I wouldn't want to screw it up!

From what I understand, I could restore the image to a disk and then repair the copied bad blocks.. Would that be correct?

share|improve this question
up vote 1 down vote accepted

Since you didn't copy the whole disk but only the first partition, you have to recreate the partition table first. If you have both drives in your box at the same time, you can use something like this: Otherwise, just note down the parameters and recreate them exactly on the second drive.

Then you dd your image back onto the first partition of the new drive (no point using ddrescue here). You should run an fsck after that, in case the bad block was in the file system. If it was in the files itself, you can find out which one using the original drive as described here:

share|improve this answer
Perfect! Thank you. – MrNorm Jan 16 '13 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .