Got a fix, how to, or an answer? Earn some money!

... Info Report ...
Views: 42257
50% Success Rate (4 votes)
Did this work for you?
Logger: jake
Date: December 22nd, 2010
| Share
... ...
How to Create an Image of a Crashed Hard Drive using the UBCD, dd-rescue and P2 eXplorer

The Problem

My hard drive crashed!  I have lost all my picture, docs, etc.  My hard won't boot.  How do I recover my files?

How do I get them back?  My computer is under warranty and I have to return the Hard Drive soon, how do I make a copy of it before I send it back?

Also, I cannot stress the importance of making regular back ups.  I suggest usingMyPCBackup, an online back up utility.  MyPCBackup is easy to use and comes with a free version. 

The Hard Drive Recovery Guide for Non-Geeks - Get your Files Back from a Crashed Drive!
How to Image a Damaged Drive with dd-rescue
Tags: recover, ddrescue, dd-rescue, dd, UBCD, Ultimate Boot CD, Image, P2 eXplorer, Paraben, Repair

The Fix

Summary: You can image a damaged hard drive with just a few clicks using BootMed Plus.

This fix is part of a Data Recovery Guide, click here to see the entire guide.

It is likely that your files are still there!  The FIRST thing you should always do in this situation is make an image (a copy) of your Hard Drive. Making an image won't fix anything; it will simply make an exact copy of your disk, copying good as well as corrupt data. Damaged hard drives usually only get progressively worse the more they are used, so to cut your losses you need to make an image. You then will recover your data from a different computer, using the image, while leaving the damaged hard drive alone - protecting it from further damage. To do this you will need an external hard drive.  You probably already have learned the value of having an external hard drive to back to files up to.  So if you do not have one this is a good time to buy one, or just borrow one from a friend.  It will need to be larger than your hard drive.  For example, if you are recovering files from a 250 gigabyte hard drive, a 300 gigabyte external drive would be sufficient. To do this tutorial you will need to download the following (free) software:

The Ultimate Boot CD  (Scroll down to "Mirror Sites" and click the download icon next to "ISO".  It does not matter which sponser you use.)

P2 eXplorer 

Step 1 - Burning the Ultimate Boot CD (UBCD)

If you downloaded the Ultimate Boot CD (UBCD) to a computer with Windows 7 this step will be simple. Simply put a blank CD in your computer and right click on the UBCD file, selecting "Burn Disk Image". Click "Burn".

Windows XP and Vista users will need to download a seperate program to do this.  If you are not sure how to burn an ISO, just follow this tutorial to see how to do it using free software: How to burn an ISO to a CD

Step 2 - Booting up UBCD

Image 2

Image 1

Put your UBCD into the computer that has the crashed hard drive.  If you are asked whether or not to boot from the CD, you do want to, so follow the instuctions.  Other wise your computer should boot the CD and you should see this screen (Image 1).  Scroll down using the arrow keys and select "Parted Magic" and hit enter.

A screen will appear asking if you would like to the "Default Settings".  Hit enter to accept. (Image 2) Parted Magic will now load, this may take a few minutes.

Step 3 - Identifying your Hard Drive

Image 2

Image 1

Once Parted Magic has loaded click on the icon titled "Mount Devices" from the desktop.  A couple of windows will appear.  (Image 1)  In the smaller window will be listed all of your storage devices (Hard drives, CD-ROMs, Pen Drives, External Hard Drives).  The "Mount" button next to each device tells the computer to connect to that device.  You need to click on the "Mount" button next to your external hard drive. (DO NOT MOUNT THE DRIVE YOU WANT TO RECOVER) You external hard drive should be the largest of the storage devices listed.  When you examine file size remember that MiB stands for Megabyte and GiB for Gigabyte.  In Image 1 you will notice that my first drive listed is 78.24 MiB, which is much smaller than my 64.45 GiB hard drive.

In this image (Image 2) the cursor is over my external hard drive, which Parted Magic has mounted.  You will also notice that my pen drive is mounted. Now is also a good time to jot down some information about your hard drive, for use in a later step.  First you will need to identify which of the listed devices is the hard drive/parition* you would like to recover.  It will probably be the largest drive listed, asside from your external HD and it will most likely have "ATA" as part of its "Model".

Once you have found your hard drive write down its path, which you will see to the right of its size.  Ex: /media/sda3  Now do the same for the external hard drive.  Ex: /media/sdb1  You will need this information is a later step

*Partitions are divisions of a hard drive.  For example, you can split one physical hard drive into two partitions, which Windows sees as, for example, a C: drive and a D: drive.  Computer companies will also create hidden partitions containing diagnostic programs or a recovery image.  These hidden partitions will be much smaller that the partition you use and are wanting to recover.  If you look at (Image 2), my hard drive's model is "ATA Hitachi HTS54168".  You will see three drives listed with this same model.  The three drives are actaully three partitions on one hard drive, the ATA Hitachi HTS54168.  

