HP SmartStart Scripting Toolkit Linux Edition User Guide Abstract The Toolkit is designed for IT experts with experience in scripting operating system installations and configuring HP ProLiant server hardware.
© Copyright 2005, 2011 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 ............................................................................................................................... 6 Deployment using the SmartStart Scripting Toolkit ..
RBSURESET return codes ................................................................................................................ 26 Using BOOTEXTRACT .............................................................................................................................. 26 BOOTEXTRACT command-line syntax ............................................................................................... 26 BOOTEXTRACT command-line arguments ...........................................................
Using LO100CFG ................................................................................................................................... 58 LO100CFG command-line syntax .................................................................................................... 58 LO100CFG command-line arguments............................................................................................... 58 LO100CFG return codes .............................................................................
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.
-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.
# description: The tftp server serves files using the \ # 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.
[You must customize the file by inserting the appropriate DHCP directives, IP ranges, subnet masks, and so on here.] 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.
System hardware configuration The sample install_rhel4.
cp -a ${NFS_MAIN}/utilities/* ${TOOLKIT} cp -a ${NFS_MAIN}/data_files ${TOOLKIT} echo "" echo "Loading storage drivers for hardware" ./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.
fi ## ADD EXTRA BL45p G1 Configuration Steps HERE ;; "ProLiant ML310 G2" ) ./conrep -l -fdata_files/ml310g2_conrep.dat ./ifhw ${HPDISCOVERY_FILE} allboards.
ln -s ${BOOTDEVNODE} /dev/sssd echo "### Linux Unattended Install using Kickstart ###" echo "clearing mbr and a few more sectors" 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.
Microsoft Windows install_win.sh sample script The install_win.sh sample script performs many of the same hardware configuration tasks described in "Performing an unattended operating system installation (on page 14)." Additionally, the sample install_win.
keyboard "us" zerombr yes clearpart --Linux part /boot --size 30 part swap --size 128 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-l
ypbind ypserv zlib zlib-devel %post 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, CD-ROM 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.
Command-line argument ntldr.bss ntldr2.bss Description Full path to the output file to save the first part of the boot sector. Full path to the output file to save the second part of the boot sector. BOOTEXTRACT return codes Value Meaning 0 The command was completed successfully. Any non-0 return code is an error. For details, see the error message. n Using HPDISCOVERY HPDISCOVERY provides an inventory of the server being configured and must run on each deployed server.
HPDISCOVERY command-line examples Command-line argument Description hpdiscovery -f /toolkit/hpdiscovery.xml This command generates the file hpdiscovery.xml in the /toolkit directory. Using IFHW IFHW is used from a script file, in conjunction with other utilities, to control the deployment. The IFHW utility enables you to make intelligent queries against the hardware discovery file.
Expression operators and terms Operator or term Result and True if both operands are true or True if either operand is true gt True if the first operand is greater than the second lt True if the first operand is less than the second gte True if the first operand is greater than or equal to the second lte True if the first operand is less than or equal to the second eq True if the two operands are equal neq True if the two operands are not equal not True if the operand is false PCI:
HWQUERY command-line syntax hwquery [path]hpdiscoveryfilename [path]allboards.xml variable= ... HWQUERY command-line arguments Command-line argument Description [path]hpdiscoveryfilename This argument specifies the hardware discovery file used to run the query. [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.
Using CONREP The CONREP utility generates a system configuration XML file used to duplicate the hardware configuration of one ProLiant server onto another. The CONREP utility uses the hardware configuration XML file to identify and configure the system, which defaults to conrep.xml. You can change the default using the -x option. The actual system configuration file is captured as an XML data file. The default name is conrep.dat.
CONREP return codes Value Meaning 0 The command was completed successfully. 2 The system configuration data file (conrep.dat) is corrupt or not found. 1 The hardware definition data file (conrep.xml) is corrupt or not found. 4 The system administrator password is set. The settings cannot be changed unless this password is cleared. 5 The XML hardware definition file (conrep.xml) is corrupt or not appropriate for the current platform.
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.
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).
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|...Z|a|b|c|d|e|f OnlineSpare = None | N | Port:ID,Port:ID... | Box:Bay,Box:Bay... | Port:Box:Bay,Port:Box:Bay,...
• Control category (on page 40) • Controller category (on page 40) • Array category (on page 43) • Logical Drive category (on page 44) • HBA category (on page 47) Each category has several scripting options, but you do not always need to assign values to every option. ACU can use default values in some instances, while in other instances, a listed option might not be relevant for a particular configuration or scripting mode.
Category Options Description HBA ConnectionName HBA_WW_ID HostMode These options specify an HBA that is to be configured. Control category The Control category has the following options: • Action mode (on page 40) • Method mode (on page 40) Action mode You must specify an Action mode: • In Configure mode, you can create new arrays, but you cannot modify existing arrays. The controller must be connected to unassigned physical drives for this mode to be available.
• RebuildPriority ("RebuildPriority, ExpandPriority" on page 42) • SSPState (on page 42) • SurfaceScanDelay (on page 43) • WriteCache ("ReadCache, WriteCache" on page 42) Controller You must enter a value for this option because it identifies the controller that you want to configure: • All—Configure all detected controllers in the system. • Slot [N][:M]—Configure the internal controller in slot number N, or the external controller at port M in slot N.
• Auto is the default setting for new configurations. In this case, the storage system automatically selects the I/O path from the redundant controller to the logical drive and dynamically load balances all paths. • Manual enables you to assign the logical drive to a specific redundant controller. If you select this setting, use the PreferredPath (on page 45) command to specify the path.
If you enable SSP, you must also specify an adapter for one or more logical drives by using the SSPAdaptersWithAccess option ("SSPAdaptersWithAccess" on page 46). Otherwise, SSP is automatically disabled. SurfaceScanDelay Enter a number between 1 and 30 to specify the duration of the surface scan delay in seconds.
If you use Auto method mode, ACU configures all the available drives on the controller into one array. If the drives are of different capacities, ACU determines the capacity of the smallest drive and uses the same amount of space on all other available drives. If you use Custom method mode, choose one of the following methods to specify the drives to be used in the array. (Different arrays on the same controller can use different methods.
• RAID (on page 46) • Sectors (on page 46) • Size (on page 46) • SSPAdaptersWithAccess (on page 46) • StripeSize (on page 46) ArrayAccelerator This option specifies whether the array accelerator is enabled or disabled for the specified logical drive. The default value is Enabled. LogicalDrive The value that you enter for this option specifies the ID number of the logical drive that is to be created or modified.
RAID The value that you enter for this option specifies the RAID level of the logical drive. • When the Action mode is Configure, and the Method mode is Auto, ACU automatically selects the highest RAID level that the controller and drive configuration can support except RAID 50 or RAID 60. To specify RAID 50 or 60 for a controller that supports either of these RAID levels, use the Custom setting. In this case, you must also specify the number of parity groups ("ParityGroups" on page 45).
• For RAID 5 arrays, the maximum stripe size in most cases is 256 KB, but old controller models are often limited to 64 KB. • For RAID 6 arrays, the maximum stripe size is either 64 KB or 256 KB, depending on the controller. The default stripe size value depends on the action mode. • • In Configure action mode, the default value is determined by the RAID level that you specified earlier in the script.
• Linux • Solaris • Netware • HP-UX ACU scripting error messages Error code Error message Comment or clarification 1 General error. The ACU process cannot be initiated. You might see this error message if you are not authenticated to use ACU or if ACU is already running. 268 Error saving controller. ACU cannot save one or more controller configurations. 278-282 Controller is locked by another machine or user. Error communicating with controller. Internal error.
Error code Error message Comment or clarification 2820 Could not detect controller . No controllers detected. — 2822 Invalid read cache/write cache ratio. The specified cache ratio is not supported by either the controller or the current controller configuration. 2823 Invalid rebuild priority. — 2824 Invalid expand priority. This error message appears if the expand priority value specified in the script is not supported.
Error code Error message Comment or clarification 2839 Cannot migrate logical drive RAID. The controller does not support RAID migration, or migration is not possible with the current controller configuration. 2840 Cannot migrate logical drive stripe size. The controller does not support stripe size migration, or migration is not possible with the current controller configuration. 2841 Cannot extend logical drive.
Error code Error message Comment or clarification 2865 Invalid preferred path. The specified preferred path is not a valid chassis slot for an available active controller, or the controller is not available. 2866 Failure opening capture file . Failure opening input file . Failure opening error file . command expected. — is not a supported command. is not a Controller command. — 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 /v This argument displays the tool version information.
[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. Using HPQLAREP You must edit the text file to insert the WWID of the boot volume and the LUN number that they will boot from.
HPQLAREP return codes Value Meaning 0 The command was completed successfully. 2 There was a file open error. 1 There was an invalid command line option. 3 There was an NVRAM checksum error. 4 5 6 7 8 9 10 11 12 13 There was an NVRAM data error. There was no adapter found on this host. There was an error retrieving the I/O address. The WWID was invalid. The LUN setting was invalid. The EFI Enable Selective LUN setting was invalid. The BIOS Enable setting was invalid.
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. HPONCFG is an online configuration tool used to set up and reconfigure RILOE II, iLO, iLO 2, and iLO3 without requiring a reboot of the server operating system. The utility runs in a command-line mode and must be executed from an operating system command-line.
NOTE: For a complete list of all command-line parameters, execute the /? utility. HPONCFG return codes Value Meaning 0 The script was sent successfully to the device. 1 2 The Management processor is not present, or the driver is not running. 255 The script is unable to create an output file. 3 The script could not be sent to the device. There is an error in xml. The iLO flash is still in progress. If the script itself fails, errors are reported in the log file created by HPONCFG.
PAGE 58 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.txt In this example, the input file has contents: PAGE 59LO100CFG return codes Value Meaning 0 All operations succeeded. 10 A required command-line parameter is missing. See console output for details. 14 File error, the specified file is empty or not found. 17 An invalid command-line parameter was passed to the utility. 50 The IPMI driver may not be loaded or installed properly. 102 Field in the XML file has invalid values. Valid fields still applied. 12 An unknown command-line parameter was passed to the utility.
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 62
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 63
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 64
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 65
Index A action mode, HPACUSCRIPTING 40 advanced topics 11 anaconda-ks.
error codes, HPONCFG 56 error codes, HWQUERY 30 error codes, IFHW 28 error codes, LO100CFG 59 error codes, RBSURESET 26 error codes, REBOOT 24 error codes, SETBOOTORDER 24 error codes, STATEMGR 25 examples 24, 25, 26, 28, 30, 58 expand priority, HPACUSCRIPTING 42 expressions 29 Input script, using 36 install_win.
physical drives, adding, HPACUSCRIPTING 43 PXE boot, illustration 11 R RAID-level migration, HPACUSCRIPTING 46 RBSURESET utility 26 read-write ratio, HPACUSCRIPTING 41 REBOOT (Reboot utility) 23 Reboot utility (REBOOT) 23 rebuild priority, HPACUSCRIPTING 42 redundant controller, modifying I/O path of 41, 45 references 61 requirements, minimum 6 return codes 24, 25, 26, 27, 28, 30, 32, 56 return codes, BOOTEXTRACT 27 return codes, CONREP 32 return codes, HPDISCOVERY 27 return codes, HPLPCFG 52 return codes,