HP Intelligent Provisioning User Manual

HP Scripting Toolkit for Windows User Guide

Abstract
This document provides information about the Scripting Toolkit for Windows utilities and how best to use the Scripting Toolkit for Windows to configure HP ProLiant servers and BladeSystem infrastructure in a Windows environment. This document is intended for IT experts with experience in scripting operating system installations and configuring HP ProLiant server hardware.
HP Part Number: 415598-407 Published: June 2012 Edition: 16
Notices
© Copyright 2005, 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license.
Microsoft, Windows, Windows Server, and Windows Vista are U.S. registered trademarks of Microsoft Corporation. Intel is a trademark of Intel Corporation in the U.S. and other countries.

Contents

1 Introduction...............................................................................................6
Scripting Toolkit for Windows.....................................................................................................6
Microsoft Windows Preinstallation Environment.............................................................................6
Minimum requirements..............................................................................................................6
2 Deployment using the Scripting Toolkit for Windows.......................................7
Deployment overview................................................................................................................7
Sample deployment procedure...................................................................................................7
Creating a network share......................................................................................................8
Adding drivers to Windows PE 2.1.........................................................................................8
Adding drivers to Windows PE 3.0.........................................................................................9
Capturing a reference configuration from the source server......................................................10
Configuring the target server and installing the operating system .............................................10
3 Advanced topics......................................................................................12
Overview..............................................................................................................................12
Customizing deployment scripts using HPDISCOVERY and IFHW..................................................12
Querying the HPDISCOVERY file based on system name ........................................................12
Querying the HPDISCOVERY file to determine the presence of a particular card ........................12
Querying the HPDISCOVERY file to determine the presence of a card family..............................13
Performing an unattended operating system installation and adding mass storage drivers.................13
Booting Windows PE from a USB drive key................................................................................20
Flashing the ROM in a Windows PE environment........................................................................20
Erasing array configurations.....................................................................................................22
4 Scripting Toolkit utilities.............................................................................23
Syntax conventions.................................................................................................................23
Utility online help...................................................................................................................23
Using Scripting Toolkit utilities..................................................................................................24
Using REBOOT.......................................................................................................................24
REBOOT command-line syntax.............................................................................................24
REBOOT command-line arguments.......................................................................................24
REBOOT return codes.........................................................................................................24
REBOOT command-line examples........................................................................................25
Using SETBOOTORDER...........................................................................................................25
SETBOOTORDER command-line syntax.................................................................................25
SETBOOTORDER command-line arguments...........................................................................25
SETBOOTORDER return codes.............................................................................................25
SETBOOTORDER command-line examples.............................................................................25
Using STATEMGR...................................................................................................................25
STATEMGR command-line syntax.........................................................................................26
STATEMGR command-line arguments....................................................................................26
STATEMGR return codes.....................................................................................................26
STATEMGR command-line examples.....................................................................................26
Using RBSURESET...................................................................................................................26
RBSURESET command-line syntax.........................................................................................27
RBSURESET command-line arguments...................................................................................27
RBSURESET return codes.....................................................................................................27
Using HPDISCOVERY..............................................................................................................27
HPDISCOVERY command-line syntax....................................................................................27
HPDISCOVERY command line arguments..............................................................................27
HPDISCOVERY return codes................................................................................................28
HPDISCOVERY command line examples...............................................................................28
Contents 3
Using IFHW...........................................................................................................................28
IFHW command-line syntax.................................................................................................28
IFHW command-line arguments...........................................................................................28
IFHW return codes.............................................................................................................29
IFHW command line examples............................................................................................29
Expression operators and terms...........................................................................................29
Expression examples..........................................................................................................29
Using HWQUERY...................................................................................................................30
HWQUERY command-line syntax.........................................................................................30
HWQUERY command line arguments...................................................................................30
HWQUERY return codes.....................................................................................................30
HWQUERY command-line examples....................................................................................31
Using CONREP......................................................................................................................31
CONREP command-line syntax............................................................................................32
CONREP command line arguments......................................................................................32
CONREP return codes........................................................................................................32
CONREP screen output.......................................................................................................32
CONREP -s (Store to Data file) Example usage for HP ProLiant servers not using the Oxx ROM
family...............................................................................................................................33
CONREP –l (Load from Data file) Example usage for HP ProLiant servers not using the Oxx ROM
family...............................................................................................................................33
CONREP Data File Sample Contents for HP ProLiant servers not using the Oxx ROM family.........33
CONREP command file contents..........................................................................................34
Using HPRCU.........................................................................................................................35
HPRCU command-line syntax...............................................................................................35
HPRCU command line arguments.........................................................................................35
HPRCU return codes...........................................................................................................36
HPRCU sample XML format.................................................................................................36
Using HPACUSCRIPTING.........................................................................................................36
Capturing a configuration...................................................................................................37
Using an Input script...........................................................................................................37
Creating an ACU script file.................................................................................................38
Sample custom input script.............................................................................................38
Script file options...............................................................................................................39
Control category...........................................................................................................41
Action mode............................................................................................................41
Method mode..........................................................................................................41
Controller category.......................................................................................................41
Controller................................................................................................................41
ChassisName..........................................................................................................42
ClearConfigurationWithDataLoss................................................................................42
LicenseKey, DeleteLicenseKey.....................................................................................42
PreferredPathMode...................................................................................................42
ReadCache, WriteCache...........................................................................................42
RebuildPriority, ExpandPriority....................................................................................43
SSPState..................................................................................................................43
SurfaceScanDelay....................................................................................................43
Video performance options........................................................................................43
Array category.............................................................................................................44
Array......................................................................................................................44
Drive.......................................................................................................................44
DriveType................................................................................................................44
OnlineSpare............................................................................................................45
Logical Drive category...................................................................................................45
ArrayAccelerator......................................................................................................45
4 Contents
LogicalDrive.............................................................................................................45
LogicalDriveSSPState.................................................................................................46
ParityGroups............................................................................................................46
PreferredPath...........................................................................................................46
RAID.......................................................................................................................46
Sectors....................................................................................................................46
Size........................................................................................................................47
SSPAdaptersWithAccess............................................................................................47
StripeSize................................................................................................................47
HBA category...............................................................................................................47
ConnectionName.....................................................................................................48
HBA_WW_ID..........................................................................................................48
HostMode...............................................................................................................48
ACU scripting error messages..............................................................................................48
Using HPLPCFG......................................................................................................................52
HPLPCFG command-line syntax............................................................................................52
HPLPCFG command-line arguments......................................................................................52
HPLPCFG return codes........................................................................................................52
HPLPCFG command-line examples.......................................................................................53
Using LO100CFG...................................................................................................................53
LO100CFG command-line syntax.........................................................................................53
LO100CFG command-line arguments...................................................................................54
LO100CFG return codes.....................................................................................................54
LO100CFG command-file contents.......................................................................................54
Using HPQLAREP...................................................................................................................55
HPQLAREP command-line syntax.........................................................................................55
HPQLAREP command-line arguments....................................................................................55
HPQLAREP return codes......................................................................................................56
HPQLAREP command-line examples.....................................................................................56
Using HPONCFG...................................................................................................................57
HPONCFG command-line syntax.........................................................................................57
HPONCFG command-line arguments...................................................................................57
HPONCFG return codes.....................................................................................................58
HPONCFG command file contents.......................................................................................58
Obtaining an entire configuration....................................................................................58
Obtaining a specific configuration...................................................................................59
Setting a configuration...................................................................................................60
HPONCFG command-line examples.....................................................................................60
5 Troubleshooting........................................................................................61
Troubleshooting table..............................................................................................................61
6 Support and other resources......................................................................62
Information to collect before contacting HP.................................................................................62
How to contact HP..................................................................................................................62
Subscription service................................................................................................................62
Related information.................................................................................................................62
Scripting Toolkit support..........................................................................................................62
Typographic conventions.........................................................................................................63
HP Insight Remote Support software..........................................................................................63
7 Documentation feedback...........................................................................65
Acronyms and abbreviations.........................................................................66
Index.........................................................................................................68
Contents 5

