Workaround of the day: PXE as primary boot dev on a dl360 g7

The problem: How to set PXE as the preferred boot device on a default HP dl360 g7 from Linux?

The key words here are “from Linux”. No iLO tricks are allowed. Of course, the simple answer should be: “use ipmitool!”. However, ipmitool (I’m currently using ipmitool-1.8.11-6.el6.x86_64 in Scientific Linux 6) doesn’t quite seem to do the trick here. The following have been tried without success:

[root@localhost ~]# ipmitool chassis bootdev pxe
Set Boot Device to pxe
[root@localhost ~]# reboot
[root@localhost ~]# ipmitool chassis bootparam set bootflag force_pxe
Set Boot Device to force_pxe
[root@localhost ~]# reboot
[root@localhost ~]# ipmitool chassis bootdev pxe clear-cmos=yes
Set Boot Device to pxe
[root@localhost ~]# reboot

It is nice to know that the dl360 g7 will PXE boot if it is unable to boot from the local hard drive. This behaviour can be used as a (not-so-pretty-ok-I-admit-it-is-very-very-VERY-ugly-but-it-works-for-me type of) workaround:

[root@localhost ~]# modprobe ipmi_si
[root@localhost ~]# modprobe ipmi_devintf
[root@localhost ~]# alias reinstall="/bin/dd if=/dev/zero \
of=/dev/sda bs=512 count=1 2>/dev/null ; sync ; \
ipmitool chassis bootparam set bootflag force_pxe \
>/dev/null ; reboot"
[root@localhost ~]# reinstall

(The alias is called reinstall because booting from PXE will, in this setup, reinstall the node.)

Good luck!

This entry was posted in sysadm. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>