Skip to contentSkip to conversation

loopback blockdevice driver partition support

DISCUSSION Kasper Sandberg 2 participants 3 messages Jul 24, 2006 – Jul 25, 2006

lore
Share & tools
lore
#0 lore raw

hello.. i was wondering if someone may have done some work to make the loopback driver support partitions..

i found that a guy had written a nice script that used sfdisk and dmsetup to use device mapper on a loopback image of an entire harddrive (using DOS partition table ofcourse) to create device mapper "partitions".

though this doesent quite meet my requirements, as i need to read an image of an amiga disk..

therefore it would seem like a good idea to make the loopback driver work with linux's partition table support, since it already supports this.

if anyone has done some work in this, please mail me, and possibly i can continue it if wanted. just want to know if anyone already has done something like it before i try at it myself..

mvh.
Kasper Sandberg

#1 lore raw
Quoted 11 lines · On Tuesday July 25, [email protected] wrote:

hello.. i was wondering if someone may have done some work to make the loopback driver support partitions..

i found that a guy had written a nice script that used sfdisk and dmsetup to use device mapper on a loopback image of an entire harddrive (using DOS partition table ofcourse) to create device mapper "partitions".

though this doesent quite meet my requirements, as i need to read an image of an amiga disk..

Quoted 8 lines

therefore it would seem like a good idea to make the loopback driver work with linux's partition table support, since it already supports this.

if anyone has done some work in this, please mail me, and possibly i can continue it if wanted. just want to know if anyone already has done something like it before i try at it myself..

You could try wrapping an md/linear around it

mkdir -p /dev/md
mdadm -Bf -c4 -l linear -n1 -ap /dev/md/d0 /dev/loop0

then look at partitions in /dev/md/d0pN

NeilBrown

#2 lore raw
Quoted 21 lines · Neil Brown
Quoted 11 lines · On Tuesday July 25, [email protected] wrote:

hello.. i was wondering if someone may have done some work to make the loopback driver support partitions..

i found that a guy had written a nice script that used sfdisk and dmsetup to use device mapper on a loopback image of an entire harddrive (using DOS partition table ofcourse) to create device mapper "partitions".

though this doesent quite meet my requirements, as i need to read an image of an amiga disk..

Quoted 8 lines

therefore it would seem like a good idea to make the loopback driver work with linux's partition table support, since it already supports this.

if anyone has done some work in this, please mail me, and possibly i can continue it if wanted. just want to know if anyone already has done something like it before i try at it myself..

Quoted 6 lines

You could try wrapping an md/linear around it

mkdir -p /dev/md
mdadm -Bf -c4 -l linear -n1 -ap /dev/md/d0 /dev/loop0

then look at partitions in /dev/md/d0pN

Yeah, i ended up doing this, i found that md supports partitions, and linear was a perfect match for what i needed.

Quoted 9 lines

NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/