PXE boot decisionsSYSLINUX/PXELINUX is officially awesome. You've almost certainly already used it - while booting from a Linux installation CD - and probably already use it if you do any PXE stuff.
What you may not knew is that it provides an API programs can use, it can directly execute specially crafted DOS command binaries (COM), and even has a special 32-bit mode for these programs (the collection of these is "Comboot API").
There are lots of cool things in the API and the extensive sample programs. Especially nice is the readily available DMI support in the API.
This made my task an easy journey. First, what I wanted to actually do:
- If a machine gets booted from PXE (from any location, we have a central TFTP server),
- if it is a server of a known model, auto-boot into a customized grml environment for auto-deployment,
- else present our standard PXE boot menu for OS installation/recovery purposes.
And this basically boils down to:
- Write a small Comboot program which checks the DMI product_name against a pre-defined string (for HP ProLiant servers this unsurprisingly starts with "ProLiant") and dispatches to two different PXELINUX configuration files. I named this program proliant.c32.
- Write pxelinux.cfg/default which does exactly one thing: auto-load proliant.c32.
- Write the seperate PXELINUX configuration files.