Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, I use Systemimager to provision new CentOS 5.3 hosts via PXE. We have a couple servers that are just test targets that we'll reimage a couple-dozen times a day, and normally, getting them to PXE-boot is as simple as logging onto their iLO interfaces, rebooting, and hitting F12 at the appropriate time. My question is, is it possible to tell the server via the linux commandline to perform a "one-time PXE boot" during its next reboot? Each reimage cycle this would save me many minutes of clicking, typing, waiting for Java to load the ilo console, etc. I know Dell has this capability via OpenIPMI, but I was wondering if HP had similar functionality.

Many thanks! --Lee

share|improve this question
add comment

3 Answers

This should be possible with ipmitool. Just run:

ipmitool chassis bootdev pxe

And your next boot should be a PXE boot.

Edit: This doesn't seem to work for HP iLO2. However, you can SSH in to the iLO2 interface and reconfigure it there by issuing

set /system1/bootconfig1/bootsource5 bootorder=1

On systems that don't support booting from USB key it will be bootsource4 instead. For complete details, see the iLO2 Scripting Reference

You can issue this command as an argument to ssh and that should work as well.

share|improve this answer
HAPPY DANCE, HAPPY DANCE! –  Insyte Aug 19 '09 at 20:16
It looks like this command is not supported on HP: root@test02:~# ipmitool -I open chassis bootdev pxe Set Chassis Boot Parameter 4 failed: Invalid command –  Insyte Aug 19 '09 at 20:21
Does that flag stay set for all subsequent boots, or will it change back to the 'regular' boot order after it successfully PXEs once? –  law Aug 20 '09 at 2:57
Not sure. I believe it's all subsequent boots, so you'd have to change the boot order again when exiting the PXE environment. –  Kamil Kisiel Aug 20 '09 at 15:20
Yes, it is a permanent change. You need to run set /system1/bootconfig1/bootsource5 bootorder=5 to switch back. One advantage for the HP servers being so slow to boot is that you have quite a long time to change this back! –  Peter Jenkins Feb 19 '13 at 15:16
add comment

So I figured this out with the help of a coworker. Its a dirty, dirty hack, but it works! HP Proliants (at least now, at the end of 2009) will try to boot from a CDROM, then try the harddisk, then try a USB stick, and then they'll do a PXE boot. Since I am reimaging servers anyway, I've figured out that if we zap the boot sector anyway and immediately reboot, HP boxen will go through the boot process, bypass the harddisk because there's no MBR, and immediately PXE-boot. I've written a script that issues the dd commands thusly:


# This is meant to assist in re-imaging a server.  This will blow away the
# main partition of a given box, forcing it to pxe-boot next boot.
# Naturally, don't be an idiot and run this on a machine you DON'T want nuked
# from orbit

echo "Nuking from orbit will commence in 5 seconds.  Ctrl-C if this NOT what you want."
echo "You have been warned!"
sleep 8

dd if=/dev/urandom of=/dev/cciss/c0d0 bs=512 count=2

dd if=/dev/urandom of=/dev/cciss/c0d0p1 bs=512 count=2
dd if=/dev/urandom of=/dev/cciss/c0d1p1 bs=512 count=2
dd if=/dev/urandom of=/dev/cciss/c0d2p1 bs=512 count=2

echo "Nuke complete!  Rebooting in 5..."
sleep 5

HTH! --Lee

share|improve this answer
add comment

Alternatively, use the tools from the HP Proliant Support Pack (rpm named hp-health) ... there's a CLI program called 'hpbootcfg' that will do exactly what you want: USAGE: bootcfg [-F -C -H -T] [-S -Q -R -P] [-r -d -n -b] -D Set Defaults everywhere

    -F Floppy first
    -C CD ROM first
    -H Harddrive first
    -T Tape first

    -S one time boot to system configuration utility
    -Q one time boot to quick configuration utility
    -R one time boot to RBSU
    -P one time boot to PXE

    -r one time remote
    -d one time remote dial out
    -n one time remote network
    -b bypass F1/F2
share|improve this answer
So the -P option is what is needed here. Does this only work from the server itself? –  Peter Jenkins Feb 19 '13 at 15:18
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.