[NCLUG] Question: Linux as a PXE Server

Marcio Luis Teixeira marciot at yahoo.com
Wed Apr 8 15:03:24 MDT 2009


Hi everyone,
 
I have a question related to setting up a Linux box as a PXE
server. I’ve successfully done this in two different scenarios: the first
scenario is one in which I set up Linux running TFTP with boot images, and DHCPD
assigning both addresses and boot parameters to clients. This is the typical
scenario that 99% of the How-To’s on the net demonstrate when you google “Linux
PXE boot” or whatever. This scenario works great, unless you have a need to run
DHCP on Windows, in which case the two DHCP servers will fight to the death.
 
The second scenario is the one in which you run TFTP on
Linux, but not DHCP. You add a bunch of special configurations to your Windows
DHCP which basically allows it to tell the thin-clients “hi there, here is your
IP, and by the way, contact that Linux box over there for your boot file”.  I
was able to get this working too, which is an improvement.
 
But even this second scenario is still short
of the ideal. I found an obscure document from Intel which described the
PXE specification, and it revealed that PXE is designed to work in a
seamless fashion on a network which already has a DHCP server. This is because
a PXE client, when it receives a DHCP offer for an address, it will then make *another*
specially marked DHCP request for a boot image. A machine running a so called “PXE
server” listens only for those specially marked DHCP requests and replies with a
DHCP offer containing only a boot image. Hence, in an ideal world, the DHCP
server and the PXE server can be two different machines that coexist peacefully.
 
Yet, despite my intense googling, I haven’t found out how to
configure Linux as a “PXE Server”, as opposed to a “DHCP Server with a PXE wart
on it”. I know this is technically possible, because I have downloaded and
tested “openthinclient.org” and it does *exactly* the right thing,
peacefully allowing my Windows DHCP server to assign addresses while giving the thin-clients the extra information they need
to boot. Because “openthinclient.org” is meant to work in Windows environments,
I suspect they took the time to get it done right. But although their product is Linux based, I’m not exactly sure how they do their magic.
 
Does anyone have any ideas? I suspect the solution either
involves telling DHCPD on Linux not to serve addresses but only respond to
specially marked DHCP requests from PXE clients, but my guess is that DHCPD
doesn’t support this sort of selective listening at all, or else it would have been documented. Is there maybe  another daemon out there that allows Linux to
serve as a PXE server?
 
-- Marcio 


      



More information about the NCLUG mailing list