1 Introduction

Scripting Toolkit for Windows

The Scripting Toolkit for Windows is a server deployment product that delivers an unattended automated installation for high-volume ProLiant server and BladeSystem infrastructure deployments. This document describes how to best use the Scripting Toolkit to configure HP ProLiant servers and BladeSystem infrastructure. It also contains information about the Scripting Toolkit utilities and how to use them in an unattended environment. This document does not include information about installing the operating system.
The Scripting Toolkit is designed for IT experts with experience in scripting operating system installations and configuring ProLiant and BladeSystem infrastructure server hardware.
CAUTION: Improper use of the Scripting Toolkit utilities can result in loss of critical data. Because
of the potential data-loss risk, only experienced individuals should use the Scripting Toolkit utilities. Before using the Scripting Toolkit, all necessary precautions must be taken to ensure that mission-critical systems remain online if a failure occurs.

Microsoft Windows Preinstallation Environment

Microsoft Windows Preinstallation Environment (Windows PE) is a small footprint of the Windows Server environment that enables you to run tools in a 32- or 64-bit Windows environment. Because Windows PE is based on the Windows kernel running in protected mode, only a subset of features and APIs are available in this environment. This document is applicable to Windows PE 2.1 and
3.0 only, and is not backward compatible with previous versions of Windows PE. Windows PE enables you to install the Windows operating system, establish a connection with
network servers, and perform hardware configuration using the Scripting Toolkit. You can use Windows PE to customize and configure your servers before the operating system is installed.
To obtain Windows PE 2.1, download the Microsoft Windows Automated Installation Kit for Windows Vista SP1 and Windows Server 2008 from the Microsoft website at (http://
www.microsoft.com).
To obtain Windows PE 3.0, download the Microsoft Windows Automated Installation Kit for Windows 7 and Windows Server 2008 R2 from the Microsoft website at (http://
www.microsoft.com).

