PXE is a fast and easy way to install operating systems over the network; especially attractive compared to the painfully slow alternative of something like iLO remote media. Microsoft offers a PXE installation solution called Windows Deployment Services (WDS) and PXELINUX is an excellent utility for network installs of Linux or VMware ESXi, Firmware Maintenance DVDs, rescue CDs, and pretty much anything else.
What to do in a heterogeneous environment? This can be a challenge for PXE because it requires DHCP — it is difficult to have more than one PXE server on a network. While it is possible to configure a WDS server to install non-Windows operating systems, NFS support can be an issue. Besides that, do you really want to install Linux via IIS?
Deploying a Linux system configured with DHCP, TFTP, HTTP, and NFS on a separate VLAN is certainly one approach. But wouldn’t it be convenient if the WDS and Linux PXE servers could coexist peacefully on the same network?
There is a way…
As it turns out, thanks to the lesser-known pxechain utility, it is possible to seamlessly jump from one PXE host to another. With a few tweaks to your WDS server, you can continue to use it for Windows OS installs and bounce over to a Linux host for Linux, ESXi, or rescue-CD purposes.
Windows Deployment Server Modifications
To make this possible, alter WDS to serve up a PXELinux menu with options to either proceed with WDS or jump over to a Linux PXE server:
- Download Syslinux 3.86 and extract to a temporary location
- Copy the following three files directly to your WDS x64 boot directory, e.g., D:\RemoteInstall\Boot\x64\
- Make duplicate copies of these existing WDS files (should already be present in directory above); they need to have “zero” as the extension
- pxeboot.n12 -> pxeboot.0
- abortpxe.com -> abortpxe.0
- Create a directory in x64 named “pxelinux.cfg”
- Create a new text file: x64\pxelinux.cfg\default with the following as a guide:
DEFAULT menu.c32 MENU TITLE WDS PXE Server LABEL wds MENU DEFAULT MENU LABEL Windows Deployment Services KERNEL pxeboot.0 LABEL abort MENU LABEL Abort PXE Kernel abortpxe.0 LABEL linuxpxe MENU LABEL Linux PXE server... KERNEL pxechain.com APPEND 192.168.4.33::pxelinux.0 #IP address above is Linux PXE host
To activate, run these two commands from a command prompt on the WDS server:
wdsutil /set-server /bootprogram:boot\x64\pxelinux.0 /architecture:x64 wdsutil /set-server /N12bootprogram:boot\x64\pxelinux.0 /architecture:x64
Boot a machine from the network and you should get a PXELinux menu that offers a choice:
One other note: the Linux PXE server doesn’t actually need to be on the same network, it just needs to be reachable from the client.
What’s your preferred PXE deployment scenario?
Pingback: VMware ESXi 5 is easier to deploy via interactive PXE installation | VCritical
Im trying to call a citrix provisioning server image on a remote server from tftp://*IP ADDRESS*/FILENAME.BIN
How would i do that?
Ive tried changing the details in what you have as the linux one but get an error of “pxechain:PXENV_RESTART_TFTP ” and it will just sit there and loop doing that and i then have to kill it.
Trying to work out what comes after this. I’ve got my WDS configured as you said, but configuring RHEL to work with this afterward is what’s got me confused. I get the same error as Dan does here.
I can’t use my Linux machine as a DHCP server, either, so it’s all very confusing for a first timer.
Very difficult to diagnose an issue like this without details. Speculating… I’d check the version of Syslinux (3.86 known to work) and also keep in mind case-sensitivity, which sometimes catches folks off guard in these situations.
Thanks for your reply, Eric. Basically I’m asking, what next? It seems like this tutorial leaves off right where I currently need assistance. What does the error message mean?
I’ve had my IT dept configure the WDS server to work exactly like this, and it’s pointing to my Linux server. Then what?
You have this working in a production environment? I can’t get it to go directly, using pxechain.com to my Linux server. I’m trying all sorts of workarounds now.
Yes, it works great. The Linux server needs to be a fully-functional PXE server (minus a DHCP service, of course). The solution described here is for bouncing from a WDS server to a Linux PXE server – typically TFTP plus HTTP/NFS. Hope that makes it more clear.
It seems like there is some unstated assumption within the instructions (regarding DHCP possibly) that this solution is built on, as it simply doesn’t work for me. I wish I understood why.
Hmmm. Maybe if I put it another way. I’ve pretty much followed these instructions to the letter, and it doesn’t work. From what I can see, I’m not doing what Dan did, where I’m calling something.bin. Maybe my Linux PXE server isn’t configured properly, but it’s the first time for me doing this.
@Regis: Where you able to PXE boot off your RHEL server to begin with? Also if using RHEL, the default path to put in your ‘default’ file on the WDS server will be “APPEND IPADDR::linux-install/pxelinux.0”
In our shop the WDS server was an add-on so we already had DHCP, PXE, TFTP and NFS setup on our RHEL box. All that was needed was to change the DHCP to point to WDS. Other than the changes listed above ours is working flawlessly.
@Brian, thanks for your comment. I don’t have access to the DHCP servers. I could ask for a change, but ALL changes reduce the likelihood that my project will make it into production. I’m working in a test environment now with WDS and Hyper-V VMs running RHEL- one as a client, the other as a server. I don’t know where my test environment gets it’s DHCP services from. If it’s on the same VM as runs the WDS, then I might be able to make those changes and test it. I’ll ask. If I know that this change will fix my issue with this “hand-off” then, I’ll fight for it, but I just don’t know what specific change to request or implement, assuming I’ve got that ability in my test environment.
I’m one Linux/Solaris guy in an enormous corporate behemoth that is Microsoft ONLY. There is absolutely NO CHANCE that ANY infrastructure will be Linux in any shape or form. Only for product development do we use Linux, developing software for specific customers or functions.
This has been the difficulty. Every instruction assumes that “I am IT” or “I am a network administrator” and therefore have access to everything. I really don’t.
No, I can’t PXE boot off RHEL to begin with, the RHEL PXE/DHCP server can NEVER be the first thing in my process without breaking everything on our network, not one aspect of which I control.
Basically, I’m trying to put through a small change that will make this WDS server “hand-off” to my Linux PXE server which is in my control and doesn’t take months to make a small change consisting of 50MB of data and 5 files. Part of my difficulty is political. IT is short-handed, so getting even 15 minutes of their time takes weeks.
At this point, I’m willing to pay someone $50 on PayPal to answer my questions until I have a working setup; to help me work within my restrictions and understand the quite specific restrictions I have. I’m flying a little too blindly here and I need to move forward.
This solution is geared toward a situation where one has a working Linux PXE server and desires a way to hop from WDS over to Linux.
I might suggest an alternate approach for your scenario; it’s easy enough to have the WDS server actually serve up the Linux installation, eliminating the need for a dedicated Linux PXE server at all.
Here is one site that describes the process:
I’ve implemented the solution you have mentioned. It was relatively simple and easy, as this solution should be… but isn’t in my environment, for a reason I don’t understand.
Right now, WDS doing my booting and Kickstart installs is the only thing that works. But, for me, this is a workaround, as I’m going to be building Cobbler and Spacewalk on top of this.
Why I can do WDS PXE DVD and Kickstart installs vs. what I want to do, which is what is described here, I have no idea; and is the crux of my question. What am I missing?
I’d start by making sure the Linux PXE server works perfectly. You can do this by creating an isolated private VLAN (or a virtual network on an ESXi host) so it won’t interfere with the production DHCP services. There are tons of resources on the net for configuring a Linux PXE server, so I won’t go into the details. Once you can confidently install a VM by PXE booting from your Linux server, disable the Linux DHCP and move it to the production VLAN, change IP addresses and other configs as needed – the WDS server should be able to bounce a PXE client to that Linux PXE server for install.
Thanks for all of your kind assistance, everyone. I’m still not able to get this to work, as the IT dept at my company doesn’t want to provide me with the sort of environment in which I can succeed in testing this.
I’m still trying to work out what specific DHCP relationship must exist between WDS and the PXE side of things to allow this to work. It looks so SIMPLE, yet doesn’t work in my setup. Very frustrating.
I’ve followed the steps however i never get to the newly created boot menu. It simply boots the (default?) boot image (WIM file). I’m testing SCCM 2012 and hoping to be able to pass these requests to the linux PXE server.
why do not try Serva?
Small windows app that automatically creates a menu of several Microsoft OSs for network (PXE) install. It is based on PXELINUX.
It network installs from Windows 2000 to Windows 8
It runs from Windows 2000 to Windows 8
nice (WAIK independent) RIS Install & WDS Install alternative
plus you can add all your Linux entries to the menu…..
Is there a way to reverse this. I deleted the added files but when I pxe boo the computer is still trying to TFTP Download: boot\x64\pxelinux.0
This worked like a champ! Thanks for the information.
How hard is this to engineer the other way? Start the PXE boot from the Linux server, then chain to a WDS server? Do I still need to put the pxeboot.0 file on the WDS, or can I directly reference something like:
MENU TITLE Linux PXE Server
MENU LABEL Linux
MENU LABEL WDS Server
I don’t believe I was able to get this to work in the past, if you find the solution, please share.
It works with pxechn.c32 in syslinux 6+ w/ WDS
As simple as
APPEND hostname_of_WDS::boot\x64\wdsnbp.com -W
Garg, that is what I was looking for long time.
I’m looking to use this to let me choose from multiple WDS servers (i.e. production & development). The menu comes up fine (on Server 2012 btw), and I can choose the local server fine, but when trying to append to another WDS server, I get:
TFTP boot: 10.x.x.x pxeboot.0
(yes, I copied that file from .com to .0 on the dest svr)
pxechain: PXENV_RESTART_TFTP 
pxechain: PXENV_UDP_OPEN 
I’m not sure what to enter at the boot prompt, or for that matter where I am in the process – i.e. did I even get to the other server at that point?
Thanks in advance even if you can’t answer this… the post was very instructive, and I’ll keep playing with it!
I thought I had a good idea- that maybe
pxechainonly liked linking to a linux kernel. So I set up the other WDS server the same way. Not an ideal solution, since after the chain I’d theoretically get another menu, but worth a shot. Alas, same result. Both work when they initially respond to the PXE request, but the chain doesn’t carry over. I’d sure appreciate any thoughts… this would be a wonderful solution for me!
hmm.. forgot the closing italic tag. sorry. 🙂
Almost there. From PXELinux + WDS on Proudly Geeky I saw that I needed the path to the file on pxechain, i.e.
KERNEL pxechain.com boot/x64/pxelinux.0
So I can now bounce between the two servers to the pxelinux menu with no problem. However, if Server1 responds and I chain to Server2, then choose the ‘local’ option, I get an error that Windows was unable to start. However, if Server2 responds to the PXE, the local option works fine. The scenario is the same regardless of which server responds to the PXE request – It’s a very different appearing error depending on whether it is Server 2008R2 or Server 2012, but the concept is the same – an error occurred reading the boot configuration data.
there’s a problem with TFTP paths.
when you pxechain to 10.x.x.x::boot/x64/pxelinux.n12
pxelinux.n12 will load but it will fail loading the /Boot/BCD
It won’t work.
hay i like it soo much its realy useful
I sort of got it to work by calling the pxelinux menu on both systems. So if I boot to Prod, I get the menu. Local selection works and I get the WDS menu from Prod. If I choose Dev (which appends to IP::boot\x64\wdsnbp.com) it brings me the same menu on the dev server, and I can choose Dev from there, which is now local, and it works.
So, not 100% slick, but very workable for my purposes.
Alas… all this was to get the dev server up to try deploying Windows 8, and I’ve run into all new issues there 🙂
Thanks for this post and all the suggestions, past and present!
Are there any known issues with syslinux 5.0 and WDS Server 2012?
Building a scenario with them and when i am at the menu and select pxelinux i can only see
a short message: Bad File Name
Loading boot.wim by WDS works perfect!
MENU LABEL Linux PXE server…
KERNEL pxechain.c32 (I also tried pxechn.c32 from syslinux 5)
Nothing works, and I keep getting the same error message:
Error: An undefined symbol was referenced
Boot failed: press a key…………
Any ideas of how I can solve this problem??
first thank you very much for the post.
I had in the beginning the same problem as Dan. I just added in the APPEND line the correct path where is the pxelinux.0 file. In my case I just added ::/ltsp/pxelinux.0 and it worked.
Sometimes the menu is frozen but most of the times it works.
I am using WDS with Windows server 2008 R2 and configured the PXE Linux for the Linux OS Installation. I want to fully automate the Linux OS installation process. I have used kickstart file to automate the Linux OS installation without user interaction. But currently I have to select the RedHat6 OS from the PXE menu manually at boot time. I want to automate this step also, How can i do this?
For windows OS there is a way like we can set the default client unattended file for the prestaged client machine using below commands:
WDSUTIL /Set-Device /Device:Computer1 /BootImagePath:Boot\x64\images\boot.wim
WDSUTIL /Set-Device /Device:Computer1 /WDSClientUnattend:WDSClientUnattend\Unattend.xml
Can i set the linux default boot image(which is available in folder \RemoteInstall\Boot\x64\img\initrd.img) using WDSUTIL for respective client machine?
Thanks in advance
I am get this error “failed to restart tftp.
tftp download failed on the client computer.
I followed your instructions.