0

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:

  1. 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.

  2. 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.

1
  • I have done this with different files within the pxe directory on the server, each file name represents the client's ip address in hex values, e.g. 38-fa-b7-7d-bb-bf. This way I control that the client only applies the specific config I want him to (I use that to run autoinstall via autoyast on SUSE systems). That way you could work around the selection via keyboard. There are probably other ways to achieve this, depending on your demands. – eblock Feb 20 '20 at 14:10
0

http://www.cobblerd.org/ controls various pieces of software (dhcp server, tftp server, dns server etc) and gives you a GUI to decide what each different MAC address gets offered to boot via PXE.

Not the smallest/simplest thing to set up but seems to fit your requirements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.