Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the scenario: I have 3 machines connected to the network thru a switch: one is the server that can act as the tftp server, switch has the DHCP server and other 2 machines needs OS to be installed on. One needs linux and the other one Windows.

Is there any way to configure PXE boot so that I can decide (based on MAC ID or static IP address) whether to provide linux bootstrap program or Windows?

I can write the tftp server myself. But, I see that its already too late by this time.

share|improve this question
up vote 1 down vote accepted

You should not let the TFTP server decide that as the TFTP server might not have the necessary information any more (the MAC address is unobtainable if the client is behind a router for example).

Instead, configure the DHCP server to provide different next-server and filename options depending on the client's MAC address (usually achieved by creating a reservation with the appropriate option data). If your present DHCP implementation does not allow for it, consider exchanging it for a more capable one. ISC dhcpd and Microsoft DHCP server would both support this kind of configuration.

share|improve this answer
Thanks for the reply. The request cannot come from behind a router, since the system is a closed one. Since I use the DHCP server baked in the switch itself, it would be very difficult to change it. I am looking at options like grub4DOS now. – Ajesh John Feb 7 '13 at 11:54
@AjeshJohn You definitely could use code in Grub2 or something like PXELinux to differentiate configs or execution paths, but chainloading stuff might be a tricky business to get right, while using the right TFTP image from the start is very easy and straightforward. If you have a server to run the TFTP daemon already, why not use it as a DHCP server as well? – the-wabbit Feb 7 '13 at 12:42
I can. But, then I would have to write the DHCP server myself since I need to decide do the MAC v/s bootimage mapping. I need to do this since the MAC ID (device) can change in future if it has to be replaced. – Ajesh John Feb 8 '13 at 6:16
I have come to a conclusion that it is better to use multiple boot files options with DHCP server. Since the DHCP server has to be run on Windows 7, ISC dhcpd is not an option for me. Does Microsoft DHCP server run on Win 7? Could you point me to any other DHCP servers you know? I am currently looking at tftpd32 and Thanks for your help. – Ajesh John Apr 5 '13 at 6:07
@AjeshJohn Windows 7 would not run the MS DHCP server - it is only installable as a feature of Windows Server OSes. ISC does not maintain an official Windows port of their dhcpd and using patches and an own compile to just get it running seems like too much work. You could look into Open DHCP Server - it seems versatile enough and has a Windows build. I have to add that I never used it though. – the-wabbit Apr 5 '13 at 6:42

Your Answer


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.