Re: Linux syscalls

From: Beth (BethStone21_at_hotmail.NOSPICEDHAM.com)
Date: 06/09/04


Date: Wed, 9 Jun 2004 00:24:19 +0100

Robert Redelmeier wrote:
> I think it's _much_ more complex than that.
> My work MS-Win2k system C:\ shows [in part]:
>
> -rwxrwxrwx 1 user 0 Apr 9 2003 AUTOEXEC.BAT
> -rw-rw-rw- 1 user 0 Apr 9 2003 CONFIG.SYS
> -r--r--r-- 1 user 0 Apr 9 2003 IO.SYS
> -r--r--r-- 1 user 0 Apr 9 2003 MSDOS.SYS
> -r-xr-xr-x 1 user 34724 May 24 07:14 NTDETECT.COM
> drwxrwxrwx 1 user 0 Apr 27 12:56 System Volume
Information
> drwxrwxrwx 1 user 0 May 26 06:58 WINNT
> -r-xr-xr-x 1 user 150528 Jul 21 2002 arcldr.exe
> -r-xr-xr-x 1 user 163840 Jul 21 2002 arcsetup.exe
> -r--r--r-- 1 user 192 Apr 27 12:50 boot.ini
> -r--r--r-- 1 user 214432 May 24 07:14 ntldr
>
> The 0 size files are one I don't have priv's to read,
> but the first 4 look very much lis MS-DOS.

Ah, some of these files are retained purely for "backwards
compatibility" with earlier DOS and Windows 3.x
programs..."AUTOEXEC.BAT" and "CONFIG.SYS" certainly aren't
needed because there are _registry_ entries corresponding to
their purposes...

And, under Win9x, I think that one of the files - "MSDOS.SYS",
if I recall correctly - is just a plain text file that says
something along the lines of: "This text is padding out the file
size to xxxx bytes for compatibility reasons"...it's not a real
file anymore but a "dummy" to keep the older applications happy,
should they go looking for the files...

"System Volume Information" (normally a hidden file) is all to
do with filesystem management...nothing to do with the booting
process but just the "container file" for, well, "system volume
information" as it suggests...and, interestingly - at least
under XP - not even the most privileged "root" superuser (well,
not necessarily actually called "root" under Windows but the
equivalent ;) is able to look into the "system volume
information"...so more information about this would likely have
to come from NTFS documentation (and, if Microsoft are gathering
up information to send to the CIA - as sometimes alleged - then
it's probably in here that they'd "hide" that because Windows
itself gives _NO_ user (not even the superuser) the rights to
look into this directory)...

> It also looks very much like `ntldr` is an MS-DOS *.COM file.

"ntldr", as its mnemonical name suggests, is the actual "NT
loader"...and, yeah, it's a ".com" file in the sense that it's
just a raw binary file that the bootsector loads and executes...

>From what I've seen reading websites on the matter (but, indeed,
goodness knows how reliable this actually is, in some cases ;),
NTLDR actually does the "bootmenu" by reading BOOT.INI and then
actually proceeds to do the actual kernel booting..

> But I don't pretend to be an MS-WinNT expert.

Neither do I...but, for sure, those "0 byte" files you're
looking at there don't actually do anything but sit there for
"backwards compatibility" (I've seen this mentioned in a number
of places, including in one of the older Win9x versions where
the "MSDOS.SYS" file literally is a plain text file and
explictly states that it serves no purpose but "backwards
compatibility" in the file itself ;)...

Under Win98, I think it was (any Win98 users around to verify
this? It was one of the earlier Windows versions, for sure, as I
read it out of the file itself directly with Notepad...I just
can't remember which version exactly...but Win98 is triggering
my "Spidey sense" more than any other Windows, that I'll stick
my neck out in trying to recall that it's Win98 ;), you could
open up "MSDOS.SYS" (which was bigger than 0 bytes on this
earlier version...NT literally has it as a "placeholder" that
it's not even got anything in it at all...not even a byte...but
pop in so that older programs looking for the files will find
the entries...remembering that older DOS applications often
_automatically_ would edit your AUTOEXEC.BAT and CONFIG.SYS as
part of program installation...well, they can do so with these
"dummy files", if they really want, because they don't do
anything useful :) in Notepad and it's just a plain text file
with some stupid message about "this file needs to be at least
xxxx bytes in size for compatibility reasons"...nothing else
useful in it, though...a 100% "dummy" file, just so that if any
older 16-bit DOS / Windows programs look for "AUTOEXEC.BAT",
"CONFIG.SYS" and that kind of thing then they find the
files...but the files don't actually do anything anymore...they
are replaced by registry entries instead (which also makes
logical sense from the perspective that "AUTOEXEC.BAT" is a
_system-wide_ _single user_ form of "login script" but NT is
multi-user that, in fact, it looks under "HKEY_CURRENT_USER" for
the specific settings for the "current user"...NT doesn't work
that way anymore but keeps the files around just for "backwards
compatibility")...

Beth :)