Dec 192006
 

Sponsored Link

dd_rhelp is a bash script that handles a very usefull program written in C which is called dd_rescue, it roughly act as the dd linux command with the caracteristic to NOT stop when it falls on read/write errors.

This makes dd_rescue the best tool for recovering hard drive having bad sectors.In short, it'll use dd_rescue on your entire disc, but will try to gather the maximum valid data before trying for ages on badsectors. So if you leave dd_rhelp work for infinite time, it'll have the same effect as a simple dd_rescue. But because you might not have this infinite time , dd_rhelp will jump over bad sectors and rescue valid data. In the long run, it'll parse all your device with dd_rescue.

You can Ctrl-C it whenever you want, and rerun-it at will, it'll resume it's job as it depends on the log files dd_rescue creates.In addition, progress will be shown in a ASCII picture of your device beeing rescued.

Why use dd_rhelp and not dd_rescue ?

dd_rhelp uses dd_rescue to compute a recovery path through the device that will focus on valid data recovering. This recovery path will go through all the device, exactly as dd_rescue could do it on its own without any path. This means that dd_rhelp will save you time ONLY IF YOU INTEND TO CANCEL ITS JOB BEFORE THE END of a full recovery.

Because a considerable amount of time is taken to try to rescue badsectors. This amount of time can be mesured in days,
month, years, depending on your device capacity and its defectiveness. You might not want to spend this time knowing that 99 percent of this time will be taken to look at badsector and won't lead to any more data recovering.

dd_rhelp shifts this useless waiting time to the end. Using dd_rescue strait throughout your device make your waiting time dependent on the badsector distribution.

Install dd_rhelp

First you need to download latest version from here

Preparing your system

#apt-get install make gcc g++ ddrescue

If you are using ubuntu linux use the following command

sudo apt-get install make gcc g++ ddrescue

Download dd_rhelp using the follwoing command

wget http://www.kalysto.org/pkg/dd_rhelp-0.0.6.tar.gz

Now you have dd_rhelp-0.0.6.tar.gz file

Extract this file using the following command

tar xzvf dd_rhelp-0.0.6.tar.gz

cd dd_rhelp-0.0.6

Run the following commands

# ./configure

# make

# make install

If you are using ubuntu linux use the following command

sudo ./configure

sudo make

sudo make install

This will complete the installation and this will install program under /usr/local/bin/dd_rhelp

dd_rhelp Syntax

dd_rhelp {filename|device} {output-file} [{info}]
or dd_rhelp --help
or dd_rhelp --version

Now we will see how to use ddrescue under damaged disk

If you have a damaged hard disk /dev/sda1 and you have an empty space hard disk /dev/sda2 Now if you want to copy data from /dev/sda1 to /dev/sda2 use the following command

#dd_rhelp /dev/sda1 /dev/sda2/backup.img

If you are using ubuntu linux use the following command

sudo dd_rhelp /dev/sda1 /dev/sda2/backup.img

Output looks like below

/usr/bin/tail: Warning: "+number" syntax is deprecated, please use "-n +number"
=== launched via ‘dd_rhelp' at 0k, 0 >>> ===
dd_rescue: (info): ipos: 104384.0k, opos: 104384.0k, xferd: 104384.0k
errs: 0, errxfer: 0.0k, succxfer: 104384.0k
+curr.rate: 10178kB/s, avg.rate: 8532kB/s, avg.load: 31.3%
dd_rescue: (info): /dev/sda2 (104391.0k): EOF
Summary for /dev/sda2 -> backup.img:
dd_rescue: (info): ipos: 104391.0k, opos: 104391.0k, xferd: 104391.0k
errs: 0, errxfer: 0.0k, succxfer: 104391.0k
+curr.rate: 355kB/s, avg.rate: 8519kB/s, avg.load: 31.3%
/usr/bin/tail: Warning: "+number" syntax is deprecated, please use "-n +number"

This copies an image of /dev/sda1 to sda2

Now you need to check the backup image consistency this will check for is there any problems with this image.

#fsck -y /dev/sda2/backup.img

If you are using ubuntu linux use the following command

sudo fsck -y /dev/sda2/backup.img

After finishing this checking you need to mount your disk image in to your other hard disk

#mount /dev/sda2/backup.img /mnt/recoverydata

If you are using ubuntu linux use the following command

sudo mount /dev/sda2/backup.img /mnt/recoverydata

This will mount all the data from the backup.img under /mnt/recoverydata now you can try to access the data it should
work without any problem.

Restore image

If you want to restore this image use the following command

