PXE boot linux and windows

bootboot-loaderinstallationpxe-boot

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.

Best Answer

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.