Step 4 - Using dd-rescue to Copy your Hard Drive

Image 3

Image 2

Image 1

In the bottom left of your screen you should see a few icons.  Click on the one that looks like a computer screen.  (Image 1)  This will open a window similar to DOS, called LXTerminal.  If you are able to, position the windows in a way that you can see the list of Hard Drives as well as the LXTerminal window.  (Image 2)  In the LXTerminal window you will run dd-rescue which will copy an image of the hard drive to your external hard drive.

Dd-rescue will require two pieces of information - which drive to copy and where to copy it.  In the previous step you should have identified the hard drive you want to recover, as well as your external hard drive and you wrote down their paths.  You will use these paths to tell dd-rescue which drive to copy and where to copy it.  If the window with the list of hard drives is open you can refer to it in case of any doubts. The command is rather simple, though it will vary from computer to computer.  First, type ddrescue into the LXTerminal window, then add one space.  Next you will type in the path (that you jotted down in the previous step) of the hard drive you would like to recover, with one small change.  In the example the path of the bad hard drive was /media/sda3.  You will need to change media to dev.  So what you have typed in so far should look like this:

ddrescue /dev/sda3

The next (and last) thing you need to type in is the path of the external hard drive and the name you would like the image file to have.  The path will be just as you wrote it down in the previous step, with the addition of the image's file name.  My external hard drive path in the example was /media/sdb1 and I will choose "backup" as the name for my image and put .img as the file extension.  This means that the path for my image file is /media/sdb1/backup.img  Put a space between the path of the bad hard drive and then type the path for your external hard drive and image name.  It should look something like this:

ddrescue /dev/sda3 /media/sdb1/backup.img

At this point you can hit enter.  Dd-rescue should now start copying your hard drive!

Step 5 - Finish Copying

Image 3

Image 2

Image 1

Copying (Image 1) will take a while and depending on the type of problems your hard drive has, it may take days.

Once it has finished copying you can shut your computer down by clicking on the bottom left icon and then "Logout."  (Image 2)  Select "Shutdown the computer" and click "OK." (Image 3). Be sure to remove the CD from your cd-rom before you boot again, so that it does not boot in the UBCD.

Step 6 - Installing P2 eXplorer

P2 eXplorer is a program that we will use to read the image file and create a virtual hard drive.  A virtual hard drive will look just like a regular hard drive to you, but it is actually just a file (in this case your hard drive image file) and not a seperate hard disk.

To begin installing P2 eXplore double click on the installation file you downloaded (click here to download it).  Click "next" on the welcome screen.  Click "next" again to accept the default installation folder.  Then click "Install."  P2 eXplorer will then install and prompt you to restart your computer, click "Yes."

Step 7 - Setting Up the Virtual Disk (Part 1)

Image 3

Image 2

Image 1

Now that your computer has restarted click on the Start button (or the Windows Logo for Vista/7 users) and then find "Paraben Corporation", then "P2 eXplorer", then click on "P2 eXplorer".  P2 eXplorer will then load an icon to your system tray in your taskbar, in the bottom right part of your screen (Image 1).  Right click on the icon and select "Mount Image" (Image 2).

In the window that appears click "Next".  In the next window click open.  (Image 3)

Step 8 - Setting Up the Virtual Disk (Part 2)

Image 1

In the window that opens you will need to change the file types to open from the default to "All files (*.*)".  (Image 1)  Once you have done this, navigate to the external hard drive where you saved your image file, select your image file (image.img) and click "Open".  You can now click next and then click next again. You should now see the "Image Information" window.  You can now click "Finish" and "OK".

Step 9 - Recovering your Files!

Open My Computer (Windowns XP) or Computer (Vista/7 - Click on the Windows Logo and then lick Computer).  You should now see an extra hard drive.  If you are not sure which it is, it should be the last drive in alphabetical order.  Double click to open the drive.

Now that you can see your hard drive you need to navigate to where your files are stored. This will depend on the version of Windows you have. For XP users - Double click "Documents and Settings" You should now be able to see the folders that contain the majority of your data - "My Documents" and "Desktop".

For Vista/Windows 7 users - Double click "Users" You should now be able to see the folders that contain the majority of your data - "Documents", "Pictures", "Videos" and "Music"

You can now copy your files!

If you cannot see your files move on to the next step.

Step 10 - Scanning with Recuva

If the image does not contain your files or you cannot access them, you can scan the image with a free program called Recuva.  This tutorial uses Recuva to recover files from a flash drive, but the instructions are the same for the virtual drive you created.  In the wizard, when you select "Specific Location" find the virtual hard drive.

How To Use Recuva to Recover your files from a Flash Drive or Memory Card 

Additional Resources

There are no resources.


Add a Comment

General Comments

2012-03-16 07:03:14samo231 comments:
the external hard drive that I'm trying to fix doesn't show up in "Mount Devices" window, so is there a way to fix this? and how I can know its path?