HP SmartStart Scripting Toolkit Linux Edition User Guide Part Number 415597-401 June 2010 (Tenth Edition)
© Copyright 2005, 2010 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.
Contents Introduction .................................................................................................................................. 6 SmartStart Scripting Toolkit............................................................................................................................ 6 Minimum requirements ..................................................................................................................................
RBSURESET return codes ................................................................................................................... 26 Using HPDISCOVERY ................................................................................................................................. 26 HPDISCOVERY command-line syntax.................................................................................................. 27 HPDISCOVERY command-line arguments ...................................................
LO100CFG return codes ................................................................................................................... 60 LO100CFG command file contents .................................................................................................... 60 Troubleshooting .......................................................................................................................... 61 Troubleshooting table .......................................................................
Introduction SmartStart Scripting Toolkit The SmartStart Scripting Toolkit is a server deployment product that delivers an unattended automated installation for high-volume server deployments. This document describes how to best utilize the Toolkit to configure HP ProLiant servers. It also contains information about the Toolkit utilities and how to use them in an unattended environment. This document does not include information about installing the operating system.
Deployment using the SmartStart Scripting Toolkit Deployment overview The SmartStart 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: HP ProLiant 100 series servers do not support all toolkit commands. See descriptions below for utility usage.
Creating a network share To create a network share: 1. Download the appropriate SmartStart Scripting Toolkit package from the Toolkit website (http://www.hp.com/servers/sstoolkit). 2. Extract the Toolkit package on a common server that resides on the same network as the servers to be deployed. 3. Use the Linux NFS Server Configuration Tool to share the directory in which you extracted the Toolkit package and to assign read and write permissions for all hosts.
4. Load appropriate storage controller drivers: modprobe -f cciss 5. Load the channel interface driver for iLO: insmod /opt/hp/hp-ilo/bin/`uname -r`/hp_ilo.ko 6. Mount the network share: mkdir /mnt/toolkit_share mount -t nfs -o rw,nolock :/path/to/toolkit /mnt/toolkit_share 7. Capture a hardware discovery report using the HPDISCOVERY utility: cd /mnt/toolkit_share/utilities ./hpdiscovery -f /mnt/toolkit_share/data_files/hpdiscovery.xml 8.
-no-emul-boot -boot-load-size 4 \ -boot-info-table \ ./linuxbootCD Now, the ISO file can be written to a CD. Configuring the target server 1. At the target server, boot the CD that contains the custom Linux Toolkit image. 2. At the boot prompt, type bash and then press Enter. When the process is complete, a command prompt appears. 3. Load the network drivers using the loadnet script: /loadnet.sh 4. Load appropriate storage controller drivers: modprobe -f cciss 5.
Advanced topics SYSLINUX SYSLINUX is a free third-party bootloader available at the SYSLINUX web page (http://syslinux.zytor.com/index.php). SYSLINUX is a suite of programs that perform various boot functions. The SmartStart Scripting Toolkit uses the following bootloader programs: • isolinux.bin—This program enables you to boot from ISO media. • pxelinux.0—This program enables you to boot using PXE protocol. • ldlinux.sys—This program enables you to boot from a USB drive key.
IMPORTANT: A basic understanding of DHCP, PXE, and TFTP is required to perform the procedure described in this section. NOTE: Examples in this section might not be specific to your operating system environment. Refer to the Linux system administrator's guide for more information about your particular environment. The following figure illustrates a simplified Toolkit PXE boot. Setting up a PXE boot environment requires the following general steps: 1. Set up a DHCP server with the appropriate options. 2.
# trivial file transfer protocol. The tftp protocol is \ # often used to boot diskless workstations, download \ # configuration files to network-aware printers and to \ # start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.
next-server IP_ADDRESS_OF_TFTP_SERVER; filename "pxelinux.0"; The next-server command tells the DHCP client where to send the TFTP get request. The filename command tells the DHCP client which file to get. In this example, the file is pxelinux.0. When you have finished creating the dhcpd.conf file, restart the DHCP server: /etc/init.d/dhcpd restart Booting from a USB drive key Some applications require the use of a writable medium.
• Running hardware discovery to determine server type • Obtaining server ID information from the hardware discovery file • Copying server-specific configuration script and data files from the network share • Loading drivers for storage controllers and any other devices that must be configured • Running the CONREP utility • Running the HPACUSCRIPTING utility, if needed (This action is server-specific.
./load_modules.sh echo "" echo "Pausing to allow drivers to finish loading" sleep 15 echo "" echo "Configure server" ## run hardware discovery ./hpdiscovery -f ${HPDISCOVERY_FILE} ## use hwquery to fetch the SystemName from hardware discovery file. ( extra " " are required ) export "`./hwquery ${HPDISCOVERY_FILE} allboards.xml SERVERNAME=SystemName`"; echo "Server Type: ${SERVERNAME}" case "${SERVERNAME}" in "ProLiant DL380 G4" ) # Apply System Configuration ./conrep -l -fdata_files/dl380g4_conrep.
"ProLiant ML310 G2" ) ./conrep -l -fdata_files/ml310g2_conrep.dat ./ifhw ${HPDISCOVERY_FILE} allboards.
dd if=/dev/zero of=/dev/sssd bs=512 count=32 echo "forcing kernel to re-read partition table" sfdisk --re-read /dev/sssd sleep 5 echo "landing mbr" dd if=${NFS_MAIN}/linux_unattend/generic.
Additionally, the sample install_win.sh script for Microsoft® Windows® performs preinstallation tasks, including: • Creating a 2 GiB FAT16 primary partition • Formatting the partition for the FAT file system • Creating a boot sector for the partition • Copying the FreeDOS operating system to the new C drive • Copying the Windows® installation sources, the $oem$ directory, and unattend.txt files to the C drive To use the install_win.sh sample script to install Microsoft® Windows® and install_w2k8.
part / --size 100 --grow install mouse genericps/2 timezone Etc/GMT-6 #xconfig --server "Mach64" --monitor "generic monitor" skipx rootpw iscrypted $1$ltK6jzho$7pPbE8WPNAeg44UlXqG27 auth --useshadow --enablemd5 lilo --location partition reboot %packages ElectricFence setup filesystem basesystem ldconfig glibc shadow-utils mkkickstart mktemp termcap libtermcap bash MAKEDEV SysVinit XFree86-Mach64 ncurses info grep XFree86-libs chkconfig XFree86-xfs anacron anonftp fileutils mailcap textutils apache apmd arpw
The previous example contains a limited list of packages to be installed. Add to this section any other packages to be installed. The server deployment configuration and operating system installation process is complete.
Toolkit utilities Syntax conventions Syntax refers to the way a command and parameters must be entered. Unless specified otherwise, enter commands, parameters, and switches in all uppercase or all lowercase letters. Sample syntax line: SAMPLE[/R|-R][PATH]FILENAME[...] Command element Description SAMPLE Specifies the name of the command. / or - Indicates a command line switch for executable files.
Using toolkit utilities The Toolkit utilities control the installation process, read the source server configuration, and duplicate the configuration on a target server through a generated script file.
REBOOT return codes There are no return codes for the REBOOT utility. REBOOT command-line examples Command-line argument Description REBOOT A: This command reboots the system to the A: drive. REBOOT PXE This command reboots the system by itself to the PXE NIC. Using SETBOOTORDER SETBOOTORDER enables you to set the order in which devices are booted, including diskette drives, CDROM drives, hard drives, PXE, and USB devices. This utility sets the boot order only for devices that exist for a server.
SETBOOTORDER command-line examples Command-line argument Description SETBOOTORDER cdrom hd pxe usb floppy This command sets the system devices to boot in this order: CD-ROM drive, hard drive, PXE, USB, diskette drive. SETBOOTORDER default This command sets the boot order to the factory default. Using STATEMGR The STATEMGR utility enables the user to keep track of the execution state during system reboots. This utility saves persistent state information across reboots of the system.
STATEMGR command-line examples Command-line argument Description STATEMGR /W PHASE 3 STATEMGR writes the state value 3 to the PHASE environment variable. STATEMGR /R PHASE STATEMGR reads the PHASE environment variable and returns its value as a return code. If the environment variable has been reset or no value has been stored, the return code is 0. Using RBSURESET RBSURESET resets the BIOS settings for a server by reapplying the default factory setting at the next reboot.
• HP Smart Array controller information User process decisions can be made based on data that is in the file created by this utility. NOTE: Information may not be as detailed on HP ProLiant 100 series servers. HPDISCOVERY command-line syntax hpdiscovery [-f filename] [/?] HPDISCOVERY command-line arguments Command-line argument Description -f filename This argument specifies the location and name of the Hardware Discovery data file. -? This argument displays help information.
Command-line argument Description [path]allboards.xml This argument specifies the allboards.xml PCI device list file, which is used to convert PCI IDs found in hardware discovery into device names, such as "Smart Array 5i Controller." This argument specifies the query expression. See "Expression operators and terms (on page 28)." IFHW return codes Value Meaning 0 The expression is true. 1 The expression is false. 2 The expression was not understood or an argument was invalid.
Operator or term Result A literal number, used for comparison Expression examples Expression input Result "PCI:Smart Array 5i" True if the Smart Array 5i Controller is found in the system HWQ:TotalRAM gte 512 True if the amount of RAM in the hardware discovery file is at least 512 HWQ:ROMDate neq "11/12/2004" True if the ROM date in the hardware discovery file is not 11/12/2004 HWQ:SystemName eq "ProLiant DL380 G2" True if the system name in the hardware discovery file exactly matches
Command-line argument Description case-sensitive. ... You can specify multiple variable= arguments. HWQUERY return codes Value Meaning 0 The command was completed successfully n N arguments were ignored because they were not in the variable= format. HWQUERY command-line examples Command-line argument Description hwquery hpdiscovery.xml allboards.xml MY_SYS_RAM=TotalRAM For a hpdiscovery.
The CONREP utility reads the state of the system environment settings to determine the server configuration and writes the results to a file that you can edit. The CONREP utility uses the data in the generated file to configure the target server hardware. The CONREP utility uses an XML definition file to determine what information to retrieve from and restore to the server. You can modify this file to update new features or restrict features when capturing configurations. The default conrep.
Value Meaning 5 Reserved. 6 The XML hardware definition file (conrep.xml) is corrupt or not appropriate for the current platform. CONREP return codes for HP ProLiant 100 series servers Value Meaning 0 The command was completed successfully. 1 TheXML definition file (for example, conrep.xml) is corrupt. 2 The data file (conrep.xml) is corrupt. CONREP screen output A typical screen output generated by CONREP is similar to the following: conrep 3.00 3.
ROM Date : 07/28/2009 ROM Family : O33 Processor Manufacturer : Intel XML System Configuration : conrep_SL160zg6_20090728.xml Hardware Configuration : sl160zconrep.dat Saving configuration data to sl160zconrep.dat. CONREP Return code: 0 NOTE: The file names after the -x and -f options must be specified, otherwise, the default file names Conrep.xml and Conrep.dat are used, respectively. NOTE: A platform specific XML file needs to be used for HP ProLiant 100-series servers.
0e 11 40 80 00 00 08 01 0e 11 ff ff 00 00 78 c1 /Section> PAGE 35CONREP command file contents for HP ProLiant 300, 500, and 700 series servers A typical data file generated by the CONREP command is similar to the following: PAGE 36Using HPACUSCRIPTING Starting with version 8.28.13.0, ACU Scripting is now a standalone application that is distributed with the ACU CLI application. In ACU versions prior to 8.28.13.0, the scripting executable was provided with the ACU GUI component. Users familiar with the previous versions of ACU Scripting must now install the ACU CLI application to obtain the scripting executable. The new ACU scripting executable (hpacuscripting) replaces the former executable (cpqacuxe) in all scripts.
The -e switch information is used only if ACU must generate an error file. By default, ACU names the error file ERROR.ini and places it in the ACU working directory. Creating an ACU script file To create a valid ACU script file, use one of the following methods: • Modify the sample custom input script (on page 37). • Create a Capture file for capturing a configuration (on page 36).
WriteCache = 0|10|20|25|30|40|50|60|70|75|80|90|100 RebuildPriority = Low|Medium|High ExpandPriority = Low|Medium|High SurfaceScanDelay = N SSPState = Enable|Disable PreferredPathMode = Auto|Manual ; COMMENT: the following five entries are used to optimize the controller performance for video MNPDelay = 0|1|2|...|60 ; units are minutes, zero indicates disabled IRPEnable = Yes|No DPOEnable = Yes|No ElevatorSortEnable = Yes|No QueueDepth = 2|4|8|16|32|Auto Array = A|B|C|D|E|F|G|...
Script file options Options in ACU script files are divided into the following categories: • Control category (on page 40) • Controller category (on page 40) • Array category (on page 43) • Logical Drive category (on page 45) • HBA category (on page 47) Each category has several scripting options, but you do not always need to assign values to every option.
Category Options Description Logical Drive ArrayAccelerator These options describe a logical drive that is to be configured on an array that was previously specified in the script. (If no array was previously specified, ACU stops processing the script and creates an error file.) Although the LogicalDrive option must begin this section of the script, you can script the other options in this category in any order.
• ElevatorSortEnable ("Video performance options" on page 43) • ExpandPriority ("RebuildPriority, ExpandPriority" on page 43) • IRPEnable ("Video performance options" on page 43) • LicenseKey ("LicenseKey, DeleteLicenseKey" on page 42) • MNPDelay ("Video performance options" on page 43) • PreferredPathMode (on page 42) • QueueDepth ("Video performance options" on page 43) • ReadCache ("ReadCache, WriteCache" on page 42) • RebuildPriority ("RebuildPriority, ExpandPriority" on page 43) • SS
LicenseKey, DeleteLicenseKey These options enable you to enter a 25-character license key to activate or uninstall some controller features. Hyphens can be entered, but are not required. PreferredPathMode The setting that you select for this option determines how the preferred I/O path to a particular logical drive is set for a redundant array controller that is in an active/active configuration.
RebuildPriority, ExpandPriority This option has three possible values: Low, Medium, and High. SSPState There are two settings for this option: Enable and Disable. If you do not specify a value for the SSP State, the existing setting remains unchanged. NOTE: The SSPState option is valid only for controllers that enable SSP on a controller basis, such as the MSA1000 or the Smart Array Cluster Storage controllers.
• In Reconfigure mode, ACU can either create a new array or reconfigure an existing array. In this case, the value that you specify can identify an existing array, or it can correspond to the next available array letter or pair of letters in the existing configuration. Drive You can use this option to add a drive to an existing array (to expand an array) or to build a new array.
Method mode Possible values Default value Auto Yes (indicating one spare) In Configure action mode: Yes (indicating one spare) No In Reconfigure action mode, ACU ignores any value entered for this option and keeps any spares that are already present in the configuration Logical Drive category The Logical Drive category has the following options: • ArrayAccelerator (on page 45) • LogicalDrive (on page 45) • LogicalDriveSSPState (on page 45) • ParityGroups (on page 46) • PreferredPath (on pa
ParityGroups When you create a RAID 50 or RAID 60 configuration, you must also set the number of parity groups. You can use any integer value greater than 1 for this setting, with the restriction that the total number of physical drives in the array must be exactly divisible by the number of parity groups.
In Reconfigure mode, the default setting is the existing size of the logical drive. If you enter a larger value, ACU extends the logical drive to the new size if there is unused drive capacity on the same array, as long as the operating system supports logical drive extension. You cannot reduce the size of the logical drive. CAUTION: Back up all data before extending a logical drive. SSPAdaptersWithAccess Enter values here to identify the SSP adapters that you want to have access to a logical drive.
ConnectionName This option is a user-defined string used as the connection name for the specified HBA. The string can consist of: • A maximum of 16 characters • Embedded space characters but cannot end with a space character • Any of the following characters: a–z, A–Z, 0–9, !, @, #, *, (, ), -, _, +, :, ., /, and [space] HBA_WW_ID This option specifies which HBA, based on its assigned WWN, is modified by the configuration changes. HostMode This option specifies the HostMode for a selected HBA.
Error code Error message Comment or clarification 1053 Cannot remove physical drives from existing array. This error message occurs if a script that is running in Reconfigure action mode lists fewer physical drives than already exist in the array. ACU interprets this script as a request to remove physical drives from an existing array, but satisfying this request causes data loss, so ACU prevents the script from running. 1065-1066 Too many coinciding expansion, migration, or extension operations.
Error code Error message Comment or clarification 2825 Invalid array. The array ID is invalid. 2826 Array not specified. The script file has commands that require an array, but no array is specified. 2827 New array ID does not match the next available array ID. The scripted array ID is not the next ID in sequence, based on the IDs of the existing arrays. For example, only array A exists and the script file specifies creation of array C (omitting array B). 2828 New array ID already exists.
Error code Error message Comment or clarification 2843 Invalid size. The specified size is invalid or is not possible with the current configuration. 2844 Invalid stripe size. The specified stripe size is invalid, or not supported by the current RAID level, or not possible with the current configuration. 2845 Invalid sectors. The specified MaxBoot setting is invalid or is not possible with the current configuration. 2846 Cannot change logical drive sectors.
Error code Error message Comment or clarification 2867 Failure opening input file . — 2868 Failure opening error file . — 2869 command expected. The command is missing or in the wrong place in the script file. 2870 is not a supported command. — 2871 is not a Controller command. The command does not belong in the Controller section of the script file. 2872 is not an Array command.
HPLPCFG command-line syntax hplpcfg /s filename hplpcfg /l filename hplpcfg /v [HBA0] WWID=11223344 HostAdapterBiosEnable=1 SelectBootEnable=1 BootDeviceWWID=22334455 BootDeviceLUN[0]=1111 HPLPCFG command-line arguments Command-line argument Description hplpcfg /s filename This argument saves the HBA configuration to the filename. hplpcfg /l filename This argument loads the HBA configuration to the filename. hplpcfg /v This argument displays the tool version information.
HPLPCFG command-line examples hplpcfg /s hba.ini generates hba.ini with the following content: [HBA0] WWID=11111111 HostAdapterBiosEnable=1 SelectBootEnable=1 BootDeviceWWID= BootDeviceLUN[0]= You must edit hba.ini and add the following boot device information: [HBA0] WWID=11111111 HostAdapterBiosEnable=1 SelectBootEnable=1 BootDeviceWWID=22222222 BootDeviceLUN[0]=3 You must then invoke the tool to load the contents of hba.ini input to the HBA NVRAM: hplpcfg /l hba.ini.
Command-line argument Description BootDeviceLUN[0]=1111 Your input and default LUN HPQLAREP return codes Value Meaning 0 The command was completed successfully. 1 There was an invalid command line option. 2 There was a file open error. 3 There was an NVRAM checksum error. 4 There was an NVRAM data error. 5 There was no adapter found on this host. 6 There was an error retrieving the I/O address. 7 The WWID was invalid. 8 The LUN setting was invalid.
SelectBootEnable=1 BootDeviceWWID=22222222 BootDeviceLUN[0]=3 You must then invoke the tool to load the contents of hba.ini input to the HBA NVRAM: hpqlarep /l hba.ini. Using HPONCFG The HPONFCG utility only supports HP ProLiant 300/500/700 and Blade servers. HP offers support for the RILOE II, iLO, iLO 2, and iLO 3 features available on ProLiant servers with the HPONCFG utility.
Command-line argument Description -get_hostinfo This argument returns the host server name and serial number. -m This argument indicates to HPONCFG the minimum firmware level that must be present in the management device to execute the RIBCL script. If the minimum level is not met, HPONCFG returns an error without performing any additional actions. -mouse This argument causes HPONCFG to configure the server for optimized mouse handling.
PAGE 59 Setting a configuration A specific configuration can be sent to the iLO, iLO 2, iLO 3, or RILOE II by using the command format: HPONCFG /f add_user.xml /l log.
Command-line argument Description -s This argument captures the current status and outputs it to the console. -h The argument lists basic command line arguments and supported XML tags. -i "file.xml" This argument loads and runs the given XML configuration file. -o "file.xml" This argument loads and runs the given XML configuration file. LO100CFG return codes Value Meaning 0 All operations succeeded. 1 Operation was successful, but a minor error was found in the input XML or system settings.
Troubleshooting Troubleshooting table Issue Troubleshooting Data loss in Toolkit Improper use of the Toolkit utilities and modification of the CONREP data files can result in loss of critical data. Because of the potential data-loss risk, only experienced individuals should use the Toolkit utilities. Before using the Toolkit, all necessary precautions must be taken to ensure that mission-critical systems remain online if a failure occurs.
Technical support Reference documentation For issues or problems not addressed by this guide, refer to the following resources for more information: • The SmartStart Scripting Toolkit website (http://www.hp.com/servers/sstoolkit) • The Red Hat Linux website (http://www.redhat.com) HP SmartStart Scripting Toolkit email support Support for the SmartStart Scripting Toolkit (SSSTK) is available through email. Fill out the online form to submit your question.
Acronyms and abbreviations ACU Array Configuration Utility BIOS Basic Input/Output System CLI Command Line Interface CONREP Configuration Replication utility CPQACUXE Array Configuration Utility XE CPQLOCFG Lights-Out Configuration Utility DHCP Dynamic Host Configuration Protocol DOS disk operating system FAT file allocation table GUI graphical user interface HBA host bus adapter HPDISCOVERY HP Discovery Utility Acronyms and abbreviations 63
HPONCFG HP Lights-Out Online Configuration utility HWQUERY Hardware Query Utility I/O input/output IFHW IF Hardware Utility iLO Integrated Lights-Out iLO 2 Integrated Lights-Out 2 iLO 3 Integrated Lights-Out 3 IP Internet Protocol IPL initial program load IPMI Intelligent Platform Management Interface ISO International Organization for Standardization LO100CFG Lights-Out (100 series) Online Configuration utility LUN logical unit number MBR master boot record Acronyms and abbreviations 64
NFS network file system NIC network interface controller NVRAM non-volatile memory OS operating system PCI peripheral component interface PSP ProLiant Support Pack PXE Preboot Execution Environment RAID redundant array of inexpensive (or independent) disks RAM random access memory RBSU ROM-Based Setup Utility RHEL Red Hat Enterprise Linux RIBCL Remote Insight Board Command Language RILOE II Remote Insight Lights-Out Edition II ROM read-only memory Acronyms and abbreviations 65
SAS serial attached SCSI SATA serial ATA SCSI small computer system interface SLES SUSE Linux Enterprise Server SSP Selective Storage Presentation STATEMGR State Manager utility TFTP Trivial File Transfer Protocol USB universal serial bus VPD vital product data WOL Wake-on LAN WWID World Wide ID WWN World Wide Name WWPN worldwide port name XML extensible markup language Acronyms and abbreviations 66
Index A action mode, HPACUSCRIPTING 40 advanced topics 11 anaconda-ks.
error codes, IFHW 28 error codes, LO100CFG 60 error codes, RBSURESET 26 error codes, REBOOT 24 error codes, SETBOOTORDER 24 error codes, STATEMGR 25 examples 24, 25, 26, 27, 28, 30, 59 expand priority, HPACUSCRIPTING 43 expressions 28, 29 installing operating system 10, 14 introduction 6 ISO image 9 L file contents 57, 60 license key 42 Lights-Out 100 Configuration (LO100CFG) 59 Linux Toolkit overview 6 LO100CFG (Lights-Out 100 Configuration) 59 logical drive capacity extension 46 logical drive category
R RAID-level migration, HPACUSCRIPTING 46 RBSURESET utility 26 read-write ratio, HPACUSCRIPTING 42 REBOOT (Reboot utility) 23 Reboot utility (REBOOT) 23 rebuild priority, HPACUSCRIPTING 43 redundant controller, modifying I/O path of 42, 46 references 62 requirements, minimum 6 return codes, CONREP 31 return codes, HPDISCOVERY 27 return codes, HPLPCFG 53 return codes, HPONCFG 57 return codes, HPQLAREP 55 return codes, HWQUERY 30 return codes, IFHW 28 return codes, LO100CFG 60 return codes, RBSURESET 26 retur