[ipxe-devel] Booting from local disk on HP ProLiant machines

Christoph Schug chris+ipxe-devel at schug.net
Tue Jan 8 18:46:08 UTC 2013

On 2013-01-08 16:19, Andrew Bobulsky wrote:
> Following a different thread regarding similar issues with sanbooting
> a local disk under Virtualbox, I did some testing using GRUB4DOS as a
> workaround, and wrote an application note on the wiki yesterday.
> If you'd like to give it a try:
> http://ipxe.org/appnote/work_around_bios_halting_on_ipxe_exit

Hi Andrew,

great summary :-) The

| chain http://server/grub4dos/grub.exe --config-file="rootnoverify 
(hd0);chainloader +1"

seems to do the trick on my DL365 G5. Apparently GRUB4DOS has the 
limitation that it cannot boot from LVM volumes but that is something I 
can live with. For a first test I went back to an traditional partition 
setup without LVM, for the final solution it is most likely enough to 
have everything on LVM except /boot/ (might be worth a note on the 
appnote document; additionally it should be referenced on 
http://www.ipxe.org/docs ... this is really valuable information).

FWIW, I was working on a backup plan today by moving the logic whether 
to boot from local disk or from network to the layer of TFTP, more 
specific tftpd-hpa. I am just noting it here in case someone still has 
the requirement to boot from LVM-managed disks.

Of course it would be also possible to do this directly in the 
dhcpd.conf, but I am not fancy the restart the mission critical DHCP 
service for ever change, nor do I want to DHCP to be dependent on LDAP 
(supported by vanilla ISC DHCPD) or some SQL database (there is some 
patch floating around which allows control over the host declarations, 

The idea would have been to add the MAC address also to the TFTP 
request as unique identifier ...

| set client-dashed-mac = concat (
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 1, 1))),2), "-",
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 2, 1))),2), "-",
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 3, 1))),2), "-",
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 4, 1))),2), "-",
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 5, 1))),2), "-",
|     suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 6, 1))),2)
| );
| if exists user-class and option user-class = "iPXE" {
|     set bootstrap-url = 
concat("http://${next-server}/ipxe/bootstrap/", client-dashed-mac);
| } else {
|     set bootstrap-url = concat("boot/", client-dashed-mac);
| }
| filename = bootstrap-url;

... but instead of providing a tftproot/boot/<client-dash-mac> file to 
have some mapfile (tftpd-hpa option "-m") which contains the MAC 
addresses of all machines which should do something with iPXE in order 
to rewrite those requests ("re" rules) to undionly.kpxe. Machines which 
shall boot from local disk are not to be listed here, their requests 
will get an access denied which is here the default policy ("a" rule). 
This aborts the PXE boot and those machines fall back to local boot.

| re ^boot/00-1f-29-54-2f-e2$ /ipxe/undionly.kpxe
| re ^boot/00-1f-29-5c-d5-74$ /ipxe/undionly.kpxe
| a  ^

Well, that one also works, but of course I will stick to the plain iPXE 
solution using GRUB4DOS as this gives much more flexibility by the fact 
that HTTP is mostly used which allows dynamic configuration generation 
with standard tools (think of PHP, etc.) from a central configuration 
management database.

Thanks once more

More information about the ipxe-devel mailing list