KalaDude
Data Recovery Noob
Posts: 2
Joined: Fri Mar 31, 2017 4:48 am

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Mon Apr 03, 2017 8:30 pm

I used DD-Gui to perform clone as I am noob and want to avoid destroying the planet.

Here is the output of the logfile:

# Rescue Logfile. Created by GNU ddrescue version 1.19
# Command line: ddrescue -v -d -f -r 2 -c 32 -b 4096 /dev/sdc1 /dev/sdb /home/recovWDC2tb.log
# Start time: 2017-03-30 13:40:51
# Current time: 2017-03-30 22:07:11
# Finished
# current_pos current_status
0x19F000DF000 +
# pos size status
0x00000000 0x19F000DE000 +
0x19F000DE000 0x00001000 -
0x19F000DF000 0x000C5000 +
0x19F001A4000 0x00001000 -
0x19F001A5000 0x000C6000 +
0x19F0026B000 0x00001000 -
0x19F0026C000 0x2EC0F94000 +

** I thought a logfile of this type should have terminated with an "END"

Running "parted -l" reports:

Model: ATA ST2000DM001-1ER1 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 2000GB 2000GB ext4

I am pretty certain that I didn't mess up when I changed the mount options.

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Tue Apr 04, 2017 8:34 am

Well, right off I see that you cloned a partition (logical volume) to a physical device. So it's not going to mount because no partition table exists on the destination now. The file system starts now right at sector 0 where the table should be. Your input/source device should have been /dev/sdc not /dev/sdc1.

Whate1972
Data Recovery Noob
Posts: 1
Joined: Tue Apr 18, 2017 1:43 am

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Tue Apr 18, 2017 1:46 am

HEy folks, thanks for your post, i have done that kind of rescue of data and it was succesefull!! Thanks!

vivitricky
Data Recovery Noob
Posts: 2
Joined: Mon May 22, 2017 8:55 am

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Tue May 23, 2017 1:56 am

thanks

groves
Data Recovery Noob
Posts: 2
Joined: Tue Jul 04, 2017 10:16 pm

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Tue Jul 04, 2017 10:33 pm

Really great guide. I've been running dd_rescue for a couple days now going forwards. I plan to do the same in reverse, and probably alternate back and forth.

My drive has been tricky so far. Whenever certain sectors are hit, the drive 'disconnects' and I have to power cycle it (as mentioned in the guide) in order for dd_rescue to continue. When the drive disconnects, dd_rescue displays its reading at 0 bytes/second while the offset continues to increment. I power cycle it each time and it works again. The issue is that I have to do this repeatedly -- sometimes it can run unsupervised for hours but other times it hits this area within an hour or even minutes.

Is it easily possible to force a hard drive to power cycle without physically disconnecting it? Ideally I would like it to tie in with dd_rescue, i.e. as soon as it hits one of these sectors, the drive is power cycled so it can continue without skipping any good sectors.

User avatar
lcoughey
Forum Moderator
Posts: 590
Joined: Mon Jan 12, 2015 12:46 pm
Location: Ontario, Canada
Contact: Website Facebook Twitter Google+

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Wed Jul 05, 2017 1:00 pm

groves wrote:Is it easily possible to force a hard drive to power cycle without physically disconnecting it? Ideally I would like it to tie in with dd_rescue, i.e. as soon as it hits one of these sectors, the drive is power cycled so it can continue without skipping any good sectors.

This thread is more about GNU ddrescue, which is much better than dd_rescue. But, they run on similar concepts.

As for the automatic power cycle, this is the shortfall of cloning software and thus why data recovery professionals invest thousands in data recovery imaging hardware such as DeepSpar Disk Imagers and PC3000 Data Extractor. What is taking you days or weeks to accomplish is something that we are likely to handle in a matter of hours and possibly a couple days, if in really rough shape. Many reputable labs will charge their base rate if it is something that they can recover without any need for changing heads and transplanting platters. My lab, Recovery Force, charges $350 CAD (~ $270 USD) for such cases and the host of this forum, Data Medics, would likely charge $450 USD for this case.

So, if it is worth your time and risk of possibly killing the drive and not worth the cost of a professional lab doing the recovery, keep fighting. Just take note that every time the drive freezes up, it may be the last time that it will come back online.

groves
Data Recovery Noob
Posts: 2
Joined: Tue Jul 04, 2017 10:16 pm

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Wed Jul 05, 2017 11:49 pm

lcoughey wrote:This thread is more about GNU ddrescue, which is much better than dd_rescue. But, they run on similar concepts.

My mistake, I am talking about the ddrescue mentioned in the guide.

lcoughey wrote:So, if it is worth your time and risk of possibly killing the drive and not worth the cost of a professional lab doing the recovery, keep fighting. Just take note that every time the drive freezes up, it may be the last time that it will come back online.

Thanks for the warning. I already extracted most of the valuable data from this drive by trial and error (copying batches of files at a time until a freeze occurs, power cycle, skip the file that caused the freeze, continue). I'm not too worried about killing the drive at this point although I would like to salvage whatever else I can. Physically disconnecting the drive with ddrescue scanning all bytes has slowed progress considerably, so I may go back to my trial and error approach (with TestDisk or similar).

Another idea I had was to programmatically enumerate all offsets for files in directories I'd like to recover (i.e. ntfscluster) and using dd/ddrescue by targeting only those offsets. As far as I know, this is similar to what TestDisk does when browsing the filesystem/copying. The downside with the TestDisk is that it's still very manual, and each time I power cycle I have to restart TestDisk because the drive may have switched locations. I might try to write a script to automate TestDisk runs and detect freezes if something like that doesn't exist already.

onsan
Data Recovery Noob
Posts: 2
Joined: Mon Aug 28, 2017 5:44 pm

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Mon Aug 28, 2017 5:57 pm

G'day Jared, thanks for the write-up.
I set up ubuntu on a USB and had been running my scan through that and was making progress, however I had to interrupt the imaging and realised after that the log file generated was not saved due to not having a persistent memory setup on the USB (or saving the log file to the destination drive).
So there doesn't seem to be a way I can salvage the log file from the USB to resume the scan.
I have completed around 150GB of imaging so far. I did not have any success with using the commands;
ddrescue infile outfile
or
dd if=infile of=outfile conv=noerror,sync
or
ddrescue --generate-mode infile outfile logfile
But I'm wondering if this is to generate a log file from the image created so far that it would need to reference the location of the .img?

Is there any other alternatives that may give me an approximate point to resume from or am I better off just sucking it up and starting again?

Thanks,
Paul.

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Mon Aug 28, 2017 6:46 pm

If you lost your log file, I'm afraid there's not much you can do beside to just restart it. That log is how it keeps track of what sectors were/weren't read successfully.

The only other thing you could do is to just start the imaging at an offset approximately where you think it was. But, that would mean it wouldn't do any trimming to clean up the unread areas in the part you already imaged.

onsan
Data Recovery Noob
Posts: 2
Joined: Mon Aug 28, 2017 5:44 pm

How to Clone a Hard Drive With Bad Sectors Using ddrescue

Mon Aug 28, 2017 6:56 pm

no worries, will start again. thanks.

Return to “Data Recovery Tutorials”

Who is online

Users browsing this forum: No registered users and 0 guests