Linux: Recover data from the crash disk.
Greetings Micfo members,
If you have Linux based OS installed and if your disk is crashed then try following steps if you want to retrive data from ddrescue commands.
Ddrescue is a program that copies data from one file or block device to another,
it is a tool to help you to save data from crashed partition. It tries to read 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.
Install 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
Please note 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
Naturally next 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
It is time to take backup using tar command.
ddrescue command supports tons of options. Dont forget to read man page:
# man ddrescue OR # man dd_rescue
Enjoy..

Leave a Reply
You must be logged in to post a comment.