Let me tell you a story.

Today I found myself tasked with installing Windows XP on a shiny new
piece of hardware: A Dell Precision 450 with an Ultra320 SCSI card and
a fast SCSI drive.

The only problem is that this SCSI card is new, so XP lacks built-in
support for it.  And Windows has trouble installing itself on a hard
drive which it cannot see.

Microsoft has a mechanism for dealing with this, of course.  It is
called "TXTSETUP.OEM".  You can learn more than you want to know at
<http://msdn.microsoft.com/library/en-us/install/hh/install/txtsetup_1wmq.asp>,
but the theory is simple.  Your SCSI hardware vendor (in my case,
Dell) gives you a "driver disk" with a txtsetup.oem file at the top.
Shortly after you start an installation, Windows Setup says "Press F6
if you need to install a third party SCSI or RAID driver".  Then you
press F6, insert your driver disk, and everything works fine.

...If you are installing from CD-ROM, that is.  If instead you are
installing from DOS as part of (say) a network install, things are a
tad trickier.

Installing Windows from DOS goes roughly as follows.  You run the DOS
program winnt.exe.  It creates something on your C: drive very much
like a Windows installation CD and then reboots.  Then everything
proceeds much as if you had booted from the Windows CD, right down to
the "Press F6 if you need to install..." prompt.

As a quick and dirty hack, I launched a network installation, waited
for winnt.exe to populate the C: drive, waited for the "Press F6..."
prompt after the reboot, pressed F6, and fed in the Dell driver disk.
Oops, no good.  Setup complained about being unable to find various
.sys, .inf and .cat files.

Well, no matter.  Who wants to sit around every time you install
Windows, anyway?  And "Unattended" is practically my middle name.
Surely I can automate it.

Heck, Microsoft makes it plain as day in a KB article:

    http://support.microsoft.com/?kbid=288344

Note step 5 in particular, which suggests that different installation
methods require slightly different txtsetup.oem files.

Let me share with you the relevant lines from the original
txtsetup.oem on the driver disk.  (For clarity, I am omitting the
non-relevant lines of the file, which is to say most of them.)

    [Disks]
    d3 = "LSI Logic Ultra320 1020/1030 Driver", \symmpi.tag, \WinXP

    [scsi]
    SYMMPI_XP32 = "LSI Logic Ultra320 1020/1030 Driver (XP 32-bit)",symmpi

    [Files.scsi.SYMMPI_XP32]
    driver = d3,symmpi.sys,SYMMPI
    inf    = d3,symmpi.inf
    catalog = d3,mpixp32.cat

Here is what this means.

First, the [Disks] section declares a disk named "d3", with a
human-readable description of "LSI Logic Ultra320 1020/1030 Driver", a
tag file of "\symmpi.tag", and a directory of "\WinXP".  That is, this
disk can be recognized by the existence of the file \symmpi.tag, and
the driver files it includes all reside within the \WinXP directory.

Second, the [scsi] section declares a driver ID of "SYMMPI_XP32",
which is the identifier the rest of the file uses to name the driver.
It has a description of "LSI Logic Ultra320 1020/1030 Driver (XP
32-bit)".  It also has magic registry key of "symmpi", but that is not
relevant here.

Finally, the [Files.scsi.SYMMPI_XP32] section defines the files which
comprise the SYMMPI_XP32 driver.  This section says that the driver
proper is on disk d3 in the file symmpi.sys, the inf file is on d3 in
symmpi.inf, and the catalog file is on d3 in mpixp32.cat.  (The extra
SYMMPI at the end of the "driver" line is another registry-related
key.  It is also not relevant here.)

Right.  So, following the KB article's instructions, I edited the d3
line of txtsetup.oem like so:

    d3 = "LSI Logic Ultra320 1020/1030 Driver", \symmpi.tag, .

That is, I replaced \WinXP with a dot.

Then I copied all of the driver files, plus txtsetup.oem itself, to
Z:\winxpoem\I386\$oem$\TEXTMODE.  I edited z:\site\unattend.txt to add
these lines:

    [MassStorageDrivers]
        "LSI Logic Ultra320 1020/1030 Driver (XP 32-bit)" = "OEM"

    [OEMBootFiles]
        TXTSETUP.OEM
        SYMMPI.TAG
        MPIXP32.CAT
        SYMMPI.INF
        SYMMPI.SYS

The [MassStorageDrivers] section says that I want to add a mass
storage driver during text mode setup.  It says to look for the key
"LSI Logic Ultra320 1020/1030 Driver (XP 32-bit)" in the [scsi]
section of txtsetup.oem and to load that driver.

