How to Trigger One-Time PXE Boot on HP Proliant Servers via Linux Command Line


7 views

When managing test servers that require frequent reimaging, the manual process of accessing iLO interfaces and hitting F12 for PXE boot becomes time-consuming. For environments where CentOS hosts are reprovisioned dozens of times daily, this manual intervention creates significant workflow bottlenecks.

While Dell servers offer OpenIPMI capabilities for remote boot control, HP Proliant servers provide similar functionality through their hponcfg tool and IPMI interfaces. Here's how to automate one-time PXE boot:

# Install required packages
yum install OpenIPMI ipmitool -y

# Configure IPMI (replace with your iLO credentials)
ipmitool -I lanplus -H  -U  -P  chassis bootdev pxe

# Set one-time boot flag
ipmitool -I lanplus -H  -U  -P  chassis power reset

For HP-specific implementation:

# Create XML configuration file
cat > pxe_boot.xml <
  
    
      
    
  

EOF

# Apply configuration
hponcfg -f pxe_boot.xml

For seamless integration with your existing SystemImager setup, create a wrapper script:

#!/bin/bash
# pxe_reboot.sh - Automated reprovisioning script

SERVER_IP="192.168.1.100"
ILO_CREDS="-U admin -P password"

# Set next boot to PXE
ipmitool -I lanplus -H $SERVER_IP $ILO_CREDS chassis bootdev pxe

# Reboot server
ipmitool -I lanplus -H $SERVER_IP $ILO_CREDS chassis power reset

# Wait for provisioning completion
while ! ping -c 1 $SERVER_IP &>/dev/null; do
  sleep 10
done

If encountering problems:

  • Verify IPMI-over-LAN is enabled in iLO settings
  • Check firewall rules between your management station and iLO interfaces
  • Test basic IPMI functionality with ipmitool chassis status
  • For SSL errors, try adding -C 3 to downgrade cipher requirements

When managing test servers that require frequent reimaging, the manual process of triggering PXE boot through iLO interfaces becomes a significant productivity bottleneck. Each cycle involving Java-based console access and manual F12 triggering adds unnecessary overhead. Here's how to automate this on HP Proliant hardware.

While Dell provides well-documented ipmitool commands for one-time PXE boot configuration, HP's implementation requires some additional parameters. The key difference lies in the chassis boot flags and network device selection.

# Dell's typical command (for reference)
ipmitool chassis bootdev pxe options=persistent,efiboot

HP's Integrated Lights-Out (iLO) systems support IPMI 2.0 specifications, but require specific parameter passing:

# Install required tools on CentOS/RHEL
yum install -y OpenIPMI ipmitool

# Configure one-time PXE boot (non-persistent)
ipmitool -I lanplus -H  -U  -P  chassis bootdev pxe options=efiboot,persistent

# Alternative for legacy BIOS mode
ipmitool -I lanplus -H  -U  -P  chassis bootdev pxe options=persistent

Here's a complete bash script that handles the entire cycle for CentOS 5.3 environments:

#!/bin/bash
ILO_IP="192.168.1.100"
ILO_USER="admin"
ILO_PASS="password"
PXE_SERVER="192.168.1.50"

# Set one-time PXE boot
ipmitool -I lanplus -H $ILO_IP -U $ILO_USER -P $ILO_PASS \
         chassis bootdev pxe options=efiboot,persistent

# Initiate reboot
ipmitool -I lanplus -H $ILO_IP -U $ILO_USER -P $ILO_PASS \
         power reset

# Wait for PXE boot to complete
while ! ping -c 1 $PXE_SERVER &>/dev/null; do
   sleep 5
done

Authentication failures: Ensure iLO's IPMI settings allow LAN access and the user has proper privileges.

Boot mode mismatch: Verify the server's current boot mode (BIOS vs UEFI) matches your PXE environment.

Network restrictions: Some environments require VLAN tagging for PXE traffic - check switch configurations.

For complete automation, extend your SystemImager workflow with pre-imaging IPMI commands:

# In your autoinstallscript
if [[ $HOSTNAME =~ "test-server" ]]; then
    ipmitool -I lanplus -H $(get_ilo_ip $HOSTNAME) \
             -U $ILO_USER -P $ILO_PASS \
             chassis bootdev pxe options=persistent
fi