This document provides information about the Scripting Toolkit for Linux utilities and how best to use the Scripting Toolkit for
Linux to configure HP ProLiant servers and BladeSystem infrastructure in a Linux environment. This document is intended for IT
experts with experience in scripting operating system installations and configuring HP ProLiant servers and BladeSystem
infrastructure.
HP Part Number: 415597-407
Published: October 2012
Edition: 16
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, and Windows Server are U.S. registered trademarks of Microsoft Corporation. Intel is a trademark of Intel Corporation in the
U.S. and other countries.
The Scripting Toolkit is a server deployment product for IT experts that delivers an unattended
automated installation for high-volume 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.
CAUTION:Improper use of the Scripting Toolkit utilities can result in loss of critical data. Because
of the potential data-loss risk, only individuals experienced in scripting operating system installations
and configuring HP ProLiant server hardware 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.
Minimum requirements
Before beginning the deployment process, be sure to have the following items available:
•Scripting Toolkit for Linux
•HP Scripting Toolkit for Linux User Guide
•A Linux workstation (any Linux distribution)
Scripting Toolkit7
2 Deployment using the Scripting Toolkit
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:HP ProLiant 100 series servers previous to Gen8 do not support all Scripting Toolkit
commands. See the following descriptions for utility usage. Commands that are supported might
not work as expected. For a better understanding, read each section of the documentation carefully.
You can perform server deployments in many different ways using the Scripting Toolkit, but every
deployment must include the following basic steps:
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.Perform the operating system installation.
HP also recommends installing the latest version of the HP SPP. To obtain the most current SPP, see
the SPP website at http://www.hp.com/go/spp.
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 “Booting and OS installation”
(page 12).
8Deployment using the Scripting Toolkit
Creating a network share
To create a network share:
1.Download the appropriate Scripting Toolkit package from the Scripting Toolkit website at
http://www.hp.com/go/ProLiantSTK.
2.Extract the 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.
Capturing a reference configuration from the source server
Procedure 1
1.At the source server, boot the media (CD/DVD, USB drive key, or PXE) 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
Sample deployment procedure9
5.To add a new device driver name:
modprobe —f hpsa
6.Load the channel interface driver for iLO:
insmod /opt/hp/hp-ilo/bin/`uname -r`/hp_ilo.ko
7.Mount the network share:
mkdir /mnt/toolkit_share
8.Capture a hardware discovery report using the HPDISCOVERY utility:
cd /mnt/toolkit_share/utilities
9.Capture the system BIOS configuration using the CONREP utility:
cd /mnt/toolkit_share/utilities
./conrep -s -f/mnt/toolkit_share/data_files/conrep.dat
10. Capture the Smart Array configuration using the ACU utility:
cd /mnt/toolkit_share/utilities/hpacuscripting
./hpacuscripting -c /mnt/toolkit_share/data_files/hpacuscripting.dat
11. Capture the iLO configuration using the HPONCFG utility:
cd /mnt/toolkit_share/utilities
./hponcfg -w /mnt/toolkit_share/data_files/hponcfg.dat
12. Edit the iLO configuration report to create an iLO configuration script:
vi /mnt/toolkit_share/data_files/hponcfg.dat
Unmount the network share
umount /mnt/toolkit_share
13. Reboot the source server, and then eject the Toolkit CD.
Creating an ISO image to be written to media
The mkisofs command is used to create an ISO image. The following table describes the arguments
used with this command.
DescriptionArgument
-o linuxbootCD.iso
-b isolinux/isolinux.bin
-V LinuxBootCD
./linuxbootCD
To create the ISO image, execute the following command at the shell prompt:
8.Apply the Smart Array configuration using the ACU utility:
cd /mnt/toolkit_share/utilities/hpacuscripting
9.Apply the iLO configuration using the HPONCFG utility:
cd /mnt/toolkit_share/utilities
10. Unmount the network share:
umount /mnt/toolkit_share
11. Insert the operating system CD.
12. Reboot the server to run the operating system installation.
Installing the operating system
For information on performing an unattended operating system installation, see “Booting and OS
installation” (page 12). For additional information, see the following resources:
•Operating system documentation
•Kickstart or AutoYAST documentation
Sample deployment procedure11
3 Booting and OS installation
SYSLINUX
SYSLINUX is a free third-party bootloader available on the SYSLINUX web page at http://
syslinux.zytor.com/index.php.
SYSLINUX is a suite of programs that perform various boot functions. The Scripting Toolkit uses the
following bootloader programs:
•isolinux.bin—Boot from ISO media.
•pxelinux.0—Boot using PXE protocol.
•ldlinux.sys—Boot from a USB drive key.
The bootloaders each require a configuration file to run:
•isolinux.cfg—Use when booting from ISO media.
•default—Use when booting using PXE.
•syslinux.cfg—Use when booting from a USB drive key.
In the boot files (isolinux.cfg, default, and syslinux.cfg), the following options are
supported in the append statements.
DescriptionOption
sstk_mount=<device>
sstk_mount_type=<mount type>
sstk_mount_options=<mount options>
sstk_script=<script filename>
network=1
The bootstrap script included with the Toolkit performs the following commands:
mount -t $sstk_mount_type $sstk_mount /mnt/main -o $sstk_mount_options
exec /mnt/main/$sstk_script
For more information about SYSLINUX usage, see the SYSLINUX web page at http://
syslinux.zytor.com/index.php
Booting using PXE
A basic understanding of DHCP, PXE, and TFTP is required to perform the procedure described in
this section.
Examples in this section might not be specific to your operating system environment. For more
information about your particular environment, see the Linux system administrator's guide.
The following figure illustrates a simplified Scripting Toolkit PXE boot.
This command specifies the device node or name to mount;
for example, /dev/hdc or 10.0.0.1:/nfs_bootstrap
This command specifies the file system type of the device;
for example, nfs, vfat, or iso9660
This command specifies the options for mounting the device;
for example, ro, or ro,nolock for NFS
This command specifies the administrator-created script
that executes to continue the process. Typically, the script
uses Toolkit tools to configure and update the system, and
then begins an operating system installation.
This command causes the bootstrap script to load network
drivers and use DHCP to acquire a network address.
12Booting and OS installation
Setting up a PXE boot environment requires the following general steps:
1.Set up a DHCP server with the appropriate options.
2.Set up a TFTP server with the appropriate options.
3.Populate the TFTP directory share with the Scripting Toolkit boot components.
These steps assume that a Linux workstation is used as the DHCP/TFTP server. You might need to
download additional components and adapt the following instructions to suit your environment.
Setting up a TFTP server
Most Linux installations include a TFTP server and an automated method of launching the server
upon receiving a TFTP request. The parent process for detecting a TFTP request and launching the
TFTP server is called xinetd. However, you might have to enable the TFTP service. The TFTP file is
located in the /etc/xinetd.d/ directory. The following is a sample TFTP file:
# default: off
# 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
In this example, disabled is the default setting, and /tftpboot is the root directory for all client
access.
To enable the TFTP service on your server, edit the disable line to read:
disable = no
Populating the TFTP directory share
Use the /tftpboot directory from the “Setting up a TFTP server” (page 13) section as the directory
where TFTP clients get their files. To populate the TFTP directory share:
1.Create a /tftpboot directory, if needed.
2.Copy the necessary boot files to the /tftpboot directory:
•pxelinux.0 (the SYSLINUX binary used for PXE boot)
•initrd.img (the Linux file system)
•vmlinuz (the Linux kernel)
3.Create a PXELINUX configuration file subdirectory called /tftpboot/pxelinux.cfg.
4.Copy the default file (the boot configuration used by pxelinux.0) into the /tftpboot/pxelinux.cfg/ directory.
The tftpboot directory should now contain the following items:
/tftpboot/pxelinux.0
/tftpboot/initrd.img
/tftpboot/vmlinuz
/tftpboot/pxelinux.cfg/default
Setting up a DHCP server
To set up a DHCP server, create and edit a dhcpd.conf file in the /etc directory of your server.
The following is a sample dhcpd.conf file:
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
14Booting and OS installation
Booting from a USB drive key
Some applications require the use of a writable medium. While booting from CD is not suitable
for this purpose, a USB drive key provides the ideal medium as a writable medium.
NOTE:Booting from a USB drive key is supported only on certain HP ProLiant servers. For more
information, see the HP SPP website at http://www.hp.com/go/spp.
To set up a USB drive key to boot the Scripting Toolkit environment:
1.Download ss_toolkit.linux.tar.gz@9.xx_pubsw-linux_en from http://
www.hp.com.
Extract the file to a directory of your choice. (The following example uses /Toolkit).
2.Make a directory, extract the files, and then change the directory to the extracted toolkit
directory.
mkdir -p /Toolkit
tar xfz ss-scripting-toolkit-linux-9.xx.tar.gz -C /Toolkit
cd /Toolkit/ss-scripting-toolkit-linux-9.xx
3.Enter the following command on the BASH command-line prompt:
./mkusbkey.sh /dev/XXX
where XXX is the device node of your USB drive key.
If you do not know the device node associated with your USB drive key, run the fdisk –l
command to view the devices available to the operating system.
If the script creates the key successfully, the following message appears:
USB Key created successfully on device /dev/XXX
Performing an unattended operating system installation
Sample scripts are provided with the Scripting Toolkit to simplify the installation process. These
scripts are used for the following:
•System hardware configuration
•Operating system preinstallation configuration
However, these scripts must be modified for your particular environment.
System hardware configuration
The sample install_rhel4.sh script performs many hardware configuration tasks, including:
•Copying all Scripting Toolkit utilities from the network share to the target server
•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)
•Running any other configuration utilities
•Running hardware discovery to determine the boot controller
•Obtaining the device node of the boot controller (this information is required for the disk-carving
portion of the operating system setup)
•Running the operating system-specific setup script
Booting from a USB drive key15
The scripting for these steps must be adapted to your server deployment process. In particular, be
sure to change the IP address and path of the NFS server to match your environment. You might
also need to make other modifications, such as adding extra configuration steps (for instance,
running HPONCFG to configure iLO) or additional servers.
The sample install_rhel4.sh script is similar to the following:
#!/bin/bash
## this script's methods work for RHEL 5
## SAMPLE. Change the NFS mount points to match your environment
export NFS_TOOLKIT_DIR=10.0.0.1:/TOOLKIT
## Internal Variables, do not modify
export TOOLKIT=/TOOLKIT
export NFS_MAIN=/mnt/nfs
export HPDISCOVERY_FILE=/TOOLKIT/hpdiscovery.xml
export SERVERNAME=
export BOOTDEVNODE=
clear
echo "*** Performing RHEL4 installation ***"
echo "Mounting NFS share"
mkdir ${NFS_MAIN}
mount -t nfs ${NFS_TOOLKIT_DIR} ${NFS_MAIN} -o ro,nolock
if [ $? != 0 ]; then
echo "Unable to mount NFS share, make sure you updated the $0 script
with the location of your NFS server."
exec /bin/bash
fi
echo "Copying over toolkit scripts and utilities from NFS share"
cd ${TOOLKIT}
cp -a ${NFS_MAIN}/scripts/* ${TOOLKIT}
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 )
if [ $? = 0 ] ; then
cd ${TOOLKIT}/hpacuscripting
./hpacuscripting -i ../data_files/dl380g4_sa6i_hpacuscripting.dat
fi
# Apply Array Configuration for Smart Array P600 Controller if present
if [ $? = 0 ] ; then
cd ${TOOLKIT}/hpacuscripting
./hpacuscripting -i ../data_files/bl45pg1_sa6i_hpacuscripting.dat
fi
## ADD EXTRA BL45p G1 Configuration Steps HERE
;;
"ProLiant ML310 G2" )
./conrep -l -fdata_files/ml310g2_conrep.dat
./ifhw ${HPDISCOVERY_FILE} allboards.xml "PCI:Intel(R) 6300ESB Ultra ATA Storage/SATA Controller"
if [ $? = 0 ] ; then
echo "Plain SATA found"
# Plain SATA, set BOOTDEVNODE manually since hardware discovery won't find IDE devices
export BOOTDEVNODE=/dev/hda
fi
## ADD EXTRA ProLiant ML310 G2 Configuration Steps HERE
;;
## ADD MORE SERVERS HERE
ProLiant* )
echo "No configuration process defined for this ProLiant server"
echo "Update $0 with steps for this ProLiant server"
exec /bin/bash
;;
* )
echo "Unrecognized Server"
exec /bin/bash
;;
esac
## CONTINUE COMMON INSTALL PROCESS
cd ${TOOLKIT}
echo "Pausing to allow drivers to catch up"
sleep 5
Performing an unattended operating system installation17
echo ""
echo "Rerun hardware discovery to find boot device"
./hpdiscovery -f ${HPDISCOVERY_FILE}
## use hwquery to fetch the boot dev node from hardware discovery file.
if [ -z ${BOOTDEVNODE} ]; then
export `./hwquery ${HPDISCOVERY_FILE} allboards.xml BOOTDEVNODE=DevNode`
fi
echo "Boot Device=${BOOTDEVNODE}"
if [ -z ${BOOTDEVNODE} ]; then
echo "MISSING boot device dev node. Check that the drivers are loaded."
exec /bin/bash
fi
ls -al ${BOOTDEVNODE}*
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.mbr of=/dev/sssd bs=512 count=1
echo "create new 256M FAT16 partition using sfdisk"
echo "0,256,6,*" | sfdisk -uM -D /dev/sssd
echo "forcing kernel to re-read partition table"
sfdisk --re-read /dev/sssd
sleep 5
## make symlink for first partition, usually sda1 or c0d0p1
if test -e ${BOOTDEVNODE}1 ; then
ln -s ${BOOTDEVNODE}1 /dev/sssd1
elif test -e ${BOOTDEVNODE}p1 ; then
ln -s ${BOOTDEVNODE}p1 /dev/sssd1
else
echo "Partition 1 missing, check that partition creation succeeded"
exec /bin/bash
fi
ls -al /dev/sssd1
cd ${NFS_MAIN}/linux_unattend/rhel4/
echo "landing diskboot.img from RHEL4-disc1/images/"
dd if=diskboot.img of=/dev/sssd1
## mount disk
echo "mounting to /mnt/dos"
mount -t vfat /dev/sssd1 /mnt/dos
##### MAKE SURE YOU MODIFY syslinux-rh.cfg FOR YOUR ENVIRONMENT #######
cp -a syslinux-rh.cfg /mnt/dos/syslinux.cfg
cd ${TOOLKIT}
## unmount disk
The install_win.sh sample script performs many of the same hardware configuration tasks
described in “Performing an unattended operating system installation” (page 15).
Additionally, the sample install_win.sh script for Microsoft Windows performs preinstallation
tasks, including:
•Creating a 2 GB 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.sh
sample script to install Windows Server 2008:
1.Create an unattend.txt file by following the instructions in the Microsoft documentation
at http://support.microsoft.com/kb/155197. A sample unattend.txt file is included in
the windows_unattend directory.
2.Copy the Windows source files to the installation source. In this sample script, the installation
source is a NFS file share.
3.Adapt the script to perform the correct hardware configuration, and change the NFS server
IP address and path to match your environment.
4.Update the syslinux configuration file (pxelinux.cfg, isolinux.cfg, or syslinux.cfg)
to reference the install_win.sh or install_w2k8.sh sample script.
Red Hat Linux anaconda-ks.cfg sample file
The operating system-dependent unattended installation file is not created by the Toolkit utilities.
The user must create the file separately. In the following example, bold lines indicate modifications
made to fully automate the installation of the operating system.
For a complete description of the options that can be modified in the anaconda-ks.cfg
unattended installation file to customize the installation of Red Hat Linux, see the operating system
documentation or the Red Hat Enterprise Linux Installation Guide at http://www.redhat.com/docs/
manuals/linux/.
lang en_US
REM *** Modify the network settings to reflect required
REM *** network settings.
network --bootproto dhcp
REM *** The IP address should be the address of the
REM *** Linux repository server. The /SHAREVOL/RedHatCD
REM *** must be shared as an NFS volume.
nfs --server 192.1.1.3 --dir /SHAREVOL/RedHatCD
device ethernet eepro100
Performing an unattended operating system installation19
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