Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

So the question again: how do I mount this image.

share|improve this question
    
Take a look at this: wiki.edseek.com/guide:mount_loopback –  Mitch Aug 16 '12 at 2:05

2 Answers 2

up vote 1 down vote accepted

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

Is what I used to solve this problem. Below is info on The loop device for those like me who don't/didn't know.

THE LOOP DEVICE 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 is supported auto-destruction of loop devices 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' orumount -d`.

share|improve this answer

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

share|improve this answer
    
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 '12 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 '12 at 2:22
    
And click the "this answer helped me"-button to rate the answer as valid please :) –  user83636 Aug 16 '12 at 2:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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