Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 10840  / 3 Years ago, sun, december 5, 2021, 3:43:36

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?


More From » hard-drive

 Answers
1
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`.


[#36138] Sunday, December 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
llael

Total Points: 209
Total Questions: 102
Total Answers: 118

Location: Rwanda
Member since Fri, May 5, 2023
1 Year ago
;