8

I am working on a pet project, and I am trying to figure out where I should start with achieving the following functionality:

I have a PXE boot rom that wlil do burn-in tests, my burn in test sets a flag on the PXE/DHCP server.

If a client is booting and does not have the flag, I want to offer my PXE boot rom.

If a client does have the flag, I want to just skip pxe boot.

I can do this via pxe config -- but for entire subnets. how do i manage this per MAC?

Edit: I suppose it is worth mentioning, that I can do this via linux or windows server 2008 and it really comes down to which is an easier time to implement this. I'd probably prefer to write the interface for managing the DHCP settings in .net than java or something, but I imagine the dhcpd.conf is going to be more straightforward.

1
  • If you find a way to manage the issue when using EFI, please let me know, I'm very interested.
    – S19N
    May 4, 2015 at 14:30

2 Answers 2

6

Take a look at how Foreman does this. You set every machine to PXE boot, and you have a 'default' pxelinux.cfg with a very low TTL. This default config has one entry, localboot.

When you want to switch a machine to PXE booting something else, you create a config file for it (either based on MAC or IP). The next time it boots, it pulls the most specific config file and boots fine. All the other machines get the default one, which does nothing.

2
  • Any good suggestions on where to look at examples for setting up pxelinux to point to specific boot images? I have a linux-based test suite that runs once it boots. Through a service, I will flip configs around for clients and occasionally send them through the test
    – Yablargo
    Feb 28, 2012 at 13:55
  • For just the specific config file per server: syslinux.org/wiki/index.php/… . As far as the actual configuration in each file, it's the exact same config that would be in a pxelinux.cfg/default file, there's thousands of tutorials out there for it.
    – devicenull
    Feb 28, 2012 at 15:19
0

I do this in my iPXE menu which you can see at https://gist.github.com/robinsmidsrod/2234639 .

It simulates the same behavior as PXELinux, bust is a bit more flexible in how you approach it, as you can name the custom boot file for a single client according to their MAC, hostname, UUID or network adapter type.

With a bit of shell scripting you can easily create those config files for clients on demand.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .