Vikram's Web Archive

Icon

Since interestingness isn't a search option…

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

AngelsLandingHDIMG_1435IMG_1503IMG_1142c2IMG_1132IMG_1133

Translate

 

Library

Speaker for the Dead
To Kill a Mockingbird
Leviathan Wakes
Caliban's War
Hyperion
Revelation Space
Ender's Game
Dune
On Basilisk Station
Old Man's War
Shards of Honour
The Warrior's Apprentice
The Fall of Hyperion
The Rise of Endymion
Endymion

 

Now Reading

Planned books:

Current books:

  • The Wisdom of Crowds

    The Wisdom of Crowds by James Surowiecki

Recent books:

None

View full Library