Sections

README

What is dd_rhelp ?-----------------

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

This makes dd_rescue the best tool for recovering hard drive having badsectors. (dd_rescue can be found :
http://www.garloff.de/kurt/linux/ddrescue )

But using it is quite time consuming. This is where dd_rhelp come to
help.

In short, it'll use dd_rescue on your entire disc, but will try to gather
themaximum valid data before trying for ages on badsectors. So if you leavedd_rhelp work for infinite time, it'll have the same effect as a simpledd_rescue. But because you might not have this infinite time (this couldindeed take really long in some cases... ), dd_rhelp will jump over badsectors and rescue valid data. In the long run, it'll parse all your
devicewith dd_rescue.You can Ctrl-C it whenever you want, and rerun-it at will, it'll resume
it'sjob as it depends on the log files dd_rescue creates.

In addition, progress will be shown in a ASCII picture of your device
beeingrescued.

As stated by Kurt Garloff for his dd_rescue program :"Just one note: It does work. I unfortunately did not just create this
programfor fun ..."

As it is for dd_rhelp, which has saved me YEARS on my hard drive.

Important note :----------------

For some times, dd_rhelp was the only tool (AFAIK) that did this type of
job, butsince a few years, it is not true anymore : Antonio Diaz did write a
idealreplacement for my tool : GNU 'ddrescue'.

Yes, this is not very clever to have called a tool the same name that
'dd_rescue'from Kurt Garloff (catch the subtle difference between 'ddrescue' and
'dd_rescue' ?),but it seems that it was done by intent as we warned Antonio Diaz from
the fact itwould probably mess users in this tiny world of hard drive recovery
tools.

Nevertheless, I really encourage you to use this replacement tool if it
works for you(and it should be the case). Why ? Understand first what we are comparing
:- dd_rhelp (in bash script) + dd_rescue (in C) in one hand- ddrescue (in C) in the other.

dd_rhelp was meant as a quick hack to implement what dd_rescue didn't do,
and whatcouldn't be done at that time (AFAIK).

It could be some cases where ddrescue won't work, and this is the major
reason whyI keep maintaining dd_rhelp. It is important to tell me and Antonio Diaz
when thesecases occur.

Now that you are enlightened, you are free to use dd_rhelp.

Why do people want to use dd_rhelp ?-----------------------------------

Well, you do not WANT to use dd_rhelp. I hope you'll never HAVE TO use
it.

Basically, if you have bad sector corrupting your filesystem you'll haveseveral solutions depending on the filesystem itslef, the partition
table,and what remains accessible...

In some recovering process, as a first stage, you'll need to secure all
theremaining data of your disk (or partition) in a file on a healthier
filesystem.Often, next operations are to mount the file with loopback device (for
example)to rebuild the damaged filesystem information. Once the filesystem
meta-datahas been reconstructed on the healthier filesystem, chances are that
you'll beable to access files. These could then be in various states depending of
howthey have been affected by the damages. Possible file states are ranging
fromcompletely recovered without any further work, to lost, damaged,
scrambled,and often anonymously collected in your filesystem lost-and-found
repository...

dd_rhelp and dd_rescue are meant to be in the very first phase only :
securingyour remaining data into a another file.

dd_rescue which has been created by Kurt Garloff, is a great program. And
couldalready help you without dd_rhelp. But in some case, like disks cluttered
withbad sectors, it can be time consuming to use for 2 main reasons :

1 - it does straight recovery, and thus can spend months making it's path
ina solid bunch of bad sectors before rescuing hole portions of perfectly
saindata hidden just after.

2 - if you decide to manoeuver dd_rescue to stop him when he's bumping in
largesequences of bad sectors and try to start it from spots to spots in
normal orreverse direction (as dd_rescue options allows this), then this can
requirea lot of YOUR time.

It is where dd_rhelp comes to help : it is a wrapper for dd_rescue. This
meansit'll call it with various arguments to change it's start position or thedirection of the scanning process. It'll guide dd_rescue into a new
behaviorwhich will lead to rescuing much more data in the beginning of the
process allover the disk.

Why do people want to use dd_rhelp ? (v2)----------------------------------------

This can really take a long time if you have much bad sectors. (and I had
thisproblem).

As bad sectors tends to be in large groups and these groups seems to tend
tobe dispatched on drive, and if you just launch dd_rescue on the beginning
ofyour drive and there is a large group of bad sectors coming next, you
couldbe waiting for years ! (and without rescuing any data). And you cannotanswer these questions :- Is there any valid data to rescue AFTER this chunk ?- How big is this chunk ?- When will I get answer to these two first question ?

So your solution with dd_rescue is to stop dd_rescue, and "jump" ahead
randomlyand try to copy from a chosen offset. Then you could again fall on a
group ofbad sectors...and then you should stop dd_rescue and jump somewhere else on your drive.This behavior involves the user's constant presence (you !).

The idea of the dd_rhelp shell script is to do this job : launchingdd_rescue for you on the disk while trying to get the max amount of dataout of your disk in a minimum of time. It'll be jumping over bad blocks,using the reverse copy option of dd_rescue to pin out bad sector group
andrescue as much data as you could have rescued manualy.

Why use dd_rhelp and not dd_rescue ?------------------------------------

This is a good question. 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.

Why wouldn't you want 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 of the process.
Using dd_rescue straight throughout your device make waiting time dependent on
the badsector distribution.

Think about dd_rescue standalone if you only intend (and can afford) to
wait until a full dd_rescue scan. dd_rhelp optimizes only the order in which
this full scan will occur to focus on recovery of what will be recoverable in
first. So in the end, launching dd_rhelp for a full scan will take exactly the
same time dd_rescue would have taken plus a considerable time which correspond
to the overhead of calculating its path.

How should I use it ?---------------------

Since version 0.1.0, you won't need to do this step :

> First build it from sources, with "./configure && make"> Optionnaly run "make install"...

This shell script is very basic and not well written, but it supports the"--help" and "--version" of GNU Coding Standard. It should be quite
clear.

so go for a :

dd_rhelp --version

When running dd_rhelp you can safely Ctrl-C, or kill dd_rhelp, it'll
resumeits job the next time you call it.

Olivier SANTIANO, a french dd_rhelp user shared his experience of
completeprocess of recovering his hard drive with dd_rhelp and post-dd_rhelp
recoverywork :http://f1efq.free.fr/save.htm (in french)

How do I install this package ?-------------------------------

Since 0.1.0, dd_rhelp is directly usable (you can copy it to a directory
inyour path, or use it directly out of the box).

How does it work ?-------------------

dd_rhelp uses log files made by dd_rescue. Precisely, it searches for the"Summary report" that dd_rescue prints when its job is over.

1 - dd_rhelp creates itself an internal representation of what has beenparsed with dd_rescue.2 - It'll find the greatest part of the disk that hasn't been tested and
willlaunch dd_rescue from the middle of this part backwards, then forwards
until itrescues without error all data, or until it falls on 5 consecutive read
errors.3 - go back to step 1 unless everything has been dd_rescued...

Requirements ?--------------

It worked fine for me (Home made distrib) on big harddrives (partitions
of15 Gigs). Received positive feedbacks on large partition (60 Gigs and200 Gigs), and it should only be limited by the linux kernel limitation.
Thoughthe bash script could be longer to compute next position in very large
diskwith lots of bad sectors scatered all over your disk.

It worked on Debian, and on a Knoppix CD. After each release, I test it
ona knoppix with a 1.44M diskette with badsectors or damaged
CD-ROM/DVD-ROM.

Darwin/MacOSX should be supported with GNU sed, GNU bc installed. Has
beenworking since 0.0.6 . This support is erratical, so more feedback areappreciated.

If you have any other experiences of dd_rhelp, please let me know.

IMPORTANT NOTE :

This shell script needs version >= 1.03 of dd_rescue !!!!

I want to look in the code, but it's really complicated-------------------------------------------------------

Yes, I know. This is a big bash script because I rely on a personnalshell library which finishes included nearly completely at thebeginning of the script.

Feel free to modify, give hint or else.

We are all knowing that a quick C program should be better. So feel freeto create it ! And this is what Antonio Diaz did for its "GNU ddrescue"
program, make sure to have a look to it before using dd_rhelp.