Results 1 to 10 of 10

Thread: dd_rescue for copying hard drives with bad sectors

  1. #1
    Member registered user
    Join Date
    Apr 2007
    Posts
    68

    dd_rescue for copying hard drives with bad sectors

    I don't know if this has been covered before, but knoppix includes the program dd_rescue which is really a brilliant program for copying/imaging hard drives with bad sectors.

    dd will give you lots of trouble when it encounters bad sectors, usually truncating the output or exiting when it gets a read error.

    dd_rescue is much more forgiving.

    "dd_rescue" without parameters will give you a list of command line parameters. Note that the command line syntax is much different from dd.

    For example, "dd_rescue /dev/hda /dev/null" will copy from /dev/hda to /dev/null . I like to use this as a read test to see if an entire hard drive can be read.

    I had a failing hard drive whose LBA sector 0 was completely unreadable. dd wouldn't even want to look at it. With dd_rescue I was able to get most of the good data off of this drive. Interestingly, knoppix 5.1 wouldn't even give me a /dev/hda in the device directory as it couldn't read the partition table in LBA 0 and kept retrying ad infinitum. I tried knoppix 3.9 and knoppix 6.0.1 and they would give me a /dev/hda even if LBA 0 was bad.

  2. #2
    Member registered user
    Join Date
    Apr 2007
    Posts
    68
    Oh yeah, when you're using "dd" or "dd_rescue" be very careful with your parameters.

    They don't call dd "disk destroyer" for nothing!

    From wikipedia: It is jokingly said to stand for "data destroyer" or "delete data", since, being used for low-level operations on hard disks, a small mistake, such as reversing the if and of parameters, may accidentally render the entire disk unusable

    The best way to "practice" with dd is with a system with non-critical data on it.

  3. #3
    Administrator Site Admin-
    Join Date
    Sep 2008
    Posts
    174
    Thanks, don999. Another good thread on dd_rescue and here's a useful page.

  4. #4
    Moderator Moderator
    Join Date
    Jan 2010
    Location
    Asheville, NC, USA
    Posts
    528
    Quote Originally Posted by Clinton
    Thanks, don999. Another good thread on dd_rescue and here's a useful page.
    Hey-

    Sorry if I'm being dense, but can I burn something in the second link's zip to a CD, maybe the .IMG file? The utility there can make a bootable CD if I am understanding properly.

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    1

    What happens when drive stop responding?

    I am using Knoppix 6.2.1 and dd_rescue to try and recover files from a failing hard drive with bad sectors. The drive has one NTFS partition and is in an external USB enclosure. In Windows XP, I can access the drive until a bad sector is read and then the drive becomes unresponsive. It is like the drive was disconnected from the USB port.

    So running Knoppix 6.2.1, I was hoping to recover any files that are still readable with dd_rescue. However, once dd_rescue reads a bad sector, the hard drive appears to become unresponsive (unmounted?) and dd_rescue starts scrolling a lot of errors. I have allowed dd_rescue to run for well over an hour scrolling errors. Should I allow dd_rescue to complete or is there some way of forcing the hard drive from being unmounted?

  6. #6
    Moderator Moderator
    Join Date
    Jan 2010
    Location
    Asheville, NC, USA
    Posts
    528

    Re: What happens when drive stop responding?

    Quote Originally Posted by mifronte
    I am using Knoppix 6.2.1 and dd_rescue to try and recover files from a failing hard drive with bad sectors. The drive has one NTFS partition and is in an external USB enclosure. In Windows XP, I can access the drive until a bad sector is read and then the drive becomes unresponsive. It is like the drive was disconnected from the USB port.

    So running Knoppix 6.2.1, I was hoping to recover any files that are still readable with dd_rescue. However, once dd_rescue reads a bad sector, the hard drive appears to become unresponsive (unmounted?) and dd_rescue starts scrolling a lot of errors. I have allowed dd_rescue to run for well over an hour scrolling errors. Should I allow dd_rescue to complete or is there some way of forcing the hard drive from being unmounted?
    It sounds to me like a pretty severe situation; I've been advised by others in this forum to use "Hiren's Boot CD" in the past when Knoppix was insufficient. If you search it out on the web you can download it (the best place to get it, back when I needed it, was a Thai server) and there are a LOT of great tools on there. I ended up using a version of Microsoft's disk scanning utility "chkdsk" (no additional license required) that worked a lot better than the one in XP to recover from errors on my NTFS partition. Look for other posts within these fora for more details, or elsewhere on the web.

    Krishna

  7. #7
    Member registered user
    Join Date
    Apr 2007
    Posts
    68

    What happens when drive stops responding?

    Often times, a really bad drive will stop responding. You can abort the dd_rescue program with a CTRL+C. Sometimes I will attempt to skip over a really bad area by aborting and then retrying with the skip option. Can't remember the exact syntax off the top of my head but running dd_rescue with no parameters should tell you.

    You can also install GNU ddrescue; using the synaptic package manager from the knoppix GUI which is a dd_rescue like program (but spelled differently).

    The GNU ddrescue program will use a log file and skip over LARGE bad areas on the drive automatically, then come back later and try to fill in the gaps. Works really well and can often recover more than dd_rescue which is geared to make a single pass. However, nothing can recover from a drive that is really stuffed up...

  8. #8
    Junior Member
    Join Date
    May 2010
    Posts
    1
    I am in the process of using DD_rescue to copy anything left on a hard drive that crashed to a new hard drive that I bought. I've got it running alright, but I'm wondering about the next step:

    If/when anything copies to the new hard drive, how do I get it off of this new hard drive. The only thing I really need are some pictures that were on the old one when it crashed.

    Needless to say, I am very new to Linux. I have a coworker who is willing to help with specifics, but does not have time to do the research. He helped me get it running after I showed him this forum and is loaning me his copy of knoppix.

  9. #9
    Moderator Moderator
    Join Date
    Jan 2010
    Location
    Asheville, NC, USA
    Posts
    528
    Quote Originally Posted by tollhaus View Post
    I am in the process of using DD_rescue to copy anything left on a hard drive that crashed to a new hard drive that I bought. I've got it running alright, but I'm wondering about the next step:

    If/when anything copies to the new hard drive, how do I get it off of this new hard drive. The only thing I really need are some pictures that were on the old one when it crashed.

    Needless to say, I am very new to Linux. I have a coworker who is willing to help with specifics, but does not have time to do the research. He helped me get it running after I showed him this forum and is loaning me his copy of knoppix.
    It sounds like you need to check out the man-page for dd_rescue - just open LX-terminal (little black tv-screen icon on lower left) and type:
    Code:
    man dd_rescue
    Or, you can search the web for the same string. Basically, you can limit how much gets copied in the first place; if you need to get rid of anything afterwards you can use PCman (file-folder icon next to the LXterm icon) or
    Code:
    rm -rf /the/path/and/name-to-delete
    in the terminal window.

    Cheers!
    Krishna

  10. #10
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423

    dd_rescue and ddrescue

    I did not have to use dd_rescue until I have a crashed hard disk.

    Then I start reading about dd_rescue. But it's confusing because there is another program call ddrescue around. The one included in Knoppix is dd_rescue, while some of the docs in the net talks about ddrescue ( the GNU version of dd rescue ). The ddrescue Debian package is called gddrescue, but the program name is ddrescue.

    I would actually recommend to use ddrescue instead of dd_rescue. 'ddrescue' with a log file makes it interruptable and resumable. And if there are bad sectors, it can retry the bad sectors at some other time when you cool off the hard drive or if you take it out from the freezer.

Similar Threads

  1. Copying Between NTFS Drives
    By Zeroez in forum MS Windows & New to Linux
    Replies: 5
    Last Post: 11-26-2007, 05:02 PM
  2. problem copying knoppix kernel to hard drive
    By fatblueduck in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 06-14-2005, 09:09 PM
  3. Thousand of BAD Sectors on Hard Drive
    By skwerl in forum Hardware & Booting
    Replies: 2
    Last Post: 05-31-2005, 01:08 AM
  4. One PC, 2 drives, copying/moving date from one to the other
    By Torriatte in forum General Support
    Replies: 16
    Last Post: 11-29-2004, 08:33 PM
  5. copying Knoppix to Hard Drive
    By beajedi in forum Customising & Remastering
    Replies: 13
    Last Post: 06-05-2003, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •