These notes are primarily for my own use, but maybe you’ll get some benefit out of them. Also – these directions are a work in progress; i appreciate your feedback to improve them.
Data recovery from a failed drive using dd_rescue over ssh:
- Use Helix3 as a boot disk; ensure the network is connected; Make sure the bad/recovered hard drive is connected, but do not mount it in helix – it causes unnecessary disk activity. I prefer the console mode.
- Identify the correct disk to recover. You might already know this, but use fdisk -l to be sure.
- dd_rescue /dev/hda – | ssh huanix@192.168.1.4 ‘dd of=/media/data/test.img’
- sometimes this hangs and i have to ctrl-z and restart. accept the RSA key and enter the user password.
- The rescue can take a lot of time depending on how well the head transfer went, or how damaged the platters are. My worst case average is 1gb/hr
- Now that you have the image on a safe machine, i like to make a copy of the disk image, just to be safe!
- examine/build the partition table. I struggle here, but i eventually get it right.
- fdisk -l to check the drive format
- fdisk /dev/hda
- enter expert mode (x)
- set the sectors (s), heads (h), and cylinders (c), then return to home (r) and then write (w)
- Calculate the offset: fdisk -lu //media/data/test.img
- look in the “start” column, find the value and multiply it by 512 to get your offset.
- the following mounts a fat32 partition (vfat)
- sudo mount -t vfat -o loop,offset=32256 /media/data/test.img /media/test
Primary references:
http://www.debianadmin.com/recover-data-from-a-dead-hard-drive-using-ddrescue.html
http://www.linux-usb.org/gadget/file_storage.html
As I research this method I’m learning more about dd_rescue vs. ddrescue. I’m working to use the newer, better ddrescue… this is just for reference!
Much better than dd_rescue is ddrescue: http://ww w.gnu.org/software/ddrescue/ddrescue.html
Written by Antonio Diaz Diaz.
Debian / Ubuntu users – watch out!
The package ‘ddrescue’ in Debian and Ubuntu is actually dd_rescue, another dd-like program which does not maintain a recovery log. The correct package is gddrescue
Despite his email, dd_rescue fan is correct- “ddrescue” is the preferred tool, NOT dd_rescue. Sorry- i wrote this post while i was in a steep learning curve!