public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* How to also Mount hdimage file at /
@ 2003-11-11  4:00 tonyb
  2003-11-11  7:57 ` tonyb
  0 siblings, 1 reply; 5+ messages in thread
From: tonyb @ 2003-11-11  4:00 UTC (permalink / raw)
  To: msdos

I made a mkfatimage16 file which works fine with
dosemu.  I have a need to let Windows (samba) to
mount the same via the network.

I can use mtools to see the file as drive m:
but I need to mount it under /dosc so that windows
can also write to it.

When the hdimage was a real dos partition mounted on /dosc,
I could use dosemu and windows would also see myhost://dosc

Does anyone know how I can mount the hdimage (now a file)
also as /dosc.  Also tried using the loop device: mount filname /mnt -t
msdos -o loop, but it complains about the file's format.


Thanks
TonyB

-- 
  __      __  _     I N C.               http://www.sysdev.org
/ __|\\// __||  \  __   __          /         tonyb@sysdev.org
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to also Mount hdimage file at /
  2003-11-11  4:00 How to also Mount hdimage file at / tonyb
@ 2003-11-11  7:57 ` tonyb
  2003-11-11 12:31   ` Clarence Dang
  0 siblings, 1 reply; 5+ messages in thread
From: tonyb @ 2003-11-11  7:57 UTC (permalink / raw)
  To: linux-msdos

On Mon, 10 Nov 2003 20:00:01 -0800
tonyb@sysdev.org wrote:

> I made a mkfatimage16 file which works fine with
> dosemu.  I have a need to let Windows (samba) to
> mount the same via the network.
> 
> I can use mtools to see the file as drive m:
> but I need to mount it under /dosc so that windows
> can also write to it.
> 
> When the hdimage was a real dos partition mounted on /dosc,
> I could use dosemu and windows would also see myhost://dosc
> 
> Does anyone know how I can mount the hdimage (now a file)
> also as /dosc.  Also tried using the loop device: mount filname /mnt
> -t msdos -o loop, but it complains about the file's format.

By looking at hdimage file created by mkfatimage16m I noticed that
the boot sector was at offset 0x2280, rather than at 0, if it was
a device /dev/hda1.  So I truncated the hdimage file by cutting off
the first 8832 bytes and redid the mount command above and it worked!

However, dosemu will not work if $_hdimage is set to the truncated
image.  So I need a way to specify the file starting at offset 0x2280,
while leaving it intact...  But I do not know how to specify a file
starting at a byte offset...

TonyB


-- 
  __      __  _     I N C.               http://www.sysdev.org
/ __|\\// __||  \  __   __          /         tonyb@sysdev.org
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to also Mount hdimage file at /
  2003-11-11  7:57 ` tonyb
@ 2003-11-11 12:31   ` Clarence Dang
  2003-11-11 17:20     ` Joaco
  2003-11-11 21:12     ` tonyb
  0 siblings, 2 replies; 5+ messages in thread
From: Clarence Dang @ 2003-11-11 12:31 UTC (permalink / raw)
  To: tonyb, linux-msdos

On Tue, 11 Nov 2003 06:57 pm, tonyb@sysdev.org wrote:
> However, dosemu will not work if $_hdimage is set to the truncated
> image.  So I need a way to specify the file starting at offset 0x2280,
> while leaving it intact...  But I do not know how to specify a file
> starting at a byte offset...

According to "man losetup", maybe "losetup -o" but I've never tried it myself.

Cheers,
Clarence

--
KolourPaint - http://sf.net/projects/kolourpaint
LibMSWrite - http://sf.net/projects/libmswrite

"Studying is a waste of time" -- John Plaice


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to also Mount hdimage file at /
  2003-11-11 12:31   ` Clarence Dang
@ 2003-11-11 17:20     ` Joaco
  2003-11-11 21:12     ` tonyb
  1 sibling, 0 replies; 5+ messages in thread
From: Joaco @ 2003-11-11 17:20 UTC (permalink / raw)
  To: linux-msdos

> 
> On Tue, 11 Nov 2003 06:57 pm, tonyb@sysdev.org wrote:
> > However, dosemu will not work if $_hdimage is set to the truncated
> > image.  So I need a way to specify the file starting at offset 0x2280,
> > starting at a byte offset...
> 
> Cheers,
> Clarence
Thanks I will try it when I come back ffrom my
root canal, if am still conscious...

TonyB

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to also Mount hdimage file at /
  2003-11-11 12:31   ` Clarence Dang
  2003-11-11 17:20     ` Joaco
@ 2003-11-11 21:12     ` tonyb
  1 sibling, 0 replies; 5+ messages in thread
From: tonyb @ 2003-11-11 21:12 UTC (permalink / raw)
  To: linux-msdos

On Tue, 11 Nov 2003 23:31:30 +1100
Clarence Dang <clarencedang@yahoo.com> wrote:

> On Tue, 11 Nov 2003 06:57 pm, tonyb@sysdev.org wrote:
> > However, dosemu will not work if $_hdimage is set to the
> > truncated image.  So I need a way to specify the file
> > starting at offset 0x2280, while leaving it intact...  But I
> > do not know how to specify a file starting at a byte
> > offset...
> 
> According to "man losetup", maybe "losetup -o" but I've never
> tried it myself.
> 
> Cheers,
> Clarence

Great discovery.  It did work!

----------------------------------------------------------------
losetup -d /dev/loop3			<detach and clear loop3>
losetup -o 8832 /dev/loop3 /hdimage-32MB.mdos	<attach to loop3 @off=8832>
mount /dev/loop3 /dosc -t msdos		<voila!, done deal!>
----------------------------------------------------------------

Then export the drive's /dosc with smb.conf and MS-Access can
read/write to a file that dosemu is using inside of a partition
inside a Linux file in a networked embedded linux appliance.

Great capability for dosemu, since starting with Windows 2K/sp4
and also to a lesser extent XP/sp1 Dos mapped drives are no
longer allowed in the Windows network.  Samba2 and 3 still work
fine!

Gracias,
TonyB


-- 
  __      __  _     I N C.               http://www.sysdev.org
/ __|\\// __||  \  __   __          /         tonyb@sysdev.org
\__ \ \/\__ \||)|/ O_)\/ /        \/  System Tools / Utilities
|___/ || ___/|_ /\___|\_/        WIntel / Linux Device Drivers


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-11 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11  4:00 How to also Mount hdimage file at / tonyb
2003-11-11  7:57 ` tonyb
2003-11-11 12:31   ` Clarence Dang
2003-11-11 17:20     ` Joaco
2003-11-11 21:12     ` tonyb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox