Prev
Next

Day After Tomorrow

The Last Airbender

Iron Man 2

Final Composite

Iron Man 2

Original Plate

SAAB

Audi

Priest

Priest

Priest

Vanilla Sky

Archetype

Day After Tomorrow

Mezzo

Nine Inch Nails

Ford

Recovering a bad drive with the Ubuntu Live CD

articlesRecovering a bad drive with the Ubuntu Live CD
throbJanuary 10, 2012articles
test

Well, I lost a drive in my raid.  The new drive did not take so I was advised to clone the drive.  I tried several Windows based utils.  All of them failed at the task of pure sector cloning.  Pathetic.

Well, Linux (Ubuntu) to the rescue.  I downloaded the Ubuntu 11.10 LiveCD because I knew I could use ddrescue to copy sectors and the software would skip the bad sectors.  Groovy.

Well, it took a bit of fiddling to get it to work so here is what I did.

Step 1 : Grab Ubuntu : http://www.ubuntu.com/download/ubuntu/download

Step 2 : Once you have booted in and are “trying” out Ubuntu you will need to dd_rescue package.

If you downloaded the 32 bit Ubuntu go here :
http://packages.ubuntu.com/oneiric/i386/ddrescue/download

If you downloaded the 64 bit Ubuntu go here :
http://packages.ubuntu.com/oneiric/amd64/ddrescue/download

Pick a mirror and you can download/save the .deb file.

Step 3 : Extract the deb file

You should cd ~/Downloads

in here you want to extract the file like so :

ar x ddrescue_1.23-1_i386.deb

This will create several files :

-rw-r--r--  1 ubuntu ubuntu  1096 2012-01-10 07:22 control.tar.gz
-rw-r--r--  1 ubuntu ubuntu 22251 2012-01-10 07:22 data.tar.gz
-rw-rw-r--  1 ubuntu ubuntu 23540 2012-01-10 07:21 ddrescue_1.23-1_i386.deb
-rw-r--r--  1 ubuntu ubuntu     4 2012-01-10 07:22 debian-binary

You want to extract the data.tar.gz :

tar zxvf data.tar.gz

This will give you several more files but the one you want is : ./bin/dd_rescue

Step 4 : Figure out which disk you need to clone!

Get a list of disks on the system like so :

sudo lshw -C disk

This will give you manufacturer info so it will be easy to figure out which one is the new drive, etc.  Ok, whew.

It looks like so :

Step 5 : clone that sucker!

sudo ./bin/dd_rescue -v /dev/sdc /dev/sdd

This means clone the /dev/sdc device to /dec/sdd with verbose mode turned on.  Yes you can watch it clone.  It’s exciting.  Actually this sucks.  It’s hours and when it encounters errors it slows down like a stoned turtle.

That should do it however.  Hopefully the data is intact on the new drive!