Minimum requirements

Before beginning the deployment process, be sure to have the following items available:
HP Scripting Toolkit for Windows
HP Scripting Toolkit for Windows User Guide
Microsoft Windows Automated Installation Kit for Windows Vista SP1 and Windows Server
2008 (for the creation of Windows PE 2.1) or Microsoft Windows Automated Installation Kit for Windows 7 and Server 2008 R2 (for the creation of Windows PE 3.0).
The operating system to be deployed (Windows Server 2008 or Windows Server 2008 R2)
6 Introduction

2 Deployment using the Scripting Toolkit for Windows

Deployment overview

The Scripting Toolkit includes a set of utilities for configuring and deploying servers in a customized, predictable, and unattended manner. These utilities enable you to duplicate the configuration of a source server on target servers with minimal user interaction.
IMPORTANT: ProLiant 100-Series servers previous to Gen8 do not support all Scripting Toolkit
commands, and those that are supported might not work as expected. For example, SETBOOTORDER might behave differently on these systems. For a better understanding, read the server documentation carefully.
You can perform server deployments in many different ways using the Scripting Toolkit, but you must include the following steps in every deployment:
1. Create a network share.
2. Prepare the bootable media (CD/DVD, USB drive key, or PXE).
3. Configure the system and storage hardware on the target server.
4. Install the operating system.
5. Update the drivers and agents as needed.
IMPORTANT: Not all options can be configured using Scripting Toolkit utilities. Some options
must be configured manually or with other configuration utilities, which are available online, before they can be used with the Scripting Toolkit. For more information on configuration, see the option documentation.

Sample deployment procedure

The following procedure is a case study of a typical deployment. This procedure assumes that you are performing a media-based installation and that you want to replicate an existing server configuration. The process described in this section can vary depending on your specific requirements.
This section provides a simple overview of a basic deployment, but the flexibility of the Scripting Toolkit enables you to do much more. With an understanding of the basic steps and your own deployment environment, you can use the Scripting Toolkit to further customize and automate the deployment process. For information on automating deployments, see “Advanced topics” (page
12).
Deployment overview 7

