0

I'm trying to recover data after formatting my hdd. I installed ddrescue-gui and performed the following tasks:

  1. Select source (formatted hdd), no log, destination (img file inside separate hdd) and set to fastest recovery then click start

enter image description here

  1. Went into Computer and found that the source drive was now unmounted. So I went into Disks to see if I could mount it, but could not because it was now two loop devices:

enter image description here

  1. So I tried various terminal commands to no avail, getting errors such as:

    sudo mount -t ntfs "/media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img" /dev/loop0

    NTFS signature is missing. Failed to mount '/dev/loop2': Invalid argument The device '/dev/loop2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

  2. The file is currently sitting on a separate hdd and the 1tb hdd I'm trying to recover is inaccessible:

enter image description here

I'm new to this whole scene so I'm really confused at the moment. No idea why my drive got unmounted, converted to a "loop device" (whatever that is) and why I can't just get my data and then mount my device again. Is there a correct way of going about this?

I checked the official Launchpad GUI site but I didn't find any tutorials or guides or anything useful.

0

You have a image of a filesystem (1tb.img) inside a filesystem (/dev/sdf of /media/user/e...aa5).

try

sudo mount  "/media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img" /mnt

or

sudo mount -o loop "/media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img" /mnt
  1. mount should find filesystem type.
  2. add -r after mount to mount your image read only.

EDIT:

  1. use /mnt (not /media/user/XXYY) as mount point.
  2. sudo mount -o ro,loop -t ntfs /media/user/e3../1tb.img /mnt
  3. try fstyp (or fstype) to check which filesystem

    fstype /media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img
    
  4. analyse file using ... file

    file /media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img
    
| improve this answer | |
  • both commands: sudo mount "/media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img" "/media/user/B5C4-62C3" or sudo mount -o loop "/media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img" "/media/user/B5C4-62C3" result: mount: block device /media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img is write-protected, mounting read-only mount: you must specify the filesystem type with -r: mount: you must specify the filesystem type with -t ntfs: NTFS signature is missing. Failed to mount '/dev/loop2': Invalid argument The device '/dev/loop2' doesn't seem to have a... – Hooli Feb 15 '16 at 13:35
  • @Hooli see my edit – Archemar Feb 15 '16 at 16:18
  • for #1 and #2 I get the same errors mentioned above, for #3 I get fstype: command not found, for #4 I get /media/user/e3cfeead-6e65-4af5-beb8-bbfa12fbdaa5/1tb.img: x86 boot sector – Hooli Feb 15 '16 at 16:20
0

First, you should use log with ddrescue.

Second, your image is going to be an image of whole drive which means you have to know where partitions starts.

+---------+-------...-+-------...-+-------...-+
| MBR PT  | part1     | part2     | partN     |
+---------+-------...-+-------...-+-------...-+

Use file <image> to gen information on your image. Should give you something more like: (that's my memory stick; you get the idea)

You can also use fdisk <image> or cfdisk <image>. All they should show you geometry of your disk (in image) so you can find out where is beginning of partition to mount.

$ file sda.img
sda.img: MBR boot sector; partition 1 : ID=0xc, active, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector 2048, 30308352 sectors

So proper mount line would be:

# mount -tvfat -oloop,offset=$((2048*512)) sda.img /mnt/sda1

as you have to inform mount where the actual partition starts - with offset option which is byte offset. That's why there is offset=$(2048*512)) as file/fdisk/cfdisk shows it in sectors (although you can change units in fdisk/cfdisk).

Your commands will be more like

mkdir /mnt/image
sudo mount -o ro,loop,offset=YOUR_OFFSET -t ntfs /path/to/1tb.img /mnt/image
| improve this answer | |

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.