Recover data from the crash disk
If you’ve Linux based OS installed and your disk is crashed, you can retrieve data from ddrescue commands in following easy steps.
Ddrescue is data recovery tool that copy data from one file or block device (hard disc, cdrom etc),it is a tool to help out you to save data from crashed partition. It has capability to read the data and if it fails it will go on with the next sectors, where tools like dd will fail. If the copying process is interrupted by the user it is possible to continue at any position later. It can copy backwards too.
Install first the dd_rescue or ddrescue
If you are using RedHat/Fedora Core Linux, type the following command:
# yum -y install ddrescue
If you are using Debian Linux:# apt-get install ddrescue
Or directly download ddrescue from official GNU Web site. http://www.gnu.org/software/ddrescue/ddrescue.html
Make sure that Debian install ddrescue binary as /bin/dd_rescue and other distribution as /usr/bin/ddrescue
To make exact copy of /dev/sda (damaged) to /dev/sdb (make sure sdb is empty) you need to type following command:
# ddrescue /dev/hda /dev/hdb
Your further step is to run fsck on /dev/sdb partition to recover/save data. Remember do not touch originally damaged /dev/sda. If this procedure fails you can send your disk to professional data recovery service. For example if /home (user data) is on /dev/sda2, you need to run a command on /dev/sdb2:
# fsck /dev/sdb2
Once fsck run, mount /dev/sdb2 somewhere and see if you can access data:
# mount /dev/sdb2 /mnt/data
Now it is time to take backup using tar command.
ddrescue command supports many options. Just to remind you, Don’t forget to read man page:
# man ddrescue OR # man dd_rescue
