Discussion:
[Freedos-user] Writing to NTFS filesystems
Jim Lemon
2005-05-20 20:46:33 UTC
Permalink
Hi,

I have been using FreeDOS as a platform for a battery of human
performance tests for a few years. It has allowed me to keep a very
useful test battery going with the demise of MS-DOS, as the tests take
over system interrupts and do not work properly in a DOS window.
However, it is becoming more difficult to maintain this as there are
hardly any PCs with VFAT partitions anymore. I have managed to keep up
so far by producing a bootable CD-ROM and writing the data to a
diskette, but even this is getting edgy as many desktops come without a
diskette drive now. What I am wondering is if FreeDOS has developed the
capability to write to NTFS filesystems so that I could run the tests
under FreeDOS on the CD-ROM but write the data to an NTFS filesystem.
Also, I'm not sure if M$ has any other filesystems that I might need to
consider. Apple seems to do this with their HFS - every time open source
HFS tools appear, they change the spec.

Jim
e***@CoLi.Uni-SB.DE
2005-05-20 11:58:14 UTC
Permalink
Hi Jim,
Post by Jim Lemon
I have been using FreeDOS as a platform for a battery of human
performance tests for a few years... as the tests take
over system interrupts and do not work properly in a DOS window.
Yes, nice, huh? :-). But that is a problem of DOS *window*, not of
the brand of DOS. MS DOS would have worked, too, but only outside
a window. I hope you already enjoy TSC / RDTSC based super precision
timing for your tests and DJGPP GNU C to bypass all memory limits of
classic DOS programs? :-)
Post by Jim Lemon
However, it is becoming more difficult to maintain this as there are
hardly any PCs with VFAT partitions anymore. I have managed to keep up
so far by producing a bootable CD-ROM and writing the data to a
diskette...
There are several solutions for your problem. If you know that your
program will not crash, then you can store your data on RAMDISK and,
after the experiment, use a DOS FTP or SCP (e.g. ssh2dos / sshdos)
client to upload the data to a server. You can also store the data
on USB, but drivers (BIOS drivers or DOS drivers) will usually be
quite slow and the USB stack running in the background could mess up
your performance test timing - I recommend to avoid USB mice and
keyboards for the same reason, by the way. Of course you can again
store the data on RAMDISK and load the USB drivers AFTER the test...
Post by Jim Lemon
What I am wondering is if FreeDOS has developed the
capability to write to NTFS filesystems...
There are drivers for NTFS, like NTFS4DOS, but many are either read-
only or non-free. However, check our link collection on freedos.org,
as far as I remember there are now even free (for personal use?)
drivers which can write NTFS. However, NTFS is very complex and you
probably get the same timing problems as with USB flash memory sticks.

As you will probably want to run several test on the same PC, the very
best solution will be to create a FAT16 or FAT32 partition on the test
PC for DOS. You can do that after resizing NTFS partitions if you do
not want to delete Win completely: The free NTFSRESIZE tool is part of
many Linux based rescue / install CD-ROMs and of modern Linux install
CD-ROMs.

Eric

PS: You can even do dual VGA display with DOS ;-).
Aitor Santamaría Merino
2005-06-02 19:44:42 UTC
Permalink
Hi,
Post by e***@CoLi.Uni-SB.DE
PS: You can even do dual VGA display with DOS ;-).
Can you? How does this work? (specially interested respecting to
codepages and such).

Aitor
Kenneth J. Davis
2005-05-20 12:02:12 UTC
Permalink
Post by Jim Lemon
Hi,
...
Post by Jim Lemon
diskette drive now. What I am wondering is if FreeDOS has developed the
capability to write to NTFS filesystems so that I could run the tests
under FreeDOS on the CD-ROM but write the data to an NTFS filesystem.
NTFS is not directly supported by FreeDOS (nor any DOS that I'm aware
of), but there are a few 3rd party tools to allow reading (usually for
free) and some support writing (when purchased). The best examples are
NTFSDOS from sysinternals which provides a drive letter to access to the
partition or I believe its NTFS4DOS (forget from who) which is similar
(not sure if it has write support).

NTFS support is tricky especially under DOS, largely because Microsoft
has not publicly published its specification (and it was not designed
for the memory limits of DOS). The Linux/Unix community has largely
documented it, so adding read support to [Free]DOS is not out of the
question, but not write support [from my understanding overwriting is
pretty safe, and perhaps since I've checked even creating files could be
safer now].
Post by Jim Lemon
Also, I'm not sure if M$ has any other filesystems that I might need to
consider. Apple seems to do this with their HFS - every time open source
HFS tools appear, they change the spec.
FAT and NTFS are the only major filesystems you need to be concerned
with when dealing with nearly all MS systems (HPFS, logical volumes, and
other 3rd party filesystems could be in use on a given system).

