Home » How To » HOWTO Mount a dd image of an entire harddrive (Windows and Linux)

HOWTO Mount a dd image of an entire harddrive (Windows and Linux)

So you made an image of a harddrive using dd or ddrescue with something like:

sudo ddrescue -v -b 512M /dev/sda r.img

Linux
Lo and behold, you can’t just mount the r.img file. You need to determine the offset of the partition you want to mount:

fdisk -u -l r.img
Disk r.img: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ddd58

Device Boot      Start         End      Blocks   Id  System
r.img1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
r.img2          206848   488394751   244093952    7  HPFS/NTFS/exFAT

If we want to mount the second partition, we need to multiply the Start (206848) by the Sector size (512):

expr 206848 \* 512
105906176

So, we just need to plug that in:

sudo mount -o ro,loop,offset=105906176 r.img mnt

It is now mounted 🙂

Windows
Simply use OSFMount by PassMark Software. It is free 🙂

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect