Mounting ddrescue image after recovery (in over my head)
Solution 1:
I found the solution, and feel kind of foolish for missing this. Thank you guys so much for your responses!
I checked the image for errors and then it mounted with no problem!
sudo fsck -y /dev/sda2/backup.img
It fixed the errrors then it mounted no problem with:
sudo mount /dev/sda2/backup.img /mnt/recoverydata
Solution 2:
The image you created will contain all the faults your original disk has. Therefore you likely can't mount or read it. The way to proceed is to load this image into your favourite data recovery tool.
We have good experience with Testdisk/PhotoRec but there are other tools worth mentioning, e.g. Foremost.
See also:
- How to recover deleted files?
- Testdisk guide
- PhotoRec guide
Solution 3:
Here's what I had to do in a similar situation - in case someone stumbles upon this question like I did.
My image also wouldn't mount, generating the same error (bad superblock). However, fsck also failed with the following error:
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /mnt/download/rescue.img
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
After reading through DataRecovery (link provided by Takkat, thanks!), I tried the following and it worked:
apt-get install sleuthkit
mmls /path/to/image
This produced the following output:
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000000 0000000062 0000000063 Unallocated
02: 00:00 0000000063 2930272064 2930272002 Linux (0x83)
03: ----- 2930272065 2930277167 0000005103 Unallocated
I then multiplied 63 by 512 to get 32256 and mounted the image like this:
mount -o loop,offset=32256 /path/to/image /mnt/temp
I hope this helps someone else too.
Solution 4:
In addition to Takkat's answer, I'd like to suggest another possible approach. Considering that your image is almost certainly damaged, there may be some data that data recovery tools can't adequately recover.
SpinRite addresses this problem in a different way. Rather than operating off an image, it exercises the disk in order to get more data off it than normal tools can recover. I've used it to significantly increase the amount of recoverable data. If you're lucky, you'll be able to mount your disk normally afterward for long enough to make a proper backup.
SpinRite does come with a major disadvantage, though. It costs a fair amount of money. If the other tools work for you, than save your money. But if you need more, SpinRite is definitely worth a try.