Andries Brouwer wrote:
> On Sat, Jul 29, 2000 at 05:28:39AM +0200, Enrico Weigelt wrote:
>
> > i need to mount partitions in an hdimage file (DOS disklabel).
> > is there any chance to do this ? perhaps with the loopdev (define the
> > mapping region) ?
> > but how to find out where the partitions start and end in a portable way
> > ?
>
> Look at the subdirectory partx of a recent util-linux release
> such as 2.10m. There are ioctls to tell the kernel where on some
> block device the partitions live, so the kernel partition parsing
> code is superfluous in principle and can be moved to user space.
Whatever support there now is, i've been able to do this without
that stuff so far.
Just mounting /tmp/disk.img4 doesnt' work: you have to setup
the loopdev yourself.
I do:
losetup -o 32256 /dev/loop0 /tmp/disk.img
mount /dev/loop0 /mnt/d1
to mount the first partition on a full-disk image that has been
formatted with Microsoft tools. (I'm afraid you'll have to parse the
partition table and do the math to find the offset in bytes yourself.)
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * Common sense is the collection of * ****** prejudices acquired by age eighteen. -- Albert Einstein ********- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:30 EST