2

Today I used ddrescue to make an image of a failed hd. I stored this image on a separate partition on my 500 Gb hd. The partition is sda8 and the filename is backup.img.

The image was of an hd that had Windows Vista installed on it. I don't care about the Windows OS on it at all. I simply want to be able to browse the data on it so I can retrieve it and store it elsewhere.

How do I mount this image?

1

3 Answers 3

3
sudo mount Filesystem.img /home/user/MyFilesystem -o loop

is what I used to solve this problem. Below is info from on the loop device from this answer on Linux Questions for those like me who don't/didn't know.

One further possible type is a mount via the loop device. For example, the command

mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop 

will set up the loop device /dev/loop3 to correspond to the file /tmp/disk.img, and then mount this device on /mnt.

If no explicit loop device is mentioned (but just an option -o loop' is given), then mount` will try to find some unused loop device and use that, for example

mount /tmp/disk.img /mnt -o loop 

The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid, for example:

mount /tmp/disk.img /mnt 

mount -t ext3 /tmp/disk.img /mnt 

This type of mount knows about four options, namely loop, offset, size‐ limit and encryption, that are really options to losetup(8). If the mount requires a passphrase, you will be prompted for one unless you specify a file descriptor to read from instead with the --pass-fd option. (These options can be used in addition to those specific to the filesystem type.)

Since Linux 2.6.25 auto-destruction of loop devices is supported and then any loop device allocated by mount will be freed by umount inde‐ pendently on /etc/mtab.

You can also free a loop device by hand, using losetup -d' or umount -d`.

0

Use loop devices. Create a loop device upon that file and mount it as if it where a disk. Also, if the disk was partitioned, use the proper offset of the partition(s).

http://wiki.edseek.com/guide:mount_loopback

3
  • Okay I would have posted my answer but I can't for 7 hours. Yes what you said is true: This site seemed to give me the answer and it worked like a charm: [Ubuntu Help][1] [1]: help.ubuntu.com/community/Mount The command I used was: sudo mount Filesystem.img /home/user/MyFilesystem -o loop Worked perfectly. I have no clue what the loop thing means so I'll look into that next. I think this may only have worked because I had only 1 partition?
    – Robert
    Aug 16, 2012 at 2:12
  • Loop devices are special virtual devices which exist for exactly what you want to do: Access a file as if it were a real hardware block device. The mount command you used is a simplified user interface for using them, so it might be intelligent enough to detect partitions and just use the first one. Read its manpage to find out what exactly it did.
    – user83636
    Aug 16, 2012 at 2:22
  • And click the "this answer helped me"-button to rate the answer as valid please :)
    – user83636
    Aug 16, 2012 at 2:23
0

There is an answer here using Disk Image Mounter which has a GUI: How to mount an ISO file? FYI I had a similar problem and realized it was already installed when I right clicked on the .img file (from a damaged CD). Great to recover the one (mp3) chapter which was unreadable.

1
  • As much as it can be gratifying to post an answer that works, if you find one elsewhere that appears to answer the question maybe flag the question as a duplicate. If it isn't a duplicate then it probably won't be answered in the same way.
    – sbergeron
    Mar 11, 2016 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .