All of lore.kernel.org
 help / color / mirror / Atom feed
* files as harddrives?
@ 2003-07-21 21:40 Bryan Stillwell
  2003-07-22  9:01 ` Ged Haywood
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Stillwell @ 2003-07-21 21:40 UTC (permalink / raw)
  To: linux-msdos

I have a dos program that I'm trying to get to work, but I haven't found
a way to get a file under linux to behave as a drive under dosemu.  For
the dos program to work, it must believe that the filesystem image under
linux is a drive in the dosemu bios.  The old wholedisk option looks
like it would work, but I'm using version 1.0.2.1-7 (from Debian stable)
and it appears to not be available.

The dos program I want to get working is called ltools, which is a set
of utilities to read linux filesystems.  The web page can be found here:

http://www.it.fht-esslingen.de/~zimmerma/software/ltools/ltools.html

I'm trying to automate a portion of our testing process that requires
generating signatures of files read off an ext2 filesystem that are
located on a compact flash.  The signature generating program is run
after ltools is used to copy the files off the compact flash, and it is
also a dos program.  Since this is a verification test, I must maintain
the process as close as possible, so things like copying the files to
the dos directory beforehand won't work.

Anyone here have a filesystem image working as a harddrive under dosemu
with the latest stable version?  I've got it mostly working under bochs,
but it's slow and I would rather use dosemu if I can.

Thanks,
Bryan

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

* Re: files as harddrives?
  2003-07-21 21:40 files as harddrives? Bryan Stillwell
@ 2003-07-22  9:01 ` Ged Haywood
  2003-07-22 16:10   ` Bryan Stillwell
  0 siblings, 1 reply; 9+ messages in thread
From: Ged Haywood @ 2003-07-22  9:01 UTC (permalink / raw)
  To: Bryan Stillwell; +Cc: linux-msdos

Hi there,

On Mon, 21 Jul 2003, Bryan Stillwell wrote:

> Anyone here have a filesystem image working as a harddrive under
> dosemu with the latest stable version?

I've never had any trouble with this, using 1.0.2 and 1.1.4-5 it
seemed to work just as documented.  The image is an image of a DOS
filesystem, I think I just used 'dd' to create it.  Eventually I
stopped using it and just set up a directory in the Linux tree,
I finkd that's more flexible but you have to think about filenames
and permissions...

73,
Ged.





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

* Re: files as harddrives?
  2003-07-22  9:01 ` Ged Haywood
@ 2003-07-22 16:10   ` Bryan Stillwell
  2003-07-22 16:54     ` Ged Haywood
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Stillwell @ 2003-07-22 16:10 UTC (permalink / raw)
  To: Ged Haywood; +Cc: linux-msdos

On Tue, Jul 22, 2003 at 10:01:33AM +0100, Ged Haywood wrote:
>On Mon, 21 Jul 2003, Bryan Stillwell wrote:
>> Anyone here have a filesystem image working as a harddrive under
>> dosemu with the latest stable version?
>
>I've never had any trouble with this, using 1.0.2 and 1.1.4-5 it
>seemed to work just as documented.  The image is an image of a DOS
>filesystem, I think I just used 'dd' to create it.  Eventually I
>stopped using it and just set up a directory in the Linux tree,
>I finkd that's more flexible but you have to think about filenames
>and permissions...

I've done this before and it works fine, but it won't work for what I'm
trying to do.  Perhaps referring to it as a "filesystem image" was
misleading.  It may be easier to think of it as a hard drive image
(actually compact flash image) with the boot sector and partition
information at the front of the file.  I then want to use ltools (dos
program) to read the linux filesystem located on partition 1 of the
file.  For ltools to work correctly in this situation, it must be able
to access the image as if it's a real hard drive within dosemu.

In bochs I was able to get it working with this line in the .bochsrc:

ata0-slave: type=disk, path="$HOME/freedos_drive/cflash.img", cylinders=496, heads=4, spt=32

I just want something similiar to work in dosemu...

Bryan

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

* Re: files as harddrives?
  2003-07-22 16:10   ` Bryan Stillwell
@ 2003-07-22 16:54     ` Ged Haywood
  0 siblings, 0 replies; 9+ messages in thread
From: Ged Haywood @ 2003-07-22 16:54 UTC (permalink / raw)
  To: Bryan Stillwell; +Cc: linux-msdos

Hello again,

On Tue, 22 Jul 2003, Bryan Stillwell wrote:

> Perhaps referring to it as a "filesystem image" was misleading.  It
> may be easier to think of it as a hard drive image (actually compact
> flash image) with the boot sector and partition information at the
> front of the file.  I then want to use ltools (dos program) to read
> the linux filesystem located on partition 1 of the file.  For ltools
> to work correctly in this situation, it must be able to access the
> image as if it's a real hard drive within dosemu.

Now I see what you're trying to do.  I have no idea what problems
you'll run into with Dosemu when you do that.  I have no reason to
suppose it will work, you need someone with more knowledge of the
Dosemu internals than I have to tell you that.

73,
Ged.



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

* Re: files as harddrives?
@ 2003-08-05  3:26 Stas Sergeev
  0 siblings, 0 replies; 9+ messages in thread
From: Stas Sergeev @ 2003-08-05  3:26 UTC (permalink / raw)
  To: linux-msdos

Hello.

Bryan Stillwell wrote:
> Your mention of mkfatimage16 caused me to look around in 
> the source tree a little, and I found mkhdimage in 
> src/tools/periph/
mkfatimage16 is also there and they both
are in a "bin" dir after "make" and are
installed by "make install".
mkfatimage is a predecessor of mkfatimage16.
It lacks some features (namely FAT16 support
AFAIK, only FAT12) and I don't know what's
the use to still distribute it.

> which did exactly what I wanted!
Strange, as it seems you wanted an image of
a whole disk, not only a single FAT partition.


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

* Re: files as harddrives?
  2003-07-23 18:17 Stas Sergeev
@ 2003-08-04 22:02 ` Bryan Stillwell
  0 siblings, 0 replies; 9+ messages in thread
From: Bryan Stillwell @ 2003-08-04 22:02 UTC (permalink / raw)
  To: linux-msdos

Your mention of mkfatimage16 caused me to look around in the source tree
a little, and I found mkhdimage in src/tools/periph/ which did exactly
what I wanted!  Thanks for the help, everything is working fine now!  :)

Bryan

On Wed, Jul 23, 2003 at 10:17:00PM +0400, Stas Sergeev wrote:
>I don't think it was removed. It is more
>like it was disabled in global.conf.
>A quick hack, such as modifying the line
>650 from "disk { image $yyy }" to something
>like "disk { wholedisk /dev/hda }" will still
>work if you cheat dosemu by setting $_hdimage
>to an existing image so that this line in
>global.conf is reached.
>However, what you do you'll still not be able
>to achieve. Dosemu needs to get a disk geometry
>before it can work with it as a wholedisk.
>It uses a HDIO_GETGEO ioctl command for that.
>This is not possible to do with an image file,
>therefore the image file must have some kind of
>a header to provide a geometry - that's why the
>mkfatimage16 exists.
>So mainly, it seems if you do a simple image
>file from your flash drive, there is not enough
>info to get any use of it - the geometry is also
>required.

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

* Re: files as harddrives?
@ 2003-07-23 18:17 Stas Sergeev
  2003-08-04 22:02 ` Bryan Stillwell
  0 siblings, 1 reply; 9+ messages in thread
From: Stas Sergeev @ 2003-07-23 18:17 UTC (permalink / raw)
  To: linux-msdos

Hello.

Bryan Stillwell wrote:
>>> It may be easier to think of it as a hard drive image
>>>  (actually compact flash image) with the boot sector
>>> and partition information at the front of the file.
> AFAICT, dosemu used to support this behaviour with the
> wholedisk option on older versions, but that
> functionality has been removed
I don't think it was removed. It is more
like it was disabled in global.conf.
A quick hack, such as modifying the line
650 from "disk { image $yyy }" to something
like "disk { wholedisk /dev/hda }" will still
work if you cheat dosemu by setting $_hdimage
to an existing image so that this line in
global.conf is reached.
However, what you do you'll still not be able
to achieve. Dosemu needs to get a disk geometry
before it can work with it as a wholedisk.
It uses a HDIO_GETGEO ioctl command for that.
This is not possible to do with an image file,
therefore the image file must have some kind of
a header to provide a geometry - that's why the
mkfatimage16 exists.
So mainly, it seems if you do a simple image
file from your flash drive, there is not enough
info to get any use of it - the geometry is also
required.


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

* Re: files as harddrives?
  2003-07-22 16:37 Stas Sergeev
@ 2003-07-22 16:59 ` Bryan Stillwell
  0 siblings, 0 replies; 9+ messages in thread
From: Bryan Stillwell @ 2003-07-22 16:59 UTC (permalink / raw)
  To: linux-msdos

On Tue, Jul 22, 2003 at 08:37:22PM +0400, Stas Sergeev wrote:
>Bryan Stillwell wrote:
>>It may be easier to think of it as a hard drive image 
>>(actually compact flash image) with the boot sector and
>>partition information at the front of the file.
>See "man mkfatimage16" - it is exactly what you need.

That would work if I just wanted to access the files under dosemu, but
this is a verification test and I have to come as close as possible to
simulate what someone else will be using on a real Windows/DOS system.

As it works right now, they put a compact flash card into a usb card
reader and then run one of the ltools utilities (ldirdos.exe) to read
and copy files off of the ext2 filesystem on the compact flash to the
hard drive.

AFAICT, dosemu used to support this behaviour with the wholedisk option
on older versions, but that functionality has been removed in favour of
just accessing partitions directly.

Bryan

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

* Re: files as harddrives?
@ 2003-07-22 16:37 Stas Sergeev
  2003-07-22 16:59 ` Bryan Stillwell
  0 siblings, 1 reply; 9+ messages in thread
From: Stas Sergeev @ 2003-07-22 16:37 UTC (permalink / raw)
  To: linux-msdos

Hello.

Bryan Stillwell wrote:
> It may be easier to think of it as a hard drive image 
> (actually compact flash image) with the boot sector and
> partition information at the front of the file.
See "man mkfatimage16" - it is exactly what you need.


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

end of thread, other threads:[~2003-08-05  3:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 21:40 files as harddrives? Bryan Stillwell
2003-07-22  9:01 ` Ged Haywood
2003-07-22 16:10   ` Bryan Stillwell
2003-07-22 16:54     ` Ged Haywood
2003-07-22 16:37 Stas Sergeev
2003-07-22 16:59 ` Bryan Stillwell
2003-07-23 18:17 Stas Sergeev
2003-08-04 22:02 ` Bryan Stillwell
2003-08-05  3:26 Stas Sergeev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.