Microsoft Windows for 64-bit Extended Systems

Adding OEM drivers to Windows Setup - Part #3, Modifying the txtsetup.sif:

Background:
As mentioned before the Windows Setup exist from two phases know as the 'Textmode' phase and the 'GUI' phase. Adding storage drivers Textmode phase doesn't necessarily mean that the GUI phase is aware of the storage device presented by the driver. So if you add a driver to the Textmode phase of the setup and install Windows on the device presented by that driver, after the GUI phase has completed successfully and Windows has been installed, you will not be able to boot because the driver is not installed correctly. To avoid this, the driver must also be installed during the GUI phase.
If you're familiar with unattended installation you probably know about a feature called: 'OemPnPDriversPath', but unfortunately that option is not available in attended installations. So we have to come up with another solution. The GUI phase parses the %SystemRoot%\Inf folder for any information files present, if we could make sure the Textmode phase copies the driver .inf file to that folder, we would be save. Well that is, almost save. Actually there are two solutions; one simple and another more complex but more elegant. Both methods will be discussed here, the former being mandatory:


Preparing the modifications:
On the previous page we saw how the txtsetup.sif is constructed. So somehow we need to obtain the information to be able to modify our own txtsetup.sif and add our own driver. What we require is outlined below:
  • Obviously we need the 'Promise' SATA driver, which can be downloaded here or here.
  • We also need the setup information file from the downloaded 'Promise' driver zip file, fasttx2k.inf.
  • And the driver file itself, fasttx2k.sys.
  • The textmode OEM information file, txtsetup.oem.
  • The entire content of the Windows Server 2003, Standard Edition For 64-Bit Extended Systems copied to a temporary folder. Keep in mind that files copied from CD-ROM have the 'Read only' attribute set.
Extracting the required information:
Now execute the following steps one-by-one.
  1. Extract the downloaded driver zip file, 1_AMD64-FastTrakS150TX-Series-PDC2037x-1.00.1.39.zip to a temporary folder.
  2. Open the txtsetup.oem with a text editor. Notepad.exe is adequate.
  3. Search for a string that looks like this: driver = d2, fasttx2k.sys, fasttx2k.
  4. This gives us the driver file name, fasttx2k.sys and the internal driver name, fasttx2k. Take note of these filenames.
  5. Now search for a string that looks like this: FastTrak_TX2K_net = "Promise FastTrak 378/TX4000/S150 TX Series (tm) Controller (AMD64)", fasttx2k.
  6. Now we have the drivers Friendly name, Promise FastTrak 378/TX4000/S150 TX Series (tm) Controller (AMD64). Save the friendly name.
  7. Look for any line that starts with: id="PCI\VEN_" and save those too. These are the unique PCI Vendor ID's and PCI Device ID's that identify a certain adapter.
Now that we have the required information we can proceed with the next step.


Modifying the txtsetup.sif file:
First we need to add the files to the [SourceDisksFiles] section of the txtsetup.sif. To do that, open any text editor and add the two lines under the [SourceDisksFiles] section below in the txtsetup.sif file. The txtsetup.sif can be found in the \AMD64 directory of the installation source.
  [SourceDisksFiles]
  fasttx2k.sys = 1,,,,,,3_,4,1,,,1,4
  fasttx2k.inf = 1,,,,,,,20,0,0


The line fasttx2k.inf = 1,,,,,,,20,0,0 has been added, although not necessary for Textmode mode storage detection, it is necessary by the GUI mode hardware detection. Remember, it parses the %SystemRoot%\Inf folder for existing .inf files. Notice the numbers 4 and 20 being bold. This is the destination folder where the files will be copied to. As mentioned on the previous page folders are mapped to numbers. For the complete list look at the [WinntDirectories] of the txtsetup.sif.
  [WinntDirectories]
  4 = system32\drivers
  20 = inf


Also notice the 1 being bold. Of course the Windows Setup needs to know where the files are copied from. This is being controlled from the first field after the '=' sign. Now take a look at the list below.
  [SourceDisksNames.amd64]
  1 = %cdname%,%cdtagfilea%,,\amd64
  7 = %cdname%,%cdtagfilea%,,\amd64\lang
  8 = %cdname%,%cdtagfilea%,,\amd64\lang
  8 = %cdname%,%cdtagfilea%,,\amd64\lang
  10 = %cdname%,%cdtagfilea%,,\amd64\lang
  11 = %cdname%,%cdtagfilea%,,\amd64


As we can see from the list above, 1 equals: 1 = %cdname%,%cdtagfilea%,,\amd64. The line under [SourceDisksFiles] section, fasttx2k.sys = 1,,,,,,3_,4,1,,,1,4 copies the fasttx2k.sys from the \AMD64 folder to %SystemRoot%\Systems32\Drivers folder. Note: Changing the value of 1 to 11 would also work.

Now we need to add our own hardware ID's to the [HardwareIdsDatabase] section of the txtsetup.sif. The format should be similar to the following:
  [HardwareIdsDatabase]
  PCI\VEN_105A&DEV_6629 = "fasttx2k"
  PCI\VEN_105A&DEV_3371 = "fasttx2k"
  PCI\VEN_105A&DEV_3319 = "fasttx2k"
  PCI\VEN_105A&DEV_3373 = "fasttx2k"


Next the driver needs to be loaded during the Textmode phase. To accomplish that, add the following entry to the [SCSI.load] section of the txtsetup.sif:
  [SCSI.load]
  fasttx2k = fasttx2k.sys,4


I would suggest to place this line direct below the atapi = atapi.sys,4 line. The atapi.sys is the first driver that is loaded, adding our driver direct below it, would make our Promise driver the 2nd driver loaded during the Textmode phase.

The last entry we have to add is the drivers Friendly name under the [SCSI] section of the txtsetup.sif file. To accomplish that, add the following line:
  [SCSI]
  fasttx2k = "Promise FastTrak 378/TX4000/S150 TX Series (tm) Controller (AMD64)"


Now that we have our modified version of the txtsetup.sif file, save it and close the text editor.

<-- PREVIOUS: The txtsetup.sif explained

Adding the drivers :NEXT -->

Related links:
Updates:
Comments, ideas or suggestions:
Can be sent to: amd64@collosumus_NOSPAM_.net, please remove the _NOSPAM_ from the e-mail address. You can't be too careful with spam these days.


Last update: 01/14/2004.