The [OEMBootFiles] section tells winnt.exe to copy TXTSETUP.OEM,
SYMMPI.TAG, MPIXP32.CAT, SYMMPI.INF, and SYMMPI.SYS from
$OEM$\TEXTMODE to the C: drive before rebooting.

This is what the KB article said to do, so I did it.  And it worked
great.

Just kidding!  Actually, it failed miserably.  Well, winnt.exe ran OK.
But shortly after rebooting, Setup bombed like so:

    File \$WIN_NT$.~BT\$OEM$\.\SYMMPI.SYS could not be loaded.
    The error code is 18

    Setup cannot continue.  Press any key to exit.

You see, winnt.exe places several things on your hard drive, including
a directory named $WIN_NT$.~BT, another directory named $WIN_NT$.~LS,
a file named TXTSETUP.SIF, and a few other oddities.

Beneath each of the two $WIN_NT$ directories is stuff which looks like
bits and pieces of a Windows installation CD.  I believe the ~BT
directory contains the "real mode" portion of Setup; i.e., the part
which runs first, offers to let you to press F6, slurps up the
drivers, and then launches the protected mode portion (when it says
"Setup is starting Windows...").  The ~LS directory holds that
protected mode portion.

Or so I have surmised.  None of this is documented, of course.

Anyway, by booting to DOS I confirmed that
C:\$WIN_NT$.~BT\$OEM$\.\SYMMPI.SYS did, in fact, exist.  And yes, it
was the same file, byte for byte, on the driver disk.

So what the heck was Setup complaining about?

Some Web searching suggested that subdirectories of
\$WIN_NT$.~BT\$OEM$ are a no-no.  And though I personally would not
call "." a subdirectory, who knows?

Next, I noticed that \$WIN_NT$.~BT\$OEM$\ included a copy of my
txtsetup.oem file.  So, instead of editing txtsetup.oem on the
original media and restarting the installation from scratch, I decided
to experiment on the copy.

I edited the d3 line like so:

    d3 = "LSI Logic Ultra320 1020/1030 Driver",\txtsetup.sif,

Yes, I was a Bad Scientist and changed several things at once.
(Actually, I tried lots of other useless things, but this story is
already too long.)

As you can see, I got rid of stray whitespace, replaced \symmpi.tag
(which does not exist on C:) with \txtsetup.sif (which does), and
deleted the period at the end of the line.

Then I rebooted to let Setup try again.  Amazingly, it worked!
Triumphant and smirking, I made the same change to
Z:\winxpoem\I386\$OEM$\TEXTMODE\TXTSETUP.OEM and restarted the
installation.  And it worked great.

Just kidding!  Actually, it failed miserably.  This time, winnt.exe
worked, and the real mode portion of Setup worked.  But right after
the protected mode portion started, it bombed saying, "The
vendor-supplied setup file has an error on line 42.  Press F3 to exit
Setup."

Sure enough, line 42 was my "d3 = ..." line.  Well, actually it was
line 41.  Or 40, if you count from zero.  But so amazed was I that
Microsoft actually gave me ERROR MESSAGE with a LINE NUMBER, I could
hardly complain if it was the wrong line.

Now, I found this more than slightly confusing.  When I edit the copy
of the file on the C:\ drive, it works; but when I edit the master
copy at the source, it fails?  Impossible!  But I tried it again, and
again, and a few more times...

...and just as I was about to smash my head into a wall, I had an
insight.  A true "Microsoft moment".  I just had to remember that
Microsoft's engineers will casually do things that people with
training or experience would never contemplate in a million years.
Like making TWO copies of the SAME FILE and then reading it with
DIFFERENT PARSERS.

Sure enough, there was another copy of txtsetup.oem under
C:\$WIN_NT$.~LS\$OEM$\TEXTMODE.  And that is the copy which the
protected mode portion of Windows Setup reads.

So when I initially edited the other copy of txtsetup.oem to eliminate
the dot at the end of the line, I fixed it for the real mode portion
of Setup without affecting the protected mode portion.  But when I
changed the master copy in z:\winxpoem\I386\$OEM$\TEXTMODE and
restarted the installation, that affected both copies on C:, which
broke protected mode Setup because it objected to the line ending with
a comma.

The solution was to find a line which works for both real and
protected mode, without breaking either of the parsers.  Here it is:

    d3 = "LSI Logic Ultra320 1020/1030 Driver",\txtsetup.sif,""

And it is working great.

 - Pat


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to