Iso/dd image mounting howto
Howto to mount an dd/iso image
When disk fail/start failing it is sometimes necessary to create a backup of the hard drive using ddrescue (see ddrescue howto). This creates a bit for bit copy of the disk/file system.
To read the image you mount it via loopback
sudo mount -o,loop image.dd /mnt/point
you might need to specify the file system e.g.
sudo mount -o,loop -t ntfs image.dd /mnt/point
If this complains about not being able to find a file system it might be that a copy was made of an entire disc rather than partitions with in it.
In this run the command mmls
-- this will output the partition table of the disk. Look up the number of the partition user the Start column.
This is a number expressed in blocks. Typically a block is 512 bytes so multiple this number by 512 to get the offset.
sudo mount -o,loop,offset=[number] image.dd /mnt/point
e.g. sudo mount -o,loop,offset=1048576 image.dd /mnt/point
You can also do e.g.:
sudo mount -o,loop,offset=$(2048 * 512 | bc) image.dd /mnt/point
In this case $(2048 * 512 | bc)
is doing the multiplication for you.
This technique also works with iso images.
For use with Macs, and more details on mmls
see:Mac Backup Notes