When automating server provisioning, we often need precise control over which network interface handles PXE booting. The standard ipmitool chassis bootdev pxe
command lacks interface-specific targeting, which becomes critical in multi-homed systems or blade environments.
To achieve interface-specific PXE booting, we need to dive into IPMI raw commands. The 0x00 0x08 0x05
command set handles boot parameter configuration:
# Query current boot parameters
ipmitool -I lanplus -H bmc_ip -U root -P pass raw 0x00 0x08 0x05 0x80 0x00 0x00
# Expected output format:
# XX YY ZZ AA BB CC DD EE FF
# Where XX is the parameter version and YY-ZZ contain interface flags
Here's how to force PXE boot through a specific NIC (e.g., NIC3):
# Persistent PXE boot from NIC3 (0x04 flag)
ipmitool -I lanplus -H bmc_ip -U root -P pass raw 0x00 0x08 0x05 \
0x80 0x00 0x00 0x04 0x00 0x00 0x00 0x00
# Combine with standard bootdev command
ipmitool -I lanplus -H bmc_ip -U root -P pass chassis bootdev pxe options=persistent
Common interface selection bits (OR them together if needed):
- 0x01: Primary NIC (shared LOM)
- 0x02: NIC2 (dedicated)
- 0x04: NIC3 (mezzanine slot 1)
- 0x08: NIC4 (mezzanine slot 2)
Verify your settings took effect with:
ipmitool -I lanplus -H bmc_ip -U root -P pass chassis bootparam get 5
Look for "Boot Flag Valid" and "BIOS Boot Device" fields in the output.
Implementation varies by vendor:
- Dell iDRAC requires slightly different raw commands
- HPE iLO may need SMBios mapping first
- SuperMicro often uses 0x04 for dedicated IPMI port
Always consult your BMC's IPMI specification document for exact bitmask values.
When automating server deployments, administrators often need to control both the boot device type (PXE) and the specific network interface for network booting. While ipmitool
's standard bootdev
command handles the former, interface selection requires deeper exploration.
The basic command for persistent PXE boot configuration:
ipmitool -I lanplus -H bmc_ip -U root -P passwd chassis bootdev pxe options=persistent
This sets PXE as the primary boot method but doesn't specify which network interface should be used.
To target specific NICs, we need to use raw IPMI commands. The exact implementation varies by vendor, but here's a common approach:
ipmitool -I lanplus -H bmc_ip -U root -P passwd raw 0x00 0x08 0x05 0x80 0x00 0x00 0x00 0x00
The magic happens in the raw bytes. Let's break this down:
0x00 0x08
- NetFn/LUN for chassis commands0x05
- Set boot options command0x80
- Parameter selector for boot flags- The remaining bytes set specific options including interface selection
For Dell PowerEdge servers:
ipmitool -I lanplus -H bmc_ip -U root -P passwd raw 0x00 0x08 0x05 0xe0 0x04 0x00 0x00 0x00
For HPE servers:
ipmitool -I lanplus -H bmc_ip -U user -P pass raw 0x00 0x08 0x05 0x80 0x00 0x00 0x00 0x00
To find your specific configuration:
ipmitool -I lanplus -H bmc_ip -U root -P passwd raw 0x00 0x08 0x09
This returns the current boot parameter data, which you can analyze to understand your system's addressing scheme.
Combine interface selection with persistent PXE boot:
ipmitool -I lanplus -H bmc_ip -U root -P passwd raw 0x00 0x08 0x05 0x80 0x00 0x00 0x00 0x00
ipmitool -I lanplus -H bmc_ip -U root -P passwd chassis bootdev pxe options=persistent
Always verify your changes:
ipmitool -I lanplus -H bmc_ip -U root -P passwd chassis bootparam get 5
Common issues include:
- Incorrect byte ordering in raw commands
- Vendor-specific parameter requirements
- Missing persistent flag when needed