PXE: Not Just for Server Networks Anymore!

Using a combination of open-source technologies, you can build an unattended network-based OS installer that can save you huge amounts of time and even can install Windows.

Now, when I booted a PXE client, I got a choice as to whether to go to the Ubuntu LTSP session or the Unattended install. At this point, I tested the Unattended installation, and it sort of worked—it installed a base Windows system just fine, but it didn't install any of the drivers, nor any of the patches to the operating system. I realized just how spoiled I am by Ubuntu's driver coverage and update manager, but I slogged ahead and continued to work to refine the system so that the driver and update installation happened without my intervention.

Figure 3. Choosing What Software Goes on the Machine

It turns out I didn't have to re-invent the wheel, as the driver issue and the update issue both have been addressed by the Unattended team. As far as the driver stuff goes, there is a method to integrate DriverPacks (which are large compressed archives of drivers) into the Unattended system. It's a little bit too involved for the scope of this article, but see the DriverPack link in the Resources section for more information.

With respect to automatic update installation, the method the Unattended folks use is very Linux-like in its resourcefulness. Under the Unattended root path, there are two directories: the /install/scripts and /install/tools directories. The scripts directory contains Windows batch files (.bat) that are used to do automated installation of various software packages, as well as some basic updates. The tools directory contains a set of scripts that will look at your Unattended server's current configuration and scripts directory, and then compare it to the CVS tree maintained by the Unattended team. The scripts then will grab the latest .bat files and drop them in the correct place in the scripts directory. At that point, the next Windows install that's done with the Unattended system will get all the patches and install them automagically. The system even will reboot at the appropriate times, then pick up the next patch in the series and install it. To update the Unattended system's patch repository, it's as simple as running a ./script-update; ./check; ./prepare from the /install/tools directory under the Unattended root.

Figure 4. Windows installing! Faster and more reliable, that's debatable.

The CVS archive of scripts, as well as the script archive on the wiki, proved to be invaluable. Those resources allowed me to finish the complete automation of my install, and now, I have a configuration that meets my company's needs for Windows. After about 30 seconds of typing the machine-specific information at the beginning of the installation, I now can walk away and know that Windows, Office, the Cisco VPN client, Symantec Anti-Virus and many other things my Windows users need will be done my way, automagically, without requiring myself or another staff member to babysit it.

In closing, thanks to the efforts of the Ubuntu and LTSP teams, I now have an environment that lets my users do some kind of work, even when their systems may have some kind of issue. And, thanks to the Unattended team, I don't have to sit at a Windows machine physically to install it, nor do I have to mess with half-baked images or other strange packaging solutions. I'm already getting other ideas on how to extend this system even further.

Bill Childers is an IT Manager in Silicon Valley, where he lives with his wife and two children. He enjoys Linux far too much, and probably should get more sun from time to time. In his spare time, he does work with the Gilroy Garlic Festival, but he does not smell like garlic.


Bill Childers is the Virtual Editor for Linux Journal. No one really knows what that means.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Using Abbreviations Indiscriminately

~weatherguy's picture

It is foolish and acts as a point of abandonment for a technical article not to have the acronym or abbreviation identified. It requires the reader to have the specialized vocabulary as part of their working vocabulary. Those who might eventually come to trust your message are tempted to abandon your article when it has acronyms and abbreviations that have not been identified at the first use.

In most scholarly or technical writing--other than the Internet--there are standards for what is allowable in technical writing. Not adopting some standard for minimum levels of communication both in writing and in what amounts to a complete explanation in a tutorial is an egregious lapse.

It will cost you readers and credibility.


FOG Server a possible PXE solution for some

Anonymous's picture

Some may find a FOG server may be suitable (http://www.fogproject.org/) for managing windows images. It lives nicely in a PXE environment as well.

As far as Windows SPs &

Anonymous's picture

As far as Windows SPs & drivers go, you just need to slipstream them into the install image using something like nlite (XP - http://www.nliteos.com/) or vlite (Vista - http://www.vlite.net/) - works beautifully, even for the real PITA drivers like strange SATA raid controllers that you'd normally manually need to load from floppy.

The Windows unattended

T-One's picture

The Windows unattended installations are very interessting but without vista and server 2008 support not useable for a systembuilder like me.

LTSP with dnsmasq

Kenneth Finnegan's picture

I don't know if it's just me, but I couldn't get your dnsmasq conf lines to work in Tomato 1.23. I'd expect it to need the /ltsp/i386/ prefix, but even with that, it didn't work for me. However, I stopped pounding on it when I got this to work instead:
Thanks for putting me on the right track though! It's so much easier not having to manually switch CAT5 cables and configure multiple interfaces + another DHCP server every time I want to boot one of my hosts off another (broken CD drives + multiple users on main desktop mean I use this a lot!).


Josh's picture

I worked w/ the enterprise version of Ghost a year or so back. All of the docs said that PXE-style imaging was supported, but through multiple support calls, I was finally informed that it wasn't gonna happen...I spent a LOT of time trying to get it to work. (Granted, it probably *was* possible, but I wasn't smart enough/skilled enough/etc.)

That being said, I am extremely happy to see this. All of our machines at work are currently able to PXE boot, but we don't have the budget to purchase any high-end imaging stuff. I'm really, really excited about this article, and I can't wait to try it. Thanks so much for the article!


nfsmount error

senshikaze's picture

If you are runnign the LTSP server on a Debian Etch/Lenny machine, make sure to set the windows DHCP option "017 Root Path" to "/opt/ltsp/i386" (minus quotes) to get rid of the "nfsmount: need a path" error.
Also, if your server is running on AMD64 (x86_64), run this command "sudo ltsp-build-client --arch i386" to make a x86 compatible image.
Thanks for the article, Mr. Childers. Will see if I get images installed instead of an unattended install of XP (we have ALOT of programs installed by default). Good article.