After the data files captured from the source servers are generated and modified for the target servers, modify and save a copy of the following script files to the appropriate location:
See the operating system documentation for a complete description of the options that can be modified in the unattended installation file to customize the installation. To perform an unattended operating system installation and add mass-storage drivers:
The STARTDEPLOY.CMD file is similar to the following:
rem @echo off
REM
REM This is the first Script called from Startnet.cmd stub in
REM the WinPE
REM
REM Make sure that the network is fully started...
REM Sometimes it requires a bit of time
ipconfig
REM Map a drive to the share you are working from
net use s: \\server\share password /user: server\username
REM If none ignore this step and set the drive letter in
REM the following statements to appropriate drive
REM============================================================
set Tools=s:\tkdemoarea\HP\Tools
set MSTools=X:\i386\system32
set GlobalData=s:\tkdemoarea\HP\DeploymentScripts\datafiles
set MSDistribution=s:\tkdemoarea\w2k3entsp1
set HPQFlatFiles=s:\tkdemoarea\hpqflatfiles
set HPQComponents=s:\tkdemoarea\ntcsp
set SystemScripts=s:\tkdemoarea\HP\DeploymentScripts
REM============================================================
net start sysmgmt
REM Call the first Script
call %SystemScripts%\ServerDetect.cmd
echo Done!
REM @echo off
cd %tools%
%Tools%\System\hpdiscovery -f hpdiscovery.xml
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWL:SystemName eq "ProLiant DL380 G2"
if errorlevel 1 goto NEXT1
call .\Typical.cmd
goto end
:NEXT1
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWL:SystemName eq "ProLiant ML370"
if errorlevel 1 goto NEXT2
call .\Typical.cmd
goto end
:NEXT2
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWL:SystemName eq "ProLiant ML570"
if errorlevel 1 goto NEXT3
call .\Typical.cmd
goto end
:NEXT3
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWL:SystemName eq "ProLiant BL10e"
if errorlevel 1 goto NEXT4
call .\Typical.cmd
goto end
:NEXT4
REM *** Insert additional server tests as needed for your environment
cd \
:end
|
NOTE: The IFHW and HWQUERY utilities can be used to assist in customizing the DEPLOYSERVER.CMD script for your environment. For more information about these utilities, see the "Toolkit utilities" section. |
The DEPLOYSERVER.CMD file is similar to the following:
rem @echo off
cls
echo [ SCRIPT FOR REMOTE INSTALL OF W2K3 ON TYPICAL SERVER ]
REM pause
echo Retrieving State Information...
%Tools%\System\statemgr /r phase
if errorlevel 3 goto State3
if errorlevel 2 goto State2
if errorlevel 1 goto State1
if errorlevel 0 goto State0
:State0
REM *** Configure the target server hardware by reading the
REM *** configuration information in the script file
echo Running Configuration Replication Utility...
%Tools%\System\conrep -l -f%GlobalData%\HardwareSettings\hwconfig.xml -x%Tools%\System\conrep.xml
echo Setting State Information...
%Tools%\System\statemgr /w Phase 1
:State1
REM===============================================================
REM *** Configure the array controllers by reading the
REM *** configuration information in the script file and stamping
REM *** it onto the array controllers of the target server
REM===============================================================
echo Configuring the Array Controllers...
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array 5i Controller"
if errorlevel 1 GOTO NEXT1
%Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r0.ini
GOTO NEXT5
:NEXT1
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array 6i Controller"
if errorlevel 1 GOTO NEXT2
%Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r1.ini
GOTO NEXT5
:NEXT2
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array 5312"
if errorlevel 1 GOTO NEXT3
%Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r1.ini
GOTO NEXT5
:NEXT3
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array 640X Controller"
if errorlevel 1 GOTO NEXT4
%Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r5.ini
GOTO NEXT5
:NEXT4
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Smart Array P600 Controller"
if errorlevel 1 GOTO NEXT5
%Tools%\ACU\bin\hpacuscripting.exe -i %GlobalData%\ArraySettings\pl-r5.ini
GOTO NEXT5
:NEXT5
REM pause
REM===============================================================
REM *** Configure the iLO if iLo Present
REM *** echo configuring iLO is present
REM===============================================================
rem %Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml PCI:"Integrated Lights-Out Controller"
rem if errorlevel 1 GOTO State2
rem .\iLo\hponcfg -f %GlobalData%\iLoSettings\iloconfig.xml
REM===============================================================
echo Setting state information before reboot
REM===============================================================
%Tools%\System\statemgr /w Phase 2
REM *** REBOOT if necessary
%Tools%\System\reboot PXE
:State2
REM===============================================================
REM *** Create partition by reading content of the script file and
REM *** stamping the configuration onto the hard drive in the
REM *** target server
REM===============================================================
echo Creating Disk Partition...
%MsTools%\DiskPart /s %GlobalData%\diskPart0.txt
echo Formatting Disk Partition...
%MsTools%\format c: /FS:NTFS /Q /y
REM pause
%Tools%\System\statemgr /w Phase 3
echo Creating Driver Directory and Copying Drivers...
mkdir c:\ntcsp
rem xcopy %HPQFlatFiles%\$oem$ c:\$oem$ /s /e
xcopy %HPQComponents% c:\ntcsp /s /e
REM pause
REM *** Copy the customized UNATTEND.TXT file from the system
REM *** configuration area to the root directory of the target
REM *** server's hard drive
:State3
copy %GlobalData%\unattend.txt c:\
REM===============================================================
REM *** Start installation of the operating system from the hard
REM *** drive of the target system, reading unattended installation
REM *** instructions from the C:\UNATTEND.TXT file
REM===============================================================
%MSDistribution%\i386\winnt32 /s:%MSDistribution%\i386 /unattend:c:\unattend.txt /syspart:c
%Tools%\System\reboot c:
:State4
You can also use Microsoft® Setup Manager to help you create a custom UNATTEND.TXT file. For more information on this process, see "HOW TO: Use Setup Manager to Create an Answer File in Windows Server™ 2003" on the Microsoft® website.
See the operating system documentation for a complete description of the options that can be modified in the unattended installation file to customize the installation of Microsoft® Windows® PE. For more information, see the Microsoft® website.
UNATTEND.TXT sample file:
; Base Server Unattended Install Script for Windows Server 2003
;
[Unattended]
DriverSigningPolicy=Ignore
ExtendOemPartition=1
; FileSystem=ConvertNTFS
KeyboardLayout="US"
NtUpgrade=No
; OemFilesPath=C:
OemPnPDriversPath=drivers\net;drivers\scsi
OemPreinstall=Yes
OemSkipEula=Yes
DisableVirtualOemDevices=yes
OverwriteOemFilesOnUpgrade=No
TargetPath=\WINDOWS
UnattendMode=FullUnattended
Win9xUpgrade=No
[MassStorageDrivers]
"Adaptec Ultra160 Family Manager Set"=OEM
"Compaq Smart Array Controllers"=OEM
"Smart Array 5x and 6x Controllers"=OEM
"Integrated Ultra ATA-100 IDE RAID Controller (Windows 2000)"=OEM
"LSI Logic Ultra320 1020/1030 Driver (Windows Server 2003)"=OEM
"LSI Logic C8100 PCI SCSI Host Adapter"=RETAIL
"LSI Logic C896 PCI SCSI Host Adapter"=RETAIL
"LSI Logic C8xx PCI SCSI Host Adapter"=RETAIL
"IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller"=RETAIL
"CSB-6 Ultra ATA-100 IDE RAID Controller (Windows Server 2003)"=OEM
"Smart Array SAS/SATA Controllers"=OEM
"Adaptec RAID Controller"=OEM
[OEMBootFiles]
ADPU160M.SYS
CPQARRY2.SYS
CPQCISSM.SYS
MegaIDE.sys
Symmpi.sys
LsiCsb6.sys
HPCISSs2.sys
AAC.sys
TXTSETUP.OEM
[GuiUnattended]
AdminPassword=password
AutoLogon=Yes
AutoLogonCount=1
OEMSkipRegional=1
OemSkipWelcome=1
TimeZone=20
[UserData]
ComputerName=TEST
FullName=HP
OrgName=HPQ
ProductID=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
[Proxy]
Proxy_Enable=0
Use_Same_Proxy=0
[LicenseFilePrintData]
AutoMode=PerServer
AutoUsers=999
[GuiRunOnce]
"c:\ntcsp\setupex.exe /smartstart"
[RegionalSettings]
Language=00000409
LanguageGroup=1
[Components]
iis_pwmgr=Off
iis_inetmgr=Off
iis_www=Off
iis_ftp=Off
TSClients=On
TSEnable=On
[Networking]
InstallDefaultComponents=Yes
[Identification]
JoinWorkgroup=WORKGROUP
[NetOptionalComponents]
SNMP=1
WBEMSNMP=1
SimpTCP=1
[SNMP]
Community_Name=Public
Traps=Localhost
Accept_CommunityName=public
Send_Authentication=yes
[TerminalServices]
ApplicationServer=0
PermissionsSetting=0
[Display]
AutoConfirm=1
BitsPerPel=16
ConfigureAtLogon=0
VRefresh=60
Xresolution=800
Yresolution=600
[OEM_Ads]
Logo=Compaq.bmp