Creating a network share

To create a network share:
1. Download the appropriate Scripting Toolkit SoftPaq from the Scripting Toolkit website at (http://www.hp.com/go/ProLiantSTK).
2. Install the Scripting Toolkit SoftPaq on a common server that resides on the same network as the servers to be deployed.
3. Share the folder in which you installed the Scripting Toolkit. Be sure that the account you use has read and write access.
4. Create an empty directory called \DATA in the Scripting Toolkit folder for configuration files. Captured files are stored in this directory.
HP also recommends installing the latest version of the HP Service Pack for ProLiant (SPP). To obtain the most current SPP, see the SPP website at (http://www.hp.com/go/spp).

Adding drivers to Windows PE 2.1

The Scripting Toolkit contains HP drivers that are to be used with Windows PE 2.1. The drivers are located in the hpDrivers directory of the Scripting Toolkit. Run the executable file in this directory, and then click Extract to extract the drivers to a location to be used in the following steps.
You can add drivers to Windows PE either offline or online. To add drivers offline:
8 Deployment using the Scripting Toolkit for Windows
1. Apply the base image (Winpe.wim) by adding imagex to a local Windows PE directory. For example:
imagex /apply WinPE.wim 1 c:\winpe_x86\mount\
or
imagex /mountrw WinPE.wim 1 c:\winpe_x86\mount\
2. Add the .inf file to the base image by using the peimg /inf command. For example:
peimg /inf=<path> c:\winpe_x86\mount\Windows
where <path> is the location of the .inf file.
3. Repeat steps 1 and 2 for each additional device driver. When you finish customizing the image, prepare the image for deployment by using the peimg /prep command.
To add drivers online: Use the drvload tool, drvload.exe inf_path, where inf_path is the path to a device driver
INF file. For more information on using Windows PE 2.1, see the Windows Preinstallation Environment
User's Guide (WinPE.chm) contained in the Windows Automated Installation Kit. For more information about the Windows PE 2.1 driver included in the Scripting Toolkit for
Windows, see the readme.txt file contained at the root of the Windows PE 2.1 driver bundle in the hpDrivers directory.
NOTE: Before running HPDISCOVERY, you must install WMI. For more information on installing
extra packages in Windows PE, see the Windows PE documentation.

Adding drivers to Windows PE 3.0

The Scripting Toolkit contains HP drivers that are to be used with Windows PE 3.0. These drivers are located in the hpDrivers directory of the Scripting Toolkit. Run the executable file in this directory, and then select Extract to extract the drivers to a location to be used in the following steps.
Drivers can be added to Windows PE either offline or online. For all the utilities to work correctly, complete the following steps to ensure the appropriate iLO driver (based on OS and version number) is installed and the STK IO driver (hpsstkio.sys) is copied to the windows\system32\ drivers directory.
To add drivers offline:
1. Mount the base image to a local directory by using dism. For example:
dism /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim /index:1 MountDir:C:\STK.TMP
2. Add the .inf file to the base image by using the dism /Add-Driver command. For example:
dism /image:C:\SSSTK.TMP /Add-Driver /driver:C:\ssstk\hpDrivers\example.inf
3. For each additional device driver repeat steps 1 and 2. When you finish customizing the image, prepare the image for deployment by using the peimg /prep command.
NOTE: If the appropriate iLO driver is not installed, some utilities do not work correctly. For
more information, see the README.txt file located with the drivers.
To add drivers online:
1. Use the drvload tool, drvload.exe inf_path, where inf_path is the path to a device driver INF file.
drvload x:\hpDrivers\example.inf
Sample deployment procedure 9
2. Copy and then paste the STK IO driver to the windows\system32\drivers directory.
NOTE: If the HPSTKIO.SYS driver is not installed, some utilities do not work correctly.
copy c:\ssstk\hpDrivers\system\ hpsstkio\ hpsstkio.sys c:\SSSTK.TMP\ windows\system32\drivers
For more information about Windows PE 3.0, see the Windows Preinstallation Environment User's Guide (WinPE.chm) located in the Windows Automated Installation Kit.
For more information about the Windows PE drivers included in the Scripting Toolkit for Windows, see the readme.txt file located at the root of the Windows PE driver bundle in the hpDrivers directory.
NOTE: Before running HPDISCOVERY, you must install WMI. For more information on installing
extra packages in Windows PE, see the Windows PE documentation.

Capturing a reference configuration from the source server

1. Boot the media (CD/DVD, USB drive key, or PXE) that contains the customized Windows PE image on the source server.
2. Open a command window.
3. Capture the system settings from the source server using the CONREP utility: a. Change to the directory where CONREP resides. b. Save the current system configuration to a data file in the \data directory you created
on the network share:
conrep -s -fs:\data\filename
Choose a file name that is descriptive of the source server; for instance, dl380g3.xml.
4. Capture the storage settings: a. Change to the directory in which HPACUSCRIPTING resides. b. Save the current array configuration to a data file in the \data directory you created on
the network share:
hpacuscripting -c s:\data\filename
Choose a file name that is descriptive of the source array; for instance, dl380g3array.ini.
5. Verify that the new output files are present in the \data directory.
You cannot capture and apply iLO settings using HPONCFG in the same fashion as CONREP and HPACUSCRIPTING. For more information, see “Using HPONCFG” (page 57).
IMPORTANT: Because the -w argument does not capture certain types of information, such as
the administrator password, data files created with HPONCFG using the -w argument cannot then be used as input files for HPONCFG, unless they are modified first.

Configuring the target server and installing the operating system

1. Boot the media (CD/DVD, USB drive key, or PXE) that contains the customized Windows PE image on the target server.
2. Run CONREP to configure the target server with the captured settings: a. Change to the directory where CONREP resides. b. Apply the captured configuration to the target server:
conrep -l -fs:\data\filename
10 Deployment using the Scripting Toolkit for Windows
3. Run HPACUSCRIPTING to configure the storage of the target server with the captured settings: a. Change to the directory where HPACUSCRIPTING resides. b. Apply the captured configuration to the target array:
bin \hpacuscripting.exe -i s:\data\filename
4. (Optional) Configure the iLO option. HP recommends that you set these parameters: a. Edit the sample iLOconfig.xml file that is provided with the Scripting Toolkit so that
it contains the appropriate password and other required information. For more information,
see the "Using HPONCFG" section. b. Copy the edited iLOconfig.xml file to s:\data. c. Change to the directory where HPONCFG resides. d. Configure the iLO option:
hponcfg -f s:\data\iLOconfig.xml
5. Insert the operating system DVD.
6. Reboot to run the operating system installation. For information on automated, unattended installation, see the following resources:
Operating system documentation
Windows Server Technical Reference at (http://technet.microsoft.com/en-us/library/
bb625087.aspx)
Sample deployment procedure 11

3 Advanced topics

Overview

The advanced topics addressed in this section cover some of the most common deployment tasks that can be automated using the Scripting Toolkit.
IMPORTANT: The script files and script segments in this section are provided only as examples.
You must modify the scripts for your environment. When creating or modifying your own scripts, the pause command is a valuable tool to help you determine that each step of the script is functioning as desired.

Customizing deployment scripts using HPDISCOVERY and IFHW

Use the HPDISCOVERY utility to determine which devices and capabilities are available in a particular ProLiant server. HPDISCOVERY generates an XML-based output file that provides information such as system ROM version, amount of RAM available, and the types of devices present in the system. Then, use the HWQUERY and IFHW (IF Hardware utility) files to query the output file, enabling you to add conditional tests to a script so it performs different operations based on the outcome of the tests.

Querying the HPDISCOVERY file based on system name

In the following script, the IFHW utility searches the HPDISCOVERY data in the hpdiscovery.xml file for the system name ProLiant BL20p. If the system name is found, the script calls the bl20p.cmd file.
ifhw .\hpdiscovery.xml allboards.xml HWQ:SystemName eq "ProLiant BL20p" if errorlevel 1 goto NEXT1 call .\BL20p.cmd goto end :NEXT1 ifhw .\hpdiscovery.xml allboards.xml HWQ:SystemName eq "ProLiant DL380 G4" if errorlevel 1 goto NEXT2 call .\ DL380G4.cmd goto end

Querying the HPDISCOVERY file to determine the presence of a particular card

Using IFHW to detect a particular PCI card or device can be valuable in determining which settings to apply. For example, an array controller used as a boot controller might require a RAID 1 setting, while an optional array controller used for a database (such as a Smart Array 5312 Controller) might require a RAID 5 ADG setting. The following example demonstrates how to use IFHW to detect a particular card or device:
REM *** Configure the array controllers by reading the configuration REM *** information in the script file and stamping it onto the array REM *** controllers of the target server echo Configuring the Array Controllers... ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 5i Controller" if errorlevel 1 GOTO NEXT1 .\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA5iArray.ini :NEXT1 ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 6i Controller" if errorlevel 1 GOTO NEXT2
12 Advanced topics
.\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA6iArray.ini :NEXT2 \ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array 5312" if errorlevel 1 GOTO NEXT3 .\ACU\bin\hpacuscripting.exe -i .\ArraySettings\SA5312Array.ini :NEXT3

Querying the HPDISCOVERY file to determine the presence of a card family

IFHW and HWQUERY can perform queries based on partial name information, enabling you to verify the presence of a whole family of cards by using a partial query such as Smart Array.
NEXT1: ifhw .\hpdiscovery.xml allboards.xml PCI:"Smart Array" if errorlevel 1 GOTO NEXT2 .\ACU\bin\hpacuscripting.exe -i .\ArraySettings\GeneralArrayConfig.ini NEXT2:
Before creating a test condition, refer to the allboards.xml file to determine the correct name for the device or group of devices you want to query.
IMPORTANT: IFHW is case-sensitive. Incorrect case, misspellings, and incorrect spacing cause
the query to fail.

Performing an unattended operating system installation and adding mass storage drivers

After the data files are 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:
STARTDEPLOY.CMD
SERVERDETECT.CMD
DEPLOYSERVER.CMD
UNATTEND.TXT
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:
Performing an unattended operating system installation and adding mass storage drivers 13
1. Using a standard text editor, create or modify the following additional Scripting Toolkit files for the unattended installation:
a. Edit the STARTDEPLOY.CMD file, which is executed by STARTNET.CMD in Windows PE,
to modify the environment variables to match the locations of the utilities and data files specific to your deployment infrastructure. You must customize this file for your environment. In the following example, lines in bold type indicate information that must be modified for your environment.
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!
b. Modify the SERVERDETECT.CMD file for your specific environment. This file is provided
14 Advanced topics
in the samples subdirectory. The SERVERDETECT.CMD file does not accept any arguments. It runs the HPDISCOVERY utility to determine the server type, and then executes a typical deployment script (DEPLOYSERVER.CMD).
REM @echo off cd %tools% %Tools%\System\hpdiscovery -f hpdiscovery.xml
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWQ: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 HWQ:SystemName eq "ProLiant ML370"
if errorlevel 1 goto NEXT2 call .\Typical.cmd
goto end :NEXT2
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWQ:SystemName eq "ProLiant ML570"
if errorlevel 1 goto NEXT3 call .\Typical.cmd goto end :NEXT3
%Tools%\System\ifhw hpdiscovery.xml %Tools%\System\allboards.xml HWQ: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
Performing an unattended operating system installation and adding mass storage drivers 15
c. Edit the DEPLOYSERVER.CMD file for your specific environment.
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 “Scripting Toolkit utilities” (page 23).
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
16 Advanced topics
: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
Performing an unattended operating system installation and adding mass storage drivers 17
%Tools%\System\reboot c: :State4
2. Using a standard text editor, modify the Windows Server 2003 SP1 UNATTEND.TXT sample file to fit your deployment requirements. A sample UNATTEND.TXT file is provided with the Scripting Toolkit. To add mass-storage drivers, you must modify the [MassStorageDrivers] and the [OEMBootFiles] sections.
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" at (http://support.microsoft.com/kb/323438/EN-US/) 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 at (http://technet.microsoft.com/en-us/
windowsserver/default.aspx).
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
18 Advanced topics
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
Performing an unattended operating system installation and adding mass storage drivers 19
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
3. If you modified the [MassStorageDrivers] section in the UNATTEND.TXT file, you must also edit the TEXTSETUP.OEM file. For more information, see the Microsoft website at (http://
technet.microsoft.com/en-us/windowsserver/default.aspx).

Booting Windows PE from a USB drive key

Some applications, such as the firmware update components, require the use of a writable medium. A writable file system allows for the expansion of the contents of the components and provides a scratch area for the backup firmware image copied from the device under flash. While using Windows PE on CD is not suitable for this purpose, a USB drive key provides the ideal medium for this type of activity.
NOTE: Booting from a USB drive key is supported only on certain ProLiant servers. For more
information, see the SPP website at (http://www.hp.com/go/spp).
To boot Windows PE from a USB drive key, see the Microsoft Windows PE documentation.

Flashing the ROM in a Windows PE environment

You can run the Online ROM Flash Smart Components to flash system and option ROMs in the Windows PE environment, but you must ensure that a writable area is available for the component to use. You can use the Online ROM Flash Smart Components as part of a scripted installation before the operating system installation portion of the deployment.
Be sure to download the latest Online ROM Flash Smart Components for the system or option to be flashed. Be sure that the component number and the server name correspond. The latest ROM flash components are available from the HP software and drivers website at (http://www.hp.com/
support).
With flash system and option ROMs, you can create a script file to perform the following tasks:
Use HPDISCOVERY and IFHW to determine the current system or option ROM.
Run the Online ROM Flash Smart Component.
Verify the error level.
The following script is provided as an example only and must be modified for your particular environment. Additional checks can be added as needed. Lines in bold type must be modified to customize the script.
System\hpdiscovery -f hpdiscovery.xml
System\ifhw hpdiscovery.xml System\allboards.xml HWQ:SystemName eq "ProLiant DL380 G2"
if errorlevel 1 goto NEXT1 REM ----
20 Advanced topics
REM This section performs the System ROM Flash. Online Flash components REM are kept in a directory called Roms REM ----
Roms\cp004648.exe /INSTPATH:S:\ROMScratcharea
REM ---­REM Check the error code returned to determine Success or Failure REM ---­if errorlevel 3 goto HWNOTFOUND if errorlevel 2 goto REBOOTREQUIRED if errorlevel 1 goto NEXT2 goto end NEXT1: REM Try next system type
System\ifhw hpdiscovery.xml System\allboards.xml HWQ:SystemName eq "ProLiant DL380 G3"
if errorlevel 1 goto NEXT2 REM ---­REM This section performs the System ROM Flash. Online Flash components REM are kept in a directory called Roms REM ----
Roms\cp005041.exe /INSTPATH:S:\ROMScratcharea
REM ---­REM Check the error code returned to determine Success or Failure REM ---­if errorlevel 3 goto HWNOTFOUND if errorlevel 2 goto REBOOTREQUIRED if errorlevel 1 goto NEXT2 goto end NEXT2: REM ---­REM Example of Option Rom Flash for a SmartArray 5i Controller REM ----
System\ifhw hpdiscovery.xml System\allboards.xml PCI:"Smart Array 5i Controller"
if errorlevel 1 goto NEXT3 REM ---­REM This section performs the Option ROM Flash. Online Flash components REM are kept in a directory called Roms REM ----
Roms\cp002238.exe /INSTPATH:S:\ROMScratcharea
REM ---­REM Check the error code returned to determine Success or Failure REM ---­if errorlevel 3 goto HWNOTFOUND if errorlevel 2 goto REBOOTREQUIRED if errorlevel 1 goto NEXT3 goto end NEXT3: REM ---­REM DONE
Flashing the ROM in a Windows PE environment 21
Loading...
+ 48 hidden pages