1

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.

1 Answer 1

2

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.

5
  • 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, 2013 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, 2013 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, 2013 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 dhcpserver.de. Thanks for your help.
    – Ajesh John
    Apr 5, 2013 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, 2013 at 6:42

You must log in to answer this question.

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