You are looking at posts that were written on February 20th, 2008.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | ||
Posted on February 20th, 2008 by Chris Farris.
Categories: Linux.
How to mount a filesystem inside a harddrive image
# 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 bytesDevice Boot Start End Blocks Id System
/dev/sdb1 * 1 1044 8385898+ c W95 FAT32 (LBA)
/dev/sdb2 1045 19457 147902422+ 83 Linuxsuppose 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
Powered by WordPress
© 2006 by Chris Farris. All rights reserved.
Background is Sky Song by Digital Blasphemy
Page Designed based on Vistered Little.