ddrescue flags

Captain Spaulding

Active Member
Reaction score
45
Location
Chichester, West Sussex, UK
Hi,

I have a disk that has several bad sectors, I have already copied any important customer data off it. As it still boots (very slowly) I would like to try and get a clone to a good disk, the normal software I use for cloning won't get a clone (Easeus) so I want to try ddrescue.

Please can someone let me know the best command for cloning a disk that has known bad sectors, looking at the guide here I think it might be:

ddrescue -d -f /dev/sda /dev/sdb /media/PNY_usb/rescue.logfile

Obviously first checking/changing the source/destination disk names and changing the logfile to a flash stick.

I've seen other methods mentioned elsewhere on Google so I just wanted to confirm with someone that has done it before.

Thanks.
 
I generally do it in multiple passes.

First pass:

Code:
ddrescue /dev/sda /dev/sdb /media/PNY_usb/rescue.logfile

Default options, skips any sectors it can't read immediately. Add -f if ddrescue complains and doesn't run.

Second pass:

Code:
ddrescue -d -r 3 /dev/sda /dev/sdb /media/PNY_usb/rescue.logfile

Retries any sectors missed from the first pass. Uses direct disk access, retries unreadable sectors up to three times before skipping them. Again, add -f if necessary.
 
The steps by codegreen are probably your safest best.

If your client's drive is in this rough of shape, you may want to verify that their critical files that you already backed up are actually readable. If not, you might want to lighten up on the clone and consider outsourcing before the drive completely dies.

That said, if you are able to clone the majority of sectors without a lot of read errors with ddrescue, it likely won't be too bad.
 
I generally do it in multiple passes.

First pass:

Code:
ddrescue /dev/sda /dev/sdb /media/PNY_usb/rescue.logfile

Default options, skips any sectors it can't read immediately. Add -f if ddrescue complains and doesn't run.

Second pass:

Code:
ddrescue -d -r 3 /dev/sda /dev/sdb /media/PNY_usb/rescue.logfile

Retries any sectors missed from the first pass. Uses direct disk access, retries unreadable sectors up to three times before skipping them. Again, add -f if necessary.

It worked! ddrescue is now my fav tool, thats saved a heap of time :) The new disk runs a treat, thanks :)
 
It worked! ddrescue is now my fav tool, thats saved a heap of time :) The new disk runs a treat, thanks :)

You're welcome! ddrescue is powerful tool once you get the hang of it. If this was helpful, feel free to throw some +rep my way (even though saying this makes me feel like the hotel bellhop clearing his throat and holding his hand out :D).
 
It worked! ddrescue is now my fav tool, thats saved a heap of time :) The new disk runs a treat, thanks :)

Great to hear.

I'd recommend thoroughly checking all of the apps the customers uses plus M$ utilities. I've used Clonezilla many times to clone a drive that has bad sectors. Probably 30% end up failing testing because, I'm guessing, that some of the bad blocks were located where the apps had necessary files.

Personally I make the decision based on customer's situation. Most consumers I'll just do a new clean install and go from there with data restore. If it's a business user and they have extenuating circumstances such as missing application disks I'll try the clone method since they are willing to pay extra for testing.
 
Great to hear.

I'd recommend thoroughly checking all of the apps the customers uses plus M$ utilities. I've used Clonezilla many times to clone a drive that has bad sectors. Probably 30% end up failing testing because, I'm guessing, that some of the bad blocks were located where the apps had necessary files.

Personally I make the decision based on customer's situation. Most consumers I'll just do a new clean install and go from there with data restore. If it's a business user and they have extenuating circumstances such as missing application disks I'll try the clone method since they are willing to pay extra for testing.

This was a customer who had a new disk installed by me about a month ago so a clone was much the preferred option as I'm not charging. This is the first WD Black disk I've installed that's failed. The only thing that failed during testing was Norton which the customer had installed just before the disk failed, Norton removal tool and a reinstall has sorted that.
 
Back
Top