I am trying to recover data from a failing hard drive using GNU ddrescue on Ubuntu. I used the following command:

sudo ddrescue -f /dev/sda /dev/sdb [path to mapfile]

So far it is working speedily and without issue. My concern is about the destination drive 'sdb'. In the Ubuntu 'Disks' utility, it's contents are listed as 'Unallocated Space' and partitioning is 'Master Boot Record'. What will I see when ddrescue is done? Should I have prepared the drive differently?

Both drives are of equal size and I can see activity on each drive. I'm not sure if the drive I'm recovering data from ('sda') is MBR or not. Thank you for your time.


No. ddrescue will prepare everything for you. You just need to setup things after the rescue, but only if the partition table was damaged. From GNU ddrescue Manual:

Example 1: Fully automatic rescue of a whole disc with two ext2 partitions in /dev/sda to /dev/sdb.

Note: you don't need to partition /dev/sdb beforehand, but if the partition table on /dev/sda is damaged, you'll need to recreate it somehow on /dev/sdb.

 ddrescue -f -r3 /dev/sda /dev/sdb mapfile
 fdisk /dev/sdb
 e2fsck -v -f /dev/sdb1
 e2fsck -v -f /dev/sdb2

After ddrescue is done (and you have done everything safely, for example not having mounted any of /dev/sda or /dev/sdb during the rescue, be careful with interruptions and "repairing" the failing drive), you will see that all possible data from the failing disc was copied to the new one. Saying "all possible data" I mean also the partition table and partition flags.

| improve this answer | |
  • When you say interruptions do you mean unintentional ones? Won't the mapfile take care of intentional interruptions (Ctrl+C)? – Kyle Ingraham Jun 21 '17 at 18:33
  • (I mistakenly pressed Enter) Also will the destination being set as MBR matter at the end? – Kyle Ingraham Jun 21 '17 at 18:35
  • By saying 'interruptions' I mean all types of interruptions. When you halt the job and resume later, for example after the reboot, the OS can link /dev/sdb to different device. Some OS try to "fix" the partition when booting (like Windows' chdisk). You may mistakenly overwrite some data on one of your block devices, stuff like that. Most of the dangers I meant is nothing surprising, just don't do anything stupid. Read this and be safe. – styrofoam fly Jun 21 '17 at 18:42
  • Thank you for the thorough explanations. I've been following the manual's safety precautions as best I can so far. I think we can call this one a wrap. – Kyle Ingraham Jun 21 '17 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.