Using the HP Service Pack for Proliant with a static IP address

While most people will have no issues with the normal HP SPP, some installations don’t support DHCP on their network. Without DHCP you lose the ability to use PXE and no PXE means you can’t use the SPP over the network. In those cases you may decide to simply mount the SPP iso directly via iLo and be done with it. But I chose a different route. i don’t want to keep 5Gb firmware ISOs on my laptop (or the other admin’s). I wanted to ensure that the workflow for my automations stays the same whether the user is on a network I control, or a network that I don’t which may not have DHCP.

So, first I need to to emulate PXE on the box. Enter iPXE (http://ipxe.org). iPXE is a gPXE replacement and works with current HP models. You can create a custom ISO using their rom-o-matic engine (https://rom-o-matic.eu). But you’ll need to tell it what to do using he iPXE scripting language… This script may help:


#!ipxe
set 210:string http:///tftpboot/
dhcp net1 || config net1
ifopen net1
chain ${210:string}/pxelinux.0 || shell

Basically tell the image where your pxe server is located. Then try to get an IP address on net1 using dhcp. If it works, move on. If not, then open an editor so the user can set the IP and other needed IP information. Then try loading pxelinux.0 from the PXE server over the network. If it doesn’t work drop us to a shell. You may need to fiddle with the interface is used and you can do that in the shell.

You can of course use TFTP instead of HTTP but I’ve found that TFTP performs horribly over WAN links so I tend to set up my TFTP root as an HTTP directory as well. Once you build the iso and load it up it should take you to your build server and you can use any of the images that are there.

The next step is to tell PXE to pass the IP information over to the HP SPP. Whether our system has used DHCP to get an IP or whether we hardcoded it using the config command, we need to tell the SPP to use a certain NIC and give it IP information. So in the PXE menu, add an


IPAPPEND 3

to the PXE label. IPAPPEND information can be found at http://www.syslinux.org/wiki/index.php/SYSLINUX. The number 3 says to pass the network interface to use as well as an IP string to HP. The interface is identified by its MAC address and the IP string looks like:


ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>

So, now we can boot up the machine and get to the SPP, but haven’t told the SPP how to use the IP string given to it. Turns out the SPP already knows how to use the interface info passed to it already. So all we need is a patch to parse the IP information.


diff -r old/etc/initrd.functions foo1/etc/initrd.functions
2a3,16
> get_ip_info() {
> # Got here by accident. Don't pass IP info to netconf script
> if [ -z "$ip" ]; then
> return
> fi
>
> # IP String from /proc/cmdline is as per syslinux.org:
> # ip=client-ip:boot-server-ip:gw-ip:netmask
> local addr=$(echo $ip | cut -d: -f1)
> local gate=$(echo $ip | cut -d: -f3)
> local mask=$(echo $ip | cut -d: -f4)
> echo "--ip $addr --netmask $mask --gateway $gate"
> }
>
454c468,473
< /sbin/netconfig.sh --dhcp $netparm
---
> if [ -z "$ip" ]; then
> netparm="--dhcp $netparm"
> else
> netparm="$(get_ip_info) $netparm"
> fi
> /sbin/netconfig.sh $netparm
521c540,545
< /sbin/netconfig.sh --dhcp $netparm
---
> if [ -z "$ip" ]; then
> netparm="--dhcp $netparm"
> else
> netparm="$(get_ip_info) $netparm"
> fi
> /sbin/netconfig.sh $netparm

Instructions for expanding and repacking the initrd can be found here: http://systemdilettante.blogspot.com/2013/04/playing-with-initrd.html

The initrd uses LZ compression so use the lzcat and lzma commands in the document.

OK, so now you can power up the HP server, mount a small 1 Mb ISO, and use your standard PXE workflow to update firmware.