Standard FAT is well documented and supported {by all major DOSes}. [I
believe the Xbox uses a variant of FAT, but you should never encounter
it normally.] Microsoft does revise NTFS, but I think they only do so
to add features, so new revisions appear only with new releases of
Windows (or possibly service packs); either way the documentation they
make available is probably under NDA and costs a small fortune.
Post by Jim Lemon
Jim
Unfortunately there is no easy solution to your problem, but floppy
drives won't disappear for good while, cd-writers are more common (so
for some applications it may be possible to save data to a RAMdisk/other
and then save to a CD), with the right drivers [and some experimenting]
many USB disks are supported, and who knows what the future holds.

For applications which are best run from pure DOS, but the user has only
NTFS (and Windows), and the max data stored is known ahead of time, a
possible solution involves creating the file ahead of time (in Windows)
and then in DOS either using a special driver to treat the file as a
virtual drive or in the application specially supporting it. The file
itself could be an app specific format (where a Windows program/GUI
reads it and displays the information to/interacts with the user) or
simply a disk image so a program like VFD makes it a virtual drive to
Windows as well. Although not currently supported, it should even be
possible to boot FreeDOS (possibly from the same disk image data stored
to) from the NTFS partition. I am aware of one company that used an
approach similar to this (where the user interacted with a Windows
program, and the computer rebooted into DOS to run the tests, and then
back into Windows for processing/displaying the results).

Jeremy
Aitor Santamaría Merino
2005-06-02 19:35:29 UTC
Permalink
Hi,
Post by Kenneth J. Davis
For applications which are best run from pure DOS, but the user has
only NTFS (and Windows), and the max data stored is known ahead of
time, a possible solution involves creating the file ahead of time (in
Windows) and then in DOS either using a special driver to treat the
file as a virtual drive or in the application specially supporting
it. The file itself could be an app specific format (where a Windows
program/GUI reads it and displays the information to/interacts with
the user) or simply a disk image so a program like VFD makes it a
virtual drive to Windows as well. Although not currently supported,
it should even be possible to boot FreeDOS (possibly from the same
disk image data stored to) from the NTFS partition. I am aware of one
company that used an approach similar to this (where the user
interacted with a Windows program, and the computer rebooted into DOS
to run the tests, and then back into Windows for processing/displaying
the results).
Doesn't PowerQuest do this in their PartitionMagic when you want to do
something critical to the %systemdrive%?

Aitor
Mark Bailey
2005-05-20 13:43:46 UTC
Permalink
Hi Jim:

One option is to create a FAT32 partition on the Windows disk
drive and write to that. This can often be done using the
"free" space left on the end of the disk, or you can
resize the NTFS partition without destroying the data.

See http://www.k1ea.com/hints/DOS%20dual%20boot%20version%201.0.pdf
for details. You can also go ahead and install FreeDOS on the
resulting partition and dual boot which is what I do.

Or, you may be able to access a USB memory stick (aka thumb
drive). There are two basic ways of doing that. One is if
your BIOS provides the correct support, FreeDOS may detect the
USB stick and be able to use it. (Note that this sort of
works on my Dell D600 laptop but is unstable). The other
way is to use usbaspi.sys and aspidisk.sys to attempt to detect
the USB stick from DOS. This works successfully on
the computers I've tried.

My config.sys contains
device=himem.exe
device=emm386.exe vds noems x=test /memcheck /verbose
device=usbaspi.sys /v /slow
device=aspidisk.sys

Mark



Mark
Post by Jim Lemon
Hi,
I have been using FreeDOS as a platform for a battery of human
performance tests for a few years. It has allowed me to keep a very
useful test battery going with the demise of MS-DOS, as the tests take
over system interrupts and do not work properly in a DOS window.
However, it is becoming more difficult to maintain this as there are
hardly any PCs with VFAT partitions anymore. I have managed to keep up
so far by producing a bootable CD-ROM and writing the data to a
diskette, but even this is getting edgy as many desktops come without a
diskette drive now. What I am wondering is if FreeDOS has developed the
capability to write to NTFS filesystems so that I could run the tests
under FreeDOS on the CD-ROM but write the data to an NTFS filesystem.
Also, I'm not sure if M$ has any other filesystems that I might need to
consider. Apple seems to do this with their HFS - every time open source
HFS tools appear, they change the spec.
Jim
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Freedos-user mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-user
Aitor Santamaría Merino
2005-06-02 19:41:58 UTC
Permalink
Hi,
Post by Mark Bailey
Or, you may be able to access a USB memory stick (aka thumb
drive). There are two basic ways of doing that. One is if
your BIOS provides the correct support, FreeDOS may detect the
USB stick and be able to use it. (Note that this sort of
works on my Dell D600 laptop but is unstable). The other
way is to use usbaspi.sys and aspidisk.sys to attempt to detect
the USB stick from DOS. This works successfully on
the computers I've tried.
Where do these two come from? (usbaspi and aspidisk). Are they limited
to storage media?

