Advanced Unattended Installs
Unattended NT 4.0 installations on new machines can be problematic, but these simple tricks make them easy.
July 31, 1998
Use $OEM$ to solve new network cards' installation problems
Last December, I bought a Compaq Presario 4860 that didn't want me toinstall Windows NT. The Presario shipped with the OSR2.1 version of Wintendo(oops, I mean Windows 95), and its hard disk came preformatted as FAT32--as ifI'd buy a 333MHz computer with 128MB of RAM and run only Win95 on it.
When I tried to repartition the disk as a 2GB FAT disk, Win95 insisted onrepartitioning the entire disk to FAT32 and reinstalling the operating system(OS). I called Compaq technical support. The representative I spoke with told methat the Presario doesn't have a hidden switch to let me reinstall Win95 withoutrepartitioning the disk, and that Compaq wouldn't support the computer if Iinstalled NT on it.
Thank goodness for PowerQuest's PartitionMagic (which you can download fromhttp://www.powerquest.com). PartitionMagic let me resize the 8GB FAT32 disk to2GB, then converted the disk from FAT32 to FAT without damaging one byte ofdata. If you don't have PartitionMagic, get it.
After repartitioning the hard disk to FAT, I was ready to install NT on thesystem. When I performed an attended setup on the Presario, NT installed and ranlike a champ. However, when I tried to perform an unattended NT installation onthe machine, I ran into trouble.
Unattended Installation Basics
NT Setup is good at detecting hardware, but it can't detect hardware it doesn't look for. |
I keep a copy of the i386 directory on the hard disks of the machines I haveNT licenses for, and I use winnt /b or winnt32 /b to install and reinstall NT.For unattended installations, I use (and recommend highly) two tools. The firsttool is GHOST, a program that copies a disk partition or logical drive toanother drive or a network server. You can purchase GHOST or download a trialversion at http://www.ghostsoft.com.
The other tool is an unattended installation script, an ASCII file Icreated to answer all the questions that NT asks during setup. Writing a basicsetup script is simple with the help of NT Setup Manager, which you can find inthe supportopkn subdirectory of the NT Server CD-ROM, in which nstands for the NT platform you're using. Setup Manager creates an ASCII setupscript that you can alter if you need to. (For details about writing setupscripts for unattended installations, see Christa Anderson, "DesigningUnattended NT Installations," March 1997.) Then, you provide the NT setupprogram (winnt.exe or winnt32.exe) with the setup script's name and i386'slocation. For example, if you save the ASCII file as C:unattend.txt and i386 isat C:i386, type
winnt /b /s:c:i386 /u:c:unattend.txt
from DOS or the Win95 safe mode command prompt, or
winnt32 /b /s:c:i386 /u:c:unattend.txt
from NT to start the installation process. Add the line
OEMSkipEULA = Yes
to the setup script's [Unattended] section, and you have everything you needto perform an unattended installation. Usually.
Smooth Installations on New Machines
The problem I ran into with the Presario is the same problem I've faced withmany new computers: NT 4.0 shipped during summer 1996, but many new machineshave video cards, network cards, and SCSI cards that didn't exist in 1996. NTSetup is good at detecting hardware, but it can't detect hardware it doesn'tlook for. The Presario has a 3Com 3C900 EtherLink PCI card. The 3C900 NIC runsfine under NT, but its drivers aren't on the original NT Server 4.0 CD-ROM.
I used NT Setup's OEM Preinstall feature to automate NT's detection of the3C900 NIC. To add a NIC to the list of hardware NT automatically detects, youneed a functioning copy of NT on the computer housing the NIC, the NIC'sinstallation files (the drivers disk), and an ASCII setup script that's completeexcept for instructions for setting up the NIC.
You need to install the drivers manually on the first computer you installthe NIC on so you can gather the information you need to perform subsequentunattended installations. Then, you need to perform a series of steps.
First, determine the internal product name of the NIC. For example,the 3C900's internal product name is El90x. To find the NIC's internal productname, look in the Registry key HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionNetworkCards1. The value for the ProductNameentry is the NIC's internal product name.
Second, add the line
OemPreinstall = Yes
to the [Unattended] section of your setup script to tell NT Setup thatyou're going to use a new driver. If you add the lines
NoWaitAfterTextMode = 1
NoWaitAfterGUIMode = 1
to the setup script's [Unattended] section, you'll remove two instances inwhich NT Setup would otherwise wait for you to press a key before continuing.
Third, create $OEM$ and $OEM$CDRIVERS directories in i386. In myexample, you'll have directories named C:i386$OEM$ and C:i386$OEM$CDRIVERS. Place the NIC's installation files in C:i386$OEM$CDRIVERS. NT Setupwill automatically create a C:DRIVERS directory and copy everything inC:i386$OEM$CDRIVERS to C:DRIVERS.
Fourth, insert the following lines into your setup script:
[Network]
InstallAdapters = Adapterslist
DoNotInstallInternetServer = Yes
JoinDomain = BigDomain
CreateComputerAccount = Administrator,password
[Adapterslist]
NIC'sInternalName = adapterparameters, c:drivers
[adapterparameters]
Replace the variable BigDomain in the fourth line with the name of thedomain you want the machine to join. Replace Administrator,password in the fifthline with the name and password of a domain account with administratorprivileges, or remove the fifth line and create an account in the domain for themachine before performing the installation. Replace NIC'sInternalName in theseventh line with your NIC's internal product name, which you identified in stepone.
Your setup script probably has [Network], [Adapterslist], and[adapterparameters] sections. The previous lines replace those sections.However, if your [Network] section contains lines that refer to protocolsand services for NT to load, leave those lines in your setup script.
You might need to specify parameters such as the I/O address, IRQ, or mediatype for older NICs in the [adapterparameters] section. The [adapterparameters]section of my example is empty because the 3C900, like most modern PCI cards, isself-configuring.
If you're configuring an ISA or PC Card NIC, you might have to specifyadapter parameters. The names of the parameters you need to include vary fromcard to card. To determine which parameters you need to specify, you must do alittle Registry digging. In the same Registry key (HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionNetworkCards1)where you found the ProductName value in step one, you'll find the ServiceNamevalue entry. The ServiceName value is usually just the ProductName valuefollowed by a 1; the 3Com NIC's ServiceName entry is El90x1. The ServiceNamevalue is the name of a key in HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices that controls the NIC. That key contains theParameters key, which you use to set the NIC's parameters in your setup script.
For example, I have an older computer that has a 3Com ISA Ethernet card.The ISA NIC is not self-configuring, so I must tell NT Setup that the NIC is setto I/O address 300 and IRQ 10. The NIC's ProductName is Elnk3, and itsServiceName is Elnk31. In the computer's Registry, the key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesElnk31Parameters contains value entriesInterruptNumber = 0xA and IoBaseAddress = 0x300. I specify the[adapterparameters] and [Adapterslist] sections of the ISA NIC's setup script asfollows:
[Adapterslist]
Elnk3 = adapterparameters, c:drivers
[adapterparameters]
IoBaseAddress = 768
InterruptNumber = 10
Notice the IoBaseAddress' value of 768 and the InterruptNumber's value of10. The Registry displays the values in hexadecimal, but NT setup scripts neednumeric values in decimal, so I converted the values.
After you build the setup script, feed it to winnt or winnt32. In abouthalf an hour, you'll have a fresh copy of NT on your system, even if the systemuses new or unusual NT-compatible hardware.
About the Author
You May Also Like