Vikram’s Link & Photo Blog

Icon

Because he loves to shoot first…

Nabble – gentoo-user – “loopback mount” hard-drive image created with dd?

Nabble – gentoo-user – “loopback mount” hard-drive image created with dd?

> Another hack you can try is use to use ‘–offset’ option of
> ‘losetup’. First figure out from which byte, NTFS partition starts in
> disk image, and then you create a loopback back device for that image
> and the starting offset using ‘losetup’ and finally ‘mount’ the
> loopback as NTFS partition :) .

Here’s more detail on how to do that

# losetup /dev/loop0 /path/to/diskimage
# fdisk -l /dev/loop0
(example)
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1044 8385898 c W95 FAT32 (LBA)
/dev/sdb2 1045 19457 147902422 83 Linux

suppose you want to mount the partition on sdb2, the offset for that
would be 8225280 * 1045 = 8595417600.

detach the disk image
# losetup -d /dev/loop0
and setup the loop for the partiion
# losetup -o8595417600 /dev/loop0 /path/to/diskimage
and mount it
# mount -t fstype /dev/loop0 /path/to/mountdir

[From: Nabble - gentoo-user - "loopback mount" hard-drive image created with dd?]

Category: Cool Software, Linux

Tagged:

Comments are closed.

Photo Stream

Working on Haitian Creole MT engineProfileUncle and Li'l TerrorprofilepicIMG_4902IMG_4894

Translate

 

Now Reading

Planned books:

Current books:

  • Summerland

    Summerland by Michael Chabon

  • The Wisdom of Crowds

    The Wisdom of Crowds by James Surowiecki

Recent books:

None

View full Library