clone - Image Hard Drive with Bad Sectors?

20
2014-04
  • Chris Tarazi

    I have a hard drive with important data on it. I have Spinrite running right now and it has located lots of bad sectors so its pretty much toast. I would like to image the drive and get as much data back as possible without copying over any bad sectors. What software would allow to do this?

  • Answers
  • Randolf Richardson

    Drive Snapshot will backup a hard drive and skip bad sectors (as well as recording them in a plain/text log file) automatically (it's not an option that needs to be turned on):

      Drive Snapshot
      http://www.drivesnapshot.de/

    I've used this tool on many occasions to recover data from failing hard drives.

    Now, for a note of caution: As far as data recovery is concerned, depending on the cause of the bad sectors, more usage can actually make the problem worse and result in more bad sectors developing. SpinRite is an excellent tool, and I highly recommend it because Steve Gibson is a top-notch programmer with a specialized understanding of the inner workings of hard drive technology, but before using a tool that exercises the drive more like SpinRite does may still be more risky without first having a backup (that is, getting a backup before attempting further recovery is usually a good way to reduce risk).

  • Linker3000

    Clonezilla has an option to keep going when it encounters a bad sector

  • slhck

    Try ddrescue, it comes with Live CDs like SystemRescueCD

    I've used it on a dying disk and it worked pretty well.

  • huanjo

    Another way if your backup software clones the bad sectors is to run chkdsk /b in Windows 7 after the image has been cloned to the new drive. This will reset the bad sectors and then check for bad sectors.


  • Related Question

    partitioning - Is there a way to do a sector level copy/clone from one hard drive to another?
  • irrational John

    Without going into distracting details, I'm attempting to duplicate the contents of the 500GB drive in my MacBook to another 500GB drive. But this is turning out to be an unexpected hassle because the drive contains both the OS X partition and an NTFS partition with Win 7 via Apple's Boot Camp.

    With the exception of Clonezilla, the tools I have looked at so far all have some limitation. The Mac tools don't want to deal with the NTFS partition. The Windows tools are totally clueless about either the HFS+ partition and/or the hybrid MBR/GPT Boot Camp partitioning.

    Clonezilla looked like it would do what I want but apparently I can't figure out how to use it. After doing what I thought was a sector to sector copy I found that only the NTFS partition had been migrated. The others were apparently empty. (And frankly, I'm not positive Clonezilla migrated the partition table correctly either).

    Note: It takes over 2 hours using SATA to read/write all sectors with these drives. So I'm not up for using trial & error to narrow in on the right combination of Clonezilla options to use.

    I'm beginning to think that maybe the answer is to boot Linux (probably Ubuntu) and then use some ancient BSD command. Trouble is I don't know what command (or parameters to use) in order to do a sector level copy from one drive to another. As far as I know the drives have the same number of sectors so this should be trivial. Sigh.


    Yes, dd does work. (Phew!)

    I especially appreciated the link in the answer to the corresponding question/exchange on serverfault.com as I never would have thought to look there.

    Here are some additional tweaks I used after learning about them from the exchange on serverfault.

    • Don't use the default transfer size of 512 bytes. In my case I used the form
      dd if=/dev/sda of=/dev/sdb bs=8192
      since this significantly increased the data transfer rate. (It happened that the size of both my drives was a multiple of 8192. Not sure if that mattered, but it felt safer to do it that way).

    • There is a way to get some progress status from the dd command. Apparently dd displays its current transfer status when it receives the right signal. I used the method suggested in this serverfault answer. However, I used an interval of 120 seconds, not 10 as I didn't want to get "flooded" with progress info.

    It took about 2 hours 20 minutes to completely clone my 500GB drive to another 500GB drive. The final status message from dd was
    500107862016 bytes (500 GB) copied, 8353.86 s, 59.9 MB/s

    What it lacks in terms of options this process certainly makes up for in simplicity and completeness. :-)


  • Related Answers
  • James T

    In linux the dd command can do what you want.

    http://serverfault.com/questions/4906/using-dd-for-disk-cloning

    Just make sure not to clone the empty drive onto the drive you want to clone.