#dd_rhelp /dev/sda2/backup.img /dev/sda1

If you are using ubuntu linux use the following command

sudo dd_rhelp /dev/sda2/backup.img /dev/sda1

Copy Disk Image to remote machine using SSH

If you want to copy your disk image to remote machine over ssh you need to use the following command

#dd_rhelp /dev/sda1 -- | ssh username@machineip ‘cat /datarecovery/backup.img’

If you are using ubuntu linux use the following command

sudo dd_rhelp /dev/sda1 -- | ssh username@machineip ‘cat /datarecovery/backup.img’

This will be prompetd for password of the username you have menctioned in the above command after entering the password

dd_rhelp strats copying obviously it will take some time to copy over the network.

Sponsored Link

 Posted by at 4:59 pm

  16 Responses to “Recover Data from a Damaged hard disk using dd_rhelp”

  1. Installed and used this script. It was amazing! You saved my boss, and of course me, a lot of stress Thanks for posting this!

    Although I should add that I also tried to use this on a physically damaged drive, and it naturally couldn’t do anything. I had to contact a few hard drive repair companies, and finally got in touch with one that worked well. Everyone was trying like mad to have me ship my drive without a quote! It was like a feeding frenzy! Fortunately I came across a company called Hard Drive . Good site, and the guy in charge really knew his stuff.

    I just thought I should mention this, because although dd_rhelp is really good, in cases of physically damaged hard drives, it won’t help much.

    Cal Janus
    Tech Wizards LLC

  2. Looks very good: however, can somebody point me in the right direction on the makefile? My (ubuntu) command is sudo make install and I’m having trouble:

    robert@Humphrey:~/dd_rhelp-0.0.6$ sudo make install
    make[1]: Entering directory `/home/robert/dd_rhelp-0.0.6′
    test -z “/usr/local/bin” || mkdir -p — . “/usr/local/bin”
    /usr/bin/install -c ‘dd_rhelp’ ‘/usr/local/bin/dd_rhelp’
    make[1]: Nothing to be done for `install-data-am’.
    make[1]: Leaving directory `/home/robert/dd_rhelp-0.0.6′

    Funny! So I looked at the makefile and sure enough, install-data-am is an empty reference. How did you guys get past this??

    Thanks
    Limbers

  3. Hi i keep getting the error message
    Warning: “+number” syntax is deprecated, please use “-n +number”
    and the output file is only 11.9mb big, when it’s copying from a 160gb drive!

    I’m trying to copy from the hard drive dev/hdb (160gb ntfs) to media/Elements (500gb vfat external usb). I heard that vfat format could cause this to happen, any ideas how to get around it?

    Cheers,

    Kieran

  4. sudo dd_rhelp /dev/sda1 – | ssh username@machineip ‘cat /datarecovery/backup.img’

    sudo dd_rhelp /dev/sda1 – | ssh username@machineip cat > “/datarecovery/backup.img”

  5. my hard drive fell off my bed and when i connect it i hear this whirling or grinding noise on and off…..my mate says it will be the read/write heads is there anyway of retrieving the files as it no longer registers with my computer:( please help

  6. I have a damaged Internal HDD (Maxtor SATA 500GB) When I check in vista I see Device I/O Error and it shows there is 0MB data stoted on it, and also I cannot see the partions I created before.
    SO Can I use this way to back data?

  7. Joe, Dave

    Go to my harddrive died dot com putting all this together of course. Watch the videos, Scott Moulton is leading the industry in hardware data recovery. He explains how to do most data recoveries for under a 100$. I have personally followed his explanations and did platter swap, head swaps, pcb board swaps. In your case your plobably going to need to do a head swap. What ever you do don’t turn that HD on again, everytime you turn it on it is scratching more of your platters.

  8. i got a maxtor 80GB hard disk as my secondary data storage.its worked properly past 4 years. but now its not detected by computer.can any one say me how can i recover all data without any lost.please its urgent

  9. hello, great article but, how different is this if the drive has a damaged ntfs partition?

  10. Hi all,
    I’ve a question, I have a HDD which has failed a HDD test (seagate), I can still see the data when booting into windows but it is in a profile that I don’t have privilages to in another os. When booting into windows xp it bluescreens from the broken hdd. I’ve tried a number of password changers and erasers using hirens so i’ll be able to access the data. Where do I go now in terms of getting the remaining data that isn’t damaged off the HDD??
    HELP!!!!

  11. GNU’s ddrescue may be a better choice. This from wikipedia:

    “dd_rhelp or GNU ddrescue will yield a complete disk image, faster but possibly with some errors. GNU ddrescue is generally much faster, as it is written entirely in C++, whereas dd_rhelp is a shell script acting as a frontend to dd_rescue. Both dd_rhelp and GNU ddrescue aim to copy data fast where there are no errors, then copy in smaller blocks and with retries where there are errors. GNU ddrescue is easy to use with default options, and can easily be downloaded and compiled on Linux-based Live CDs such as Knoppix, and can be used with SystemRescueCD.”
    source:

  12. sir i neeed help please help me my harddisk has an error it will open too slow it has much viruse when i conect it into my computer it will shown in dos but when i install a window on it an error will shown that you can not install windows in this partition it will happin every partition and its run too slow and it has a sound always beep beeep beeep sir please help me my importante data on it how can i get it please tell me my cellphone number is 923033767460 im from pakistan send me a messege from internet to mobile please help meeeeee….

  13. Hello,,
    My Hard disk Fails then where i have to write this commands???

  14. i cant seem to figure out how to get Gddrescue to auto restart after the source drive disapears … is dd_rhelp the answer and will it work with gddrescue? Does the target drive need to be formated?

  15. I have a damaged Internal HDD (WD SATA 250GB Samsung R509 laptop) When I check in windows 7 I see Device I/O Error and it shows there is 0MB data stoted on it, and also I cannot see the partions I created before. It also show by disk management that the hard drive is unallocated and not initialized it shows in bios
    I want to know if I can retrieve any data on the hard drive? witch software i can use?

  16. Antes de conseguir “instalar” o dd_rhelp, tive que procurar muito no Google como se fazia isto.

    No final das contas, tudo ficou muito simples após ler as duas páginas a seguir:

    ————————————————————————————
    a) “http://www.debianadmin.com/recover-data-from-a-damaged-hard-disk-using-dd_rhelp.html”:

    dd_rhelp is a bash script that handles a very usefull program written in C which is called dd_rescue, it roughly act as the dd linux command with the caracteristic to
    NOT stop when it falls on read/write errors.

    =====> OBS.: Nesta página, eu descobri que o dd_rhelp era um “BASH SCRIPT”.

    ————————————————————————————
    b) “http://ubuntuforums.org/showthread.php?t=996717″:
    ([ubuntu] How to compile bash from an editor? – Ubuntu Forums.html)

    Re: How to compile bash from an editor?
    Last time on this one:

    bash shell scripts are interpreted not compiled — hence there is no reason to compile them.

    If you want a personal .bash or .sh file, compose the file, save it, do the following:

    chmod +x

    Copy the file to your personal bin directory since this is in your path (you have to make the directory since its not included by default):
    mkdir -p ~/bin

    cp ~/bin/

    Ok now you can run the shell script from the command line by simply typing

    NO NEED TO COMPILE!!!

    =====> OBS.: Nesta página, eu descobri que não é necessário (nem possível) compilar um bash script

    ————————————————————————————-

    Descompactei o arquivo dd_rhelp-0.1.2.tar.gz dentro da pasta dd_rhelp (que eu criei especificamente para guardar o .gz e vários .mht de páginas de dica).

    Dentro da pasta dd_rhelp sugiu uma pasta chamada dd_rhelp-0.1.2.
    Dentro da nova pasta havia um arquivo dd_rhelp (o Nautilus dizia que o tipo era “shell script”).
    Copiei o arquivo dd_rhelp para a pasta /bin
    Na pasta /bin, o Nautilus dizia que o tipo do arquivo era “unknow”.
    Troquei o atributo “executable” do arquivo para true e o Nautilus passou a dizer que o tipo era “program”.
    Obs.: o tipo do arquivo dd_rescue (que já estava em /bin é “executable”
    A partir daí já era possível “executar” o dd_rhelp.

    Veja o que eu fiz no Terminal:

    $ cd /media/2N500XP/Down500XP/SoftDownload/UBUNTU/dd_rhelp/dd_rhelp-0.1.2 (change directory)
    $ sudo cp dd_rhelp /bin (SuperUser usando o cp (copy))
    $ sudo chmod +x dd_rhelp (SuperUser usando o chmod, que troca o atributo executable. Poderia ser também “sudo chmod 777 dd_rhelp”)
    $ sudo dd_rhelp (Chamei o comando dd_rhelp)

    Pronto ! Neste instante, o dd_rhelp respondeu:
    Need 2 arguments…
    usage: dd_rhelp {filename|device} {output-file} [{info}]
    or dd_rhelp –help
    or dd_rhelp –version

    “INSTALADO !!!!!”

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>