Embedded linux w/msdos hdimage file

This is related to an embedded environs where an MSDOS partition image written to a file and then executed by dosemu. I need to mount this as a block device on some ramdrive directory, so that I can export it with samba.

The file containing the msdos partition image works fine with dosemu and I can also use mtools to see the file as drive m: from a linux shell, but I need to mount it under /dosc so that windows can also see and write to it via tcp as myhost://dosc

Basically, does anyone know how I can mount this hdimage (now a file) also as /dosc. I 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
Reply to
Joaco
Loading thread data ...

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, for use by the mount command ???

TonyB

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

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.