Mounting a partition within a dd image of a windows drive

Bryn M. Reeves bmr at redhat.com
Mon Jan 16 14:53:04 UTC 2012


On 01/14/2012 07:33 PM, JD wrote:
> fdisk -l /dev/loop0
> 
> and it shows there is 1 partition:
> 
> /dev/loop0p1 ....etc ..... etc.
> 

Run "kpartx -a /dev/loop0". This will create device-mapper linear
devices that map the partitions contained within the image. You will
find them in /dev/mapper named as "loop0p1" etc. (there are switches
to control the separator and naming format but the default is fine for
most uses).

You could also create a partitionable loop device and have the
in-kernel partition code read the partition table assuming your kernel
has loop partition support enabled.

When you're done "kpartx -d /dev/loop0" will clean up the partition
devices.

Regards,
Bryn.



More information about the users mailing list