daknetworks.com

You are here: Blog Walk Through: Clone Hard Drive with Bad Blocks By Using ddrescue

Walk Through: Clone Hard Drive with Bad Blocks By Using ddrescue

Walk Through: Clone Hard Drive with Bad Blocks By Using ddrescue

OK, here it is again in simple terms. You can't fix bad blocks. Once it happens, it grows. If you see bad blocks anywhere, replace the HD as soon as possible.

The best way to make this happen is by cloning the disk. Here's how:

This process ignores filesystems so it will work on Windows (NTFS) and Linux (ext2, ext3). I haven't tried other filesystems but can imagine it would work fine as well. Although on Mac's I use Carbon Copy Cloner (CCC).

  • -shutdown the computer that needs fixing.
  • -buy a disk the exact same size (or larger) as the disk that has bad blocks on it.
  • -physically install the HD in the computer.
  • -download SYSRESCUE CD here:
  • -make a bootable SYSRESCUE CD.
  • -boot off of the SYSRESCUE CD.
  • -accpect the defaults as it boots.
  • -you are at a black command prompt.
  • -find which HD is in which position.
1.sfdisk -luS /dev/sda /dev/sdb

-typically the sda will have a partition table & sdb will have nothing and you'll get "no partitions found".

-Great. Wonderful.

-Now let's clone the disk by rescuing a whole disc with all partitions in /dev/hda to /dev/hdb.

Note: you do not need to partition the new disk /dev/hdb beforehand, but if the partition table on /dev/hda is damaged, you'll need to recreate it somehow on /dev/hdb.

1.ddrescue -f -n /dev/sda /dev/sdb rescue.log

If the system is really important, then do it a second time with the following options. This pass will be slower but more thorough.

1.ddrescue -d -f -r3 /dev/sda /dev/sdb rescue.log

Now let's shutdown.

Remove sda (the old drive).

Now reboot.

Boot fine! It recognizes the new cloned drive as sda.

Shutdown.

Reposition the drive sda to the first slot for sanity's sake.

Contact Dak Networks

We are not taking on new clients at this time.