On Mon, 5 Nov 2018 14:17:57 -0800 (PST)
> I have found some bugs with FREEDOS/DOSEMU/LINUX and Freedos by
You could've posted this to alt.os.free-dos. Added. From c.o.m.p.
> When I try to create a file using normal DOS system calls
> using freedos and there is no 'stderr.txt' in the directory I am
> using, then my program doesn't work. It works fine with MSDOS 3.3,
> DRDOS 6, and Win XP DOS 100%.
> I found that creating the 'stderr.txt' file first using ECHO
> >stderr.txt seems to solve the problem with freedos.
> When copying files from a Linux filesystem to a DOS 32 filesystem, the
> filenames are changed from lowercase on the Linux filesystem to
> uppercase on the DOS 32 filesystem.
That's correct. DOS is uppercased 8.3 filenames, 8 characters of the
name and 3 for the extension. 32-bit VFAT disk routines with FAT 32
filesystem via Windows 95/98/SE/ME also added mixed-case support via
LFNs (long-file names). So, a DOS FAT 32 filesystem will have both
SFNs (short-file names) in 8.3 and long-filenames stored in a special
directory format. The long-filenames are only visible or accessible in
Windows 95/98/SE/ME etc, unless you install a special TSR in DOS with
LFN filename support, such as DOSLFN. DOSLFN installs the LFN API
except for two less common LFN calls, IIRC, which are natively available
in MS-DOS v7.00 to v8.00.
> I formatted the DOS filesystem as
> Fat 16 but when I checked the result it turned out to be Fat 32
> (using Linux).
It may be too large of a partition to be FAT 16, or Linux tools may not
support larger FAT 16 sizes, i.e., defaulting to FAT 32 at a
reasonable size. E.g., FAT 16 is usually limited to 2GB and FAT32 is
usually limited to 127GB, either by the OS (operating system) or by the
OS' formatting tools, even though FAT 32 has a theoretical 2TB maximum
partition size, etc. E.g., Windows NT can't read "over-sized" FAT
partitions that can be created with Windows 98/SE/ME tools. So, in
addition to a standard maximum partition size, and a theoretical
maximum partition size, each OS and it's tools have their own limits.
> Linux should convert filenames to all lowercase when it copies to a
> DOS filesystem.
No, it shouldn't. DOS doesn't support lowercase natively. Mixed case
is only available with VFAT and FAT 32 i.e., Windows 95/98/SE/ME etc, or
when you load an LFN driver in DOS. I.e., there is no reason for Linux
to ever produce lowercase for FAT 16, but should copy LFNs for FAT 32 as
well as 8.3 SFNs. You can only see LFNs with an LFN driver or under
Windows 95/98/SE/ME etc.
> FREEDOS should also convert all filenames to
> lowercase before storing the name to anywhere.
> If you look in Linux /usr/bin you will probably see all (or nearly
> all) lowercase filenames for executables.
Yes, Linux natively supports mixed case and long filenames as part of
it's filesystem(s). DOS didn't, originally. This came with Windows
95/98/ME/SE extensions to MS-DOS (v 7.00, 7.10, 8.00). I.e., this LFN
extension is /NOT/ a part of Free-DOS, DR-DOS, IBM DOS, nor earlier
versions of MS-DOS such as 6.22 or 5.00 etc, but LFNs may work with
these other DOS' by using a DOS LFN driver.
> This makes for a problem with renaming files between across
> filesystem copies to restore valid filenames.
You should use a file archiver that preserves long filenames, e.g.,
tar+gzip for Linux which also has LFN-aware DOS port, e.g., from DJGPP
project, then load a DOS LFN driver in DOS and untar/ungzip, or use
Windows 98/SE/ME etc with LFN-aware untar/ungzip to extract and preserve
said LFNs. Again, you'll need an archiver that's available for both
Linux and DOS or Windows, and has LFN support on the DOS/Win side. I
would suspect that Info-ZIP for Linux and a late version of PKZIP for
DOS with a loaded LFN driver might work too. I'm not sure if BZIP is
available for DOS.
From an old post of mine, circa 2010 to c.l.a.x, I mentioned some LFN
"PKZIP/PKUNZIP v2.50 and DJGPP's Unzip32.exe are LFN-aware. Henrik
Haftmann's DOSLFN is the best LFN driver. Jason Hood has updated the
driver. Odi's LFN Tools by Ortwin Glueck may help too, e.g., lren,
ldir, etc. DJGPP also has other DOS LFN aware tools such as: gzip,
cpio, and DJtar. Gero Kuhlmann's rpmunpac has been posted by me with
DOS LFN updates for OpenWatcom and DJGPP in comp.os.msdos.djgpp and
Odi's LFN Tools
> I have even had files
> copied between filesystems where Linux refused to rename a file from
> uppercase on the Linux filesystem to a lowercase filename on the same
> Linux filesystem. These are bugs in my opinion with Linux and Freedos.
Yeah, I'm not sure what that's about, unless it was on the same DOS
partition but just installed into a Linux filesystem. So, no change of
the actual filesystem? Or, perhaps you didn't have sufficient account
privilege (see root, sudo) or directory privilege to move or rename on
the Linux side, i.e., no write access to the directory (see chmod,
> I would take this to a Linux group if I could find one that had any
> traffic this year. :-/
Go ahead and post to one anyway. Usually, there are plenty of
"lurkers" (read only) who may hit you up via Google Groups to Usenet,
and there are frequently non-responding Usenet "regulars", because there
is no traffic, i.e., they're waiting. If they're on Usenet, they'll see
new marked posts in their newreader. Google Groups usually moves the
old thread to the top if some is posting.
> Steve www.ml1compiler.org
"The most ironic outcome is the most probable." Elon Musk
Could someone tell Elon that means Tesla implodes? ...