* Offset into block file for mounting?
@ 2011-01-03 13:13 Tom Watson
2011-01-03 14:22 ` Ted Ts'o
2011-01-03 14:25 ` Martin Nybo Andersen
0 siblings, 2 replies; 3+ messages in thread
From: Tom Watson @ 2011-01-03 13:13 UTC (permalink / raw)
To: linux-kernel
Hi...
I recently got a "floppy drive emulator" that uses an USB thumb drive to
emulate floppy images to be used as a floppy drive. In trying out the
software (it is a bit cryptic), I found that this model stores the
floppy images consecutively on said thumb drive (with some padding to
make the drives on 1.5 Mbyte borders on the thumb drive. When plugging
in the thumb drive, the 'vfat' module just mounts the first image (as I
expect). What I would like to do is mount some of the other images that
exist (I dumped out the raw thumb drive). I believe that a simple way
to do this is to add an offset to the vfat mount, so that the accesses
begin at (as in my example) 0x180000 (and multiples thereof) from the
start of the physical drive.
Is there any way to add such an offset?
Would it be useful in any other file systems?
Sorry, but there is no partition map in the way this device formats the
thumb drive. I suspect that this is due to the way it was designed, and
it makes the task much simpler to do it that way (and I have no way of
changing the hardware simply).
My reason for doing this is that I want to use this device in my Data
I/O programmer, which has ONLY a floppy interface, and I am a bit tired
of playing the shuffle game for the programmers disks. I also want to
transfer data as well, and having the ability to do the offset where
one finds the disk image makes this useful.
Thanks for any assistance. Please copy me on replies, as I don't
currently subscribe.
p.s. A similar item is on ebay:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=290507795223 (I tried
to make the URL as short as possible!)
--
Tom Watson <tsw@johana.com>
I'm at home now
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Offset into block file for mounting?
2011-01-03 13:13 Offset into block file for mounting? Tom Watson
@ 2011-01-03 14:22 ` Ted Ts'o
2011-01-03 14:25 ` Martin Nybo Andersen
1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-01-03 14:22 UTC (permalink / raw)
To: Tom Watson; +Cc: linux-kernel
On Mon, Jan 03, 2011 at 05:13:04AM -0800, Tom Watson wrote:
> Hi...
>
> I recently got a "floppy drive emulator" that uses an USB thumb drive to
> emulate floppy images to be used as a floppy drive. In trying out the
> software (it is a bit cryptic), I found that this model stores the
> floppy images consecutively on said thumb drive (with some padding to
> make the drives on 1.5 Mbyte borders on the thumb drive. When plugging
> in the thumb drive, the 'vfat' module just mounts the first image (as I
> expect). What I would like to do is mount some of the other images that
> exist (I dumped out the raw thumb drive). I believe that a simple way
> to do this is to add an offset to the vfat mount, so that the accesses
> begin at (as in my example) 0x180000 (and multiples thereof) from the
> start of the physical drive.
>
> Is there any way to add such an offset?
Probably the easist way to solve this is to use devicemapper. You can
use dmsetup[1] to create a device mapper volume that starts and ends at
the appropriate offsets. You can then mount the device mapper volume
using anyu file system without having to hack in a offset mount
option.
[1] See the dmsetup man page for more details.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Offset into block file for mounting?
2011-01-03 13:13 Offset into block file for mounting? Tom Watson
2011-01-03 14:22 ` Ted Ts'o
@ 2011-01-03 14:25 ` Martin Nybo Andersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin Nybo Andersen @ 2011-01-03 14:25 UTC (permalink / raw)
To: Tom Watson; +Cc: linux-kernel
Hi Tom,
On Mon, 3 Jan 2011, Tom Watson wrote:
> Hi...
>
> I recently got a "floppy drive emulator" that uses an USB thumb drive to
> emulate floppy images to be used as a floppy drive. In trying out the
> software (it is a bit cryptic), I found that this model stores the
> floppy images consecutively on said thumb drive (with some padding to
> make the drives on 1.5 Mbyte borders on the thumb drive. When plugging
> in the thumb drive, the 'vfat' module just mounts the first image (as I
> expect). What I would like to do is mount some of the other images that
> exist (I dumped out the raw thumb drive). I believe that a simple way
> to do this is to add an offset to the vfat mount, so that the accesses
> begin at (as in my example) 0x180000 (and multiples thereof) from the
> start of the physical drive.
>
> Is there any way to add such an offset?
> Would it be useful in any other file systems?
mount diskimage /dir -t vfat -o loop,offset=xxx,sizelimit=yyy
mount will then forward the offset and sizelimit options to losetup which
sets up a loop device before mounting.
Have a look at the man-pages for mount and losetup. :-)
Hope that helps.
> [...]
> --
> Tom Watson <tsw@johana.com>
> I'm at home now
--
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-03 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-03 13:13 Offset into block file for mounting? Tom Watson
2011-01-03 14:22 ` Ted Ts'o
2011-01-03 14:25 ` Martin Nybo Andersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®