Thursday, October 29, 2009

Data Recovery Tips and Tricks

If your hard drive is dying, go and buy a new hard drive and a USB enclosure for it. If you have a copy of Norton Ghost, you can clone the failing hard drive over to the new hard drive. Alternatively, if you have the courage, build a WinPE CD using either PEBuilder or UBCD. If you wish to go the Linux route, there's System Rescue CD, although any Linux Live CD will work. If you build a WinPE clone, put Norton Ghost32.exe or the Windows version of ddrescue.exe along with the cygwin1.dll on the CD. When using cygwin or its tools, you have to use the POSIX device names for the drives.

Here's some tips on using ddrescue:
1. Always use a log file
2. Start ddrescue like this the first time:
ddrescue /dev/sda1 /dev/sdb1 logfile.log (sda1 will be the C: drive, sdb1 will be
the replacement drive.) Do not get them backwards in order.
3. Once you notice a ddrescue struggling to read through bad sectors, kill the job.
In Linux, you can try pkill ddrescue, or ps -ef | grep ddrescue . Find the PID or
process id number. Then type kill -9 pid, i.e. kill -9 1234.
4. Rerun ddrescue using the -i and -s switches, i.e. ddrescue -i75G -s125G logfile.log
(start copying 125GB after the first 75GB). The -s switch is size or amount to copy.
The -i switch is the initial position to copy from. You want to copy as much of the good
parts of the drive as quickly as possible, so skip the bad parts if you can.
5. Once you have most of the drive copied, then kill the job and type the following:
ddrescue -n -d /dev/sda1 /dev/sdb1 logfile.log . Ddrescue will read the log file and
only copy what it hasn't copied. With the above command, it will try to trim the bad
sectors and recover as much data as it can without recovering the bad sectors.
6. You can then try to recover the bad sectors, but this will be VERY time consuming and
problematic. Rerun ddrescue like so: ddrescue -r3 -d /dev/sda1 /dev/sdb1 logfile.log .
7. You can then rerun ddrescue using the -n -d switches to get anything you missed, but
by this stage it is likely you've recovered all the data that you are going to get.
Google "man ddrescue" and "info ddrescue" for more information about the program.

If you need to recover an audio CD, you can use cdrdao. Ddrescue is only good for recovering digital media. Audio CDs use a different format and can't be read by ddrescue. If the audio CD has scratches, you will get skips using a normal CD or DVD burning program. I have built a GUI front end for ddrescue that works on Windows. If any one wishes to use it, you can email me at jbmoore61 [AT] gmail[DOT]com. I hope to have it on sourceforge.net or some other convenient web site shortly.

Using an Ubuntu liveCD is easiest. Just boot your system with the liveCD. Under accessories, choose terminal. Then type sudo su. The prompt will change to # which means you are essentially root. Then type dhclient to grab an IP address, or you can click on the adapter icon in the upper righthand corner of the screen. Then type apt-get update ; apt-get install ddrescue. Choose y if prompted and ddrescue will be installed into the ramdisk. You can then use ddrescue to recover and copy your Windows drive to the new hard drive. Try to get a replacement drive that is the same size as your old drive. If you get a larger drive, you may have to run qpartd or gpartd to make the new copy use all of the new drive's disk space.

Labels:


Comments:
Note: this advice is for the original dd_rescue (package name: ddrescue), not the newer GNU ddrescue (package name: gddrescue)
 
Nope. This advice is for the gddrescue package. I was using Ubuntu and dd_rescue is not installed. You can only install gddrescue on Ubuntu.

/sbin/ddrescue --version
GNU ddrescue 1.11
Copyright (C) 2009 Antonio Diaz Diaz.
 
Data Recovery Denver I use the score -r to reverse the way dd runs that can get past some of the issues posted here.
 
Data recovery denver I use the hash tag (-r) to reverse the order ddrescue runs in this offen helps out with alot the issus's mentaned here.
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?