I want to provision some devices over netboot. Currently, I am using ISC DHCP to send out the appropriate PXELINUX version (UEFI/BIOS), and then I have a PXELINUX menu where I can choose e.g. the operating system to install. This requires that I connect a keyboard and a screen to the device (if not integrated).
I have been thinking about adding keyboard and screen to the PxE server instead. Then I would write a little UI where you could select the operation, like install a certain OS or run memtest, and it would perform that operation on the booting device. *
For this, I need to programmatically make a selection in the PXELINUX menu. I found that you can specify a default selection, but that is about it. Is there a way to hook either dhcpd or PXELINUX, so that I can decide what image to boot in a piece of code?
*) There are two options here:
On the server, select the OS to boot first, then connect and boot the client. I could implement this by changing the config files and restarting the dhcpd server, but this takes a while and it will make it more cumbersome.
Connect and start boot the client, it then waits until I choose server side what to boot. This is preferred as it would be more interactive. I imagine codewise something like this:
- dhcpd sees someone wants netboot, calls my hook which updates the UI
- PxE boots partially, waits
- User selects something in the GUI
- Server sends out data to complete PxE boot
I guess I could boot a minimal Linux and then attempt a chain-boot, but I'd rather not have to reimplement or fork PXELINUX/SYSLINUX myself. So that's why I'm hoping there is a hook or another solution.