Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 at 15:19

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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