How to Clone a Hard Drive With Bad Sectors Using ddrescue

tomx2

New member
Hi

I am trying to do a Disk to Disk clone using ddrescue.
Have 2 Flash drives source sdb(128gb) and Target sdc(134gb) inserted into my USB ports running from Kali Linux distro. I created logfile.txt on my Desktop.
When I run the command I get the following error message followed by ddrescue help text.

root@kali:~/Desktop# ddrescue -f /dev/sdb /dev/sdc logfile.txt

ddrescue: (fatal): spurious options: logfile.txt …

The problem appear to my lofgile.txt. If I run ddresue without logfile.txt it start without error message. I need the logfile to identify the bad sectors.

Created logfile using the Linux “Touch” command. Logfile.txt is on my desktop (cd Desktop), Running as root user.

Any help would be appreciated: Thanks TC.
4.14.0-kali1-amd64 GNU/Linux
 

Jared

Administrator
Staff member
Try specifying the full path of the log file. Use a command like:

Code:
ddrescue -f /dev/sdb /dev/sdc home/users/Desktop/logfile.txt

Also, it'll create the log file on its own. You shouldn't create one for it or that'll cause confusion to the program. Also, bear in mind that Linux is always case sensitive, so watch those capital and lower-case letters.
 

Dwyver

New member
Hello,

I'm a new user of ddrescue and linux due to a problem with one of my hard drives that made my entire partition in RAW.

I started with this command line:
sudo ddrescue -n -f /dev/sde /dev/sdd /media/user/USBMEDIA/log1.log

everything went well. and then I used this one:
sudo ddrescue -r3 -d -f /dev/sde /dev/sdd /media/user/USBMEDIA/log1.log

And there my LOG file reached 11GB, is it normal?

Thanks in advance for your help.
 

Jared

Administrator
Staff member
That's pretty big for a log file. I don't think I've ever seen one get beyond a few Mb size. Are you sure you didn't just forget to type in the destination path the second time you ran it? Perhaps you were actually imaging the drive onto the log file path.
 

jimmy5

Member
hi
i think i am now ready and equipped to start my first clone, but which flags should i use then? just -f (and r3 perhaps?) is good enough and i dont need to add -n, -d or anything else?
and maybe someone can add to the beginning of the post that "DO NOT use any of the chkdsk commands to "fix" your drive(it will just delete most of the indexes/files)!!!" ? with bold and red color...
 

Jared

Administrator
Staff member
I would start the first pas by just using the -f trigger. You really don't need any others.

As to not running chkdsk, I'd add that warning, except for the fact that people who are looking for a ddrescue guide likely either already understand that danger or have already made that mistake.
 

paul90

New member
Jared":ujdb27xc said:
I would start the first pas by just using the -f trigger. You really don't need any others.

The first pass is always a good idea, because you avoid the scrapping face over the badblocks, so that pass you rescue everything you can and then you do another one over the same image file srapping the bad sectors found. If the head/s of your HDD has some kind of problem or is close to failing... if you stop on the badblocks (very slow areas) is more easier to it embiggens the problem and crash sooner (plus you get more data in less time).

-f is only mandatory if you are gonna save the image directly to a partition or hard drive (clone). I usually save it to an image file so i never use -f.

Jared":ujdb27xc said:
As to not running chkdsk, I'd add that warning, except for the fact that people who are looking for a ddrescue guide likely either already understand that danger or have already made that mistake.

Totally. chkdsk work really nice, but only if the drive is working correctly but if it has some kind of mechanical error or some badblocks, it is gonna **** things up, bring up more errors and make the recovery thing harder... and is one of the very first things users usually do hehe.
 

Robert Jones

New member
To be fair to me, even the problem itself is complicated. I do not understand anything in computers, much less in their failures. But since my computer broke I had to look for the exit. My data from him suddenly disappeared. I can not resolve this issue independently within a month. But I applied [shadow=blue]SPAM DATA RECOVERY[/shadow] they solved my problem .
 

Jared

Administrator
Staff member
Robert Jones":2bdsx8b4 said:
To be fair to me, even the problem itself is complicated. I do not understand anything in computers, much less in their failures. But since my computer broke I had to look for the exit. My data from him suddenly disappeared. I can not resolve this issue independently within a month. But I applied [shadow=blue]SPAM DATA RECOVERY[/shadow] they solved my problem .

Nice attempt at SPAMMING here. What's sad is that SPAM isn't strictly prohibited here if it's related to data recovery.

However, pretending to be an end user of your own services to trick people into using your company is a low-life scumbag thing to do and it just got your company banned from link dropping here.
 

Boogie

New member
hi
great site.
noob here.
have a 12tb seagate that dies on me within a week(dont, just dont).
started the process according to jareds tutorial with jus tthe -f arguement and all was going well until i got Unaligned read error. Is sector size correct? at which point the scan stopped.
i have googled searched and looked for over an hour with no idea how to proceed.
any ideas please?
there was 1.2tb data on the hdd until it disappeared and then was only showing as RAW.
i use drivepool to pool disks and this 1.2tb was not duplicated and therefore is NOT vital(hence attempting recovery myself).
but as there is a 1.2tb poolpart on there(out of a total of 30tb) it will obviously be best if i can reinstate this poolpart so that drivepool can eventually "see" it and re'add tot he pool.
PS suck my ***k seagate you utter (unts.
NEVER ever ever again.
PPS only went seagate due to being a cheap motherfofo and getting the barracuda pro 12tb for £250.
if its too good to be true-it always is.
Sigh
 
Top