If you are not already familiar with dd and dd_rescue – they are great tools that you can use to make a block by block identical clone of your drive. You can output either command to an ISO/IMG or to another drive. See my post about imaging drives for more info – dd and dd_rescue commands are at the bottom.
After you have created an image of an entire hard drive, here is how you can mount the partitions contained within the image.
First login as root or ‘sudo su’ and then do an fdisk -u -l ./disk_image
[[email protected] ~]# fdisk -u -l /mnt/storage/disk_image.img You must set cylinders. You can do this from the extra functions menu.
Disk ./disk_image.img: 0 MB, 0 bytes 240 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x3141c18f
Device Boot Start End Blocks Id System ./disk_image.img1 15120 312575759 156280320 f W95 Ext'd (LBA) Partition 1 has different physical/logical endings: phys=(1023, 239, 63) logical=(20672, 239, 63) ./disk_image.img5 15183 80831519 40408168+ 7 HPFS/NTFS ./disk_image.img6 80831583 229370399 74269408+ 7 HPFS/NTFS ./disk_image.img7 229370463 312575759 41602648+ 7 HPFS/NTFS
Then take the start of the partition that you want to mount and multiply it by 512.
In this example if we wanted to mount ./disk_image.img7 the partition starts at sector 229370463 – so we multiply it by 512:
512 * 229370463 = 117437677056
Create a new folder to use as a mount point for the image:
[[email protected] ~]# mkdir /mnt/image_mount_directory
You can mount the partition from the image file like this:
[[email protected] ~]# mount -o loop,offset=117437677056 -t auto /mnt/storage/disk_image.img /mnt/image_mount_directory
Or, you can copy the contents of the partition to a single file like this (fill in skip with the starting block of your parition – 229370463 – and for count fill in the length of the partition – 41602648:
[[email protected] ~]# dd if=/mnt/storage/disk_image.img of=/media/partition3-file skip=229370463 count=41602648