BTW, I have at work a laptop PC with a USB keyboard that behaves quite
transparently, BIOS can acceed to it without problems (I know because I
use a BIOS password), and I suppose the same would happen to DOS (I
haven't been able to do tests yet).
As it is my first experience with USB keyboards, should I expect all USB
keyboards to behave transparently and go through BIOS? Any experiences?

Aitor
Kenneth J. Davis
2005-06-04 16:55:49 UTC
Permalink
Post by Aitor Santamaría Merino
Hi,
...
Post by Aitor Santamaría Merino
BTW, I have at work a laptop PC with a USB keyboard that behaves quite
transparently, BIOS can acceed to it without problems (I know because I
use a BIOS password), and I suppose the same would happen to DOS (I
haven't been able to do tests yet).
As it is my first experience with USB keyboards, should I expect all USB
keyboards to behave transparently and go through BIOS? Any experiences?
Aitor
My experience with USB emulation from BIOS is that it works fine until
some application tries to access the keyboard directly (at least I seem
to recall that is what it was doing, but don't recall for sure), for me
it caused the emulation to stop and thus the computer is stuck without a
keyboard until reset.

Jeremy

Florian Xaver
2005-05-20 10:57:05 UTC
Permalink
Hi!

Maybe this tool will help you: http://www.datapol.de/dpd/

Build in NTFS support would be cool. Maybe sometimes someone will be
interested in implement it. I am using FAT32 (also for the WINXP partition.)

Bye, Flo
Post by Jim Lemon
Hi,
I have been using FreeDOS as a platform for a battery of human
performance tests for a few years. It has allowed me to keep a very
useful test battery going with the demise of MS-DOS, as the tests take
over system interrupts and do not work properly in a DOS window.
However, it is becoming more difficult to maintain this as there are
hardly any PCs with VFAT partitions anymore. I have managed to keep up
so far by producing a bootable CD-ROM and writing the data to a
diskette, but even this is getting edgy as many desktops come without a
diskette drive now. What I am wondering is if FreeDOS has developed the
capability to write to NTFS filesystems so that I could run the tests
under FreeDOS on the CD-ROM but write the data to an NTFS filesystem.
Also, I'm not sure if M$ has any other filesystems that I might need to
consider. Apple seems to do this with their HFS - every time open source
HFS tools appear, they change the spec.
k***@comcast.net
2005-06-04 16:53:17 UTC
Permalink
Hello, all:

In many cases, it is a LOT easier just to shrink the Windows XP
NTFS partition a bit and create a FAT32 partition for sharing files
between Windows XP and DOS. You can even make this FAT32
partition bootable and install FreeDOS if you want.

Partition Magic used to be able to do this, but doesn't work on
the NTFS partitions I've tried in the last year or so. I think
it may be related to XP SP2. YMMV.

The open source qtparted program does this easily enough.
You can boot it from the system rescue cd, www.sysresccd.org
and do the repartitioning.

For more information, you can see
http://k1ea.com/hints/DOS%20dual%20boot%20version%201.0.pdf

The recently released NTFS4DOS driver also allows write
access to NTFS partitions and does work with FreeDOS as well.

Mark Bailey
Post by Aitor Santamaría Merino
Hi,
Post by Kenneth J. Davis
For applications which are best run from pure DOS, but the user has
only NTFS (and Windows), and the max data stored is known ahead of
time, a possible solution involves creating the file ahead of time (in
Windows) and then in DOS either using a special driver to treat the
file as a virtual drive or in the application specially supporting
it. The file itself could be an app specific format (where a Windows
program/GUI reads it and displays the information to/interacts with
the user) or simply a disk image so a program like VFD makes it a
virtual drive to Windows as well. Although not currently supported,
it should even be possible to boot FreeDOS (possibly from the same
disk image data stored to) from the NTFS partition. I am aware of one
company that used an approach similar to this (where the user
interacted with a Windows program, and the computer rebooted into DOS
to run the tests, and then back into Windows for processing/displaying
the results).
Doesn't PowerQuest do this in their PartitionMagic when you want to do
something critical to the %systemdrive%?
Aitor
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Freedos-user mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-user
Continue reading on narkive:
Loading...