在HP Proliant硬件上从Linux进行一次性PXE引导

因此,我使用Systemimager通过PXEconfiguration新的CentOS 5.3主机。 我们有几台服务器,这些服务器只是testing目标,我们每天要重映像几十次,通常,让它们进行PXE引导就像login到它们的iLO接口一样简单,重新启动,然后在适当的地方点击F12时间。 我的问题是,是否可以通过Linux命令行告诉服务器在下次重启时执行“一次性PXE启动”? 每个重映像周期,这将节省我点击,打字,等待Java加载ilo控制台,等等我有很多分钟。我知道戴尔有这个能力通过OpenIPMI,但我想知道,如果惠普有类似的function。

非常感谢! –Lee

这应该可以用ipmitool。 赶紧跑:

ipmitool chassis bootdev pxe 

而你的下一次启动应该是一个PXE启动。

编辑 :这似乎并不适用于惠普iLO2。 但是,您可以通过SSH进入iLO2界面并在此处重新configuration

 set /system1/bootconfig1/bootsource5 bootorder=1 

在不支持从USB密钥启动的系统上,将会是bootsource4 。 有关完整的详细信息,请参阅iLO2脚本参考

你可以发出这个命令作为ssh一个参数,这也应该可以。

所以我在一个同事的帮助下计算出来了。 它是一个肮脏,肮脏的黑客,但它的作品! 惠普Proliants(至less现在,在2009年底)将尝试从光盘启动,然后尝试硬盘,然后尝试一个USB记忆棒,然后他们将做一个PXE启动。 由于我正在重新映像服务器,所以我发现如果我们无论如何都要启动扇区并立即重新启动,HP boxen将会通过启动过程,绕过硬盘,因为没有MBR,并立即进行PXE启动。 我已经写了一个脚本来发出这样的dd命令:

 #!/bin/bash # 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 sync echo "Nuke complete! Rebooting in 5..." sleep 5 reboot 

HTH! –Lee

或者,使用HP Proliant Support Pack(名为hp-health的rpm)中的工具…有一个名为“hpbootcfg”的CLI程序,它将完全按照您的要求进行操作:USAGE:bootcfg [-F -C -H -T] [-S -Q -R -P] [-r -d -n -b] -D设置无处不在

  -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