Idiot's Guide To ddrescue

HFultzjr

Well-Known Member
Reaction score
907
Location
Central PA, USA
Ok, here goes nothing!

I've put together a "Guide" for anyone who would like to start using ddrescue.

Ok, a couple of things first........
This is for BEGINNERS (those who have no understanding of Linux).
This uses ddrescue not dd_rescue....they are two different programs
This is just the very basics to get you started. More commands may be added later.
I AM NOT PROFICIENT WITH LINUX!
I suck at writing guides, grammer and spelling!
I am not responsible for any lost data...I do not suggest trying to learn it with customer's data.
I probably won't be much help with questions, as I'm still learning this. But I'm sure others can be of help.

Please look at the following link. It is where most of my guide is based on. LOOK AT IT FIRST....the "guide" will make much more sense.

http://www.myfixlog.com/fix.php?fid=21

Ok, here goes...........

Idiot's Guide To ddrescue
Items Needed:
Computer with bad hard drive
Latest version of Parted Magic (08/01/2013) ISO burned to bootable CD
http://www.majorgeeks.com/files/details/parted_magic.html
USB drive larger than the partition you are trying to recover with one large NTFS formatted partition of the entire drive

Procedure #1:
Boot Parted Magic CD
Select 1st boot option (or others if needed)
After booting, you will be presented with the Parted Magic Desktop
Run the Disk Health icon located on the desktop
This will run g-smart control which can be used to determine if your drive is bad
After drive is determined bad proceed to Procedure #2

Procedure #2:

Plug in USB drive

On bottom left of desktop, you will see 4 icons. Hover your mouse over them and open the one called Parted Magic Mount. This will open a window that will show the status of your drives and partitions, mounted or unmounted. Note the names of the Drives/Partitions in the left column. Make sure all Drives/Partitions are showing Green Button Mount (this means it is unmounted), except your USB drive which should be Red Button Unmounted, (this means it is mounted).

You can determine which partition you want to recover from the left side of Parted Magic Mount by looking at the partition sizes. No need to worry about the NTFS or FAT32 formats. It should work with all of them.

Be careful, this is the only part that may be a little confusing if the computer has multiple drives attached. MAKE SURE YOU USE THE CORRECT DRIVE/PARTITION names, or you may lose (overwrite) your data. You may now leave this window open and drag it off to the side for future reference.

On bottom left of desktop, you will see 4 icons. Hover your mouse over them and open the one called ROXTerm. This is where we will run ddrescue from. Position this window and the Parted Magic Mount window so both can be viewed.

Type ddrescue in the terminal window. It should say:
root@partedmagic:~= ddrescue

You should only need to type ddrescue to achieve this. After you type ddrescue, type space /dev/the name of the partion you want to recover. You should have something like this:
root@partedmagic:~= ddrescue /dev/sda2

sda2 will be replaced with the name of the partition you are trying to recover......sda1, sda2, sdb1, sdb2, etc.

After this we will type the parameters for where we are rescuing the data to (our USB drive). However, when we do this, we must change the name of our USB drive from "dev" to "media", when we put in the parameters. We will also be naming our backup image. In my case I used backup.img.

You will be adding something like:
/media/sdf1/backup.img

sdf1 will be replaced with what your USB drive show in Parted Magic Mount window

You should now have something like:
root@partedmagic:~ddrescue /dev/sda2 /media/sdf1/backup.img

Note the space between ddrescue and /dev/sda2. Also note the space between /dev/sda2 and /media/sdf1/backup.img

After adding another space, we will now be adding a log file in the format of our USB drive:
/media/sdf1/logfile.txt

You should now have:
root@partedmagic:~ddrescue /dev/sda2 /media/sdf1/backup.img /media/sdf1/logfile.txt

Note the 3 spaces needed:
One after root@partedmagic:~ddrescue
One after root@partedmagic:~ddrescue /dev/sda2
One after root@partedmagic:~ddrescue /dev/sda2 /media/sdf1/backup.img

Here they are with the spaces noted:
root@partedmagic:~ddrescue^/dev/sda2^/media/sdf1/backup.img^/media/sdf1/logfile.txt

Now, just press enter and watch ddrescue do it's work

If you get an error, it is more than likely you have the spaces wrong

If you want to interrupt, press: Ctrl-C

You can then restart by using the EXACT same parameters and it should pick-up where it left off:
root@partedmagic:~ddrescue /dev/sda2 /media/sdf1/backup.img /media/sdf1/logfile.txt

When you are done, you must unmount your USB drive by clicking the Red unmount button

You may then exit the program and remove the USB drive after shutdown

You may then mount and view your .img file in a program such as: OSF Mount
http://www.osforensics.com/tools/mount-disk-images.html

I hope this helps someone......make sure you review the link at the beginng of this post...it puts things in perspective better than I can.
 
Last edited:
Thanks to you all.

I hope it will be of some help.

ddrescue is really a great program, you just need to get started using it in a simple way.
 
Great. Now I have something else to learn this weekend. Thank you for taking the time to put it together.
 
Used this guide for the first time last night. Also first use of the gparted boot disk.

The combination of gparted disk and these instructions made using ddrescue infinitely easier than my previous attempts (even the successful ones) using various other Linux distros.

Identifying the devices/media involved and the launching of ddrescue to recover partitions was smooth (once I got out of my own way and just followed the instructions) and easy.

Thanks again!
 
Used this guide for the first time last night. Also first use of the gparted boot disk.

The combination of gparted disk and these instructions made using ddrescue infinitely easier than my previous attempts (even the successful ones) using various other Linux distros.

Identifying the devices/media involved and the launching of ddrescue to recover partitions was smooth (once I got out of my own way and just followed the instructions) and easy.

Thanks again!

GREAT!

I'm glad it was of value to you

Now you get to learn more commands to add......LOL
 
Back
Top