Mounting a partition within a dd image of a windows drive

JD jd1008 at gmail.com
Sun Jan 15 19:35:19 UTC 2012


On Sat, Jan 14, 2012 at 12:47 PM, Sam Varshavchik <mrsam at courier-mta.com>wrote:

> JD writes:
>
>  « HTML content follows »
>> Dear all,
>> I have a dd image of a windows disk.
>>
>> I run
>>
>> losetup /dev/loop0 winDrive.dd
>>
>> Then
>>
>> fdisk -l /dev/loop0
>>
>> and it shows there is 1 partition:
>>
>> /dev/loop0p1 ....etc ..... etc.
>>
>> However, I seem to have no way of mounting the partition, because
>> device loop0p1 does not exist in /dev directory.
>>
>> Short of dumping the dd image onto another hard drive, is there
>> a way to mount the ntfs partition  in the dd image?
>>
>
> Figure out the starting position of each partition in the image, and its
> size, in bytes, then use the --offset and --sizelimit parameters to
> losetup, accordingly.
>
>
>
The losetup command does accept an offset value. However, these values
have to be expressed as integers of KiB or MiB or GiB ...etc.
The NTFS partition starts at sector 63, which is not a multiple of 1KiB
(1024 Bytes).
If the losetup command could accept an offset stated in sectors or in an
arbitrary
integer number of bytes, the losetup could be used to access the partition
within
the image and mount it.
Interestingly enough, the kernel loop driver looks at the offset as a
number of sectors!

Cheers,

JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120115/be1561e9/attachment.html>


More information about the users mailing list