bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ddrescue] user-interface suggestions


From: Richard Neill
Subject: [Bug-ddrescue] user-interface suggestions
Date: Sun, 10 May 2009 18:09:01 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090330)

Dear All,

Firstly, may I say thank you very much for the excellent ddrescue. It has saved a substantial amount of data.

May I suggest some UI enhancements?


I am afraid I'm guilty of not fully reading the manual, and I started to run the program without a logfile. Clearly this is an common user-error, as shown by the very existence of the -g option!
May I propose the following changes:


1. Make it more obvious that a logfile is strongly recommended. Change the man page synopsis to remove the [] from logfile. Thus

SYNOPSIS
       ddrescue [options] infile outfile [logfile]

would become:
       ddrescue [options] infile outfile logfile



2. If a logfile is not proposed, then print a warning message suggesting the user cancel and start again.

Or, perhaps ddrescue should quit with an error, unless the user explicitly over-rides the logfile by specifying
  --really-don't-use-a-logfile



Some other thoughts:

3. The -d option could perhaps be automatic? How is the end-user supposed to know whether the block sizes are correctly set, and whether the system does or doesn't support direct access? Presumably it's easier for ddrescue to follow any rules that the user might himself apply? Also, could ddrescue automatically switch between -n and -d mode as appropriate?


4. Given that ddrescue will usually not terminate, it would be useful if ddrescue could print the time since it last recovered any data. Something such as "ddrescue has now been working for 8 hours without recovering any more data; you've probably got all you're going to get".


5. Lastly, for compatibility with regular dd, may I recommend graceful handling (or at least ignoring) of "kill -USR1" ?


Thanks very much,

Richard



P.S. I wrote the following summary for the linux-thinkpad mailing list recently; if you would find it useful to share as documentation, feel free.


-----------------
Dear All,

I've just saved a friend's SATA notebook disk, and thought it might be worth writing up a brief account.

Symptom:
  Laptop wouldn't boot at all, stalling at the first BIOS screen.
  HDD wasn't spinning.
  Unplugging HDD allowed the laptop to boot via live-CD.
  => HDD faulty.

Confirm:
  There is nothing else that can be done with this disk. Professional
   data recovery is too expensive. So OK to take a risk.

Open the disk:
  Carefully, using a torx screwdriver.
  One screw is hidden under the label.
  Clean room would be nice, but I don't have one

Discovery:
  The head appears to have cold-welded itself somewhere in the
  middle of the disk. The disk can't spin at all. This is the
  second time I've come across a 2.5" disk with this problem.
  User says it wasn't mis-treated.

Solution:
  Carefully, without touching the platter, use a fingernail to
  force the head back into the parked position. Some considerable
  force (perhaps 10 newtons?) is required.
  Then quickly re-assemble drive before too much dust gets in.

Recovery:
  Put disk into thinkpad. Boot thinkpad from a live CD. (Mandriva 2009).
  Fortunately, the "dead" disk spins up.
  In the live-CD environment, add the package repositories, and install
  ddrescue.  (Note there are 2 similar programs: ddrescue and dd_rescue.
  I've had success with both.)

  Mount an external USB HDD. Let ddrescue do its stuff:
    ddrescue /dev/sda sda.img ddrescue.log
  After about 24 hours, ddrescue has recovered all 80 GB of the disk,
  excepting about 5 MB.
  Also, save fdisk info:
    fdisk -l /dev/sda > sda.fdisk.txt

Extract partition 1.
   dd if=sda.img of=sda1.img bs=512 skip=63    #value depends on fdisk.

   Mount the partition loopback:
     mount -o loop,ro sda1.img /mnt/tmp

   Note: it's supposed to be possible to do
      mount -o loop,ro,offset=32256 sda.img  /mnt/tmp
    but I found it didn't work.

   Note 2: It would normally have be easier to directly extract
   the partitions one at a time, at the ddrescue stage,
   But in this case, the offending disk is a Windows XP
   system, and I want to be able to re-image the OS onto a new
   drive. A filesystem-level copy won't work here. [In Linux, it's
   easy: just fdisk, mkfs, rsync, then fix fstab and install grub]

Recover data:
   copy stuff from /mnt/tmp

Re-image to a new disk:
   Plug in new HDD, boot from liveCD.
   dd if=sda.img of=/dev/sda


I hope that's useful to someone...

Morals of the story:
  (1) ddrescue is really useful.
  (2) Linux can do almost anything.
  (3) Even a totally stuck HDD can be saved without needing a cleanroom.
  (4) Having a USB-SATA adapter would be useful.

Best wishes,

Richard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]