Diskless Linux X Terminals
The X terminal is not a new idea; companies such as NCD have been manufacturing them for 15 years or more. The thin client idea fell out of fashion during the late 1990s, however, as the price of PC hardware fell so low that there was no obvious cost advantage to using X terminals. Heated arguments ensued over the total cost of ownership (including both the cost of the hardware and administrative support) of thin clients vs. PCs, and the debate will not be resolved by this article. The objective here is simply to describe a technique that allows one to utilize some of the growing pile of obsolete hardware left in the wake of advancing PC technology to build X terminals.
The essential characteristic of any thin client is that it should have little or no persistent storage. Typically, a purpose-built X terminal has a small quantity of NVRAM used to store configuration options and nothing else. In practice, it usually is possible to put even these options in a configuration file stored on the server and downloaded by the terminal on boot. This article takes the purist view that an X terminal should have no persistent storage whatsoever.
The PC has no hard, floppy or CD-ROM drive, so some other device must provide the bootloader and bootable image. X terminals are creatures of the network they inhabit, so the obvious choice is the network interface card (NIC). The NIC, therefore, must identify itself to the BIOS as a bootable device. If chosen, it must be able to download the bootloader from the network. This is not something most run-of-the-mill NICs can do. However, a standard for NIC boot ROMs called PXE (Preboot eXecution Environment, pronounced pixie) has been published by Intel and implemented by that company as well as by some other vendors in some products. Many newer motherboards with built-in Ethernet have PXE support.
In preparing this article, I tested five different kinds of NICs, all of which were advertised to support PXE: the Intel PRO/100+ (PILA8460BNG1), the 3Com 3C905CX-TX-M, the D-Link DFE-550TX, the Linksys LNE100TX and the SMC 1255TX (Tulip chipset). Of these five, only the 3Com card worked right out of the box. I was able to get a boot ROM separately for the SMC card, after which it also worked. The other three cards all had conspicuous but vacant sockets for boot ROMs, which were not shipped by default. Caveat emptor.
When the PXE NIC is chosen by the motherboard BIOS as the boot device, it broadcasts DHCP requests on the LAN and looks for PXE extensions in the responses it receives. If it receives a response containing some of these extensions, it then acknowledges and accepts the response. In particular, it respects the next-server and filename parameters in the server's response. These parameters specify the IP address of a TFTP server and the name of the file containing a bootloader that the client should download and start.
The Internet Software Consortium's version 3.0 DHCP server can be configured to advertise PXE extensions, and it is the DHCP server shipped with a number of Linux distributions, including Red Hat 8.0 and later versions. Listing 1 is an example of a DHCP server configuration file, dhcpd.conf, that generates DHCP responses with PXE extensions when the DHCP client identifies itself as a PXE NIC. With this configuration, the client downloads the file pxelinux.0 from the TFTP server, located at 192.168.1.1. Table 1 lists the options set in the configuration file.
Table 1. Definitions of PXE-Specific Codes in dhcpd.conf
| Code | Meaning |
|---|---|
| 1 | Multicast IP address of boot file server. |
| 2 | UDP port that client should monitor for MTFTP responses. |
| 3 | UDP port that MTFTP servers are using to listen for MTFTP requests. |
| 4 | Number of seconds a client must listen for activity before trying to start a new MTFTP transfer. |
| 5 | Number of seconds a client must listen before trying to restart an MTFTP transfer. |
Listing 1. Example dhcpd.conf File to Support PXE Clients
option space PXE;
option PXE.mtftp-ip
code 1 = ip-address;
option PXE.mtftp-cport
code 2 = unsigned integer 16;
option PXE.mtftp-sport
code 3 = unsigned integer 16;
option PXE.mtftp-tmout
code 4 = unsigned integer 8;
option PXE.mtftp-delay
code 5 = unsigned integer 8;
option PXE.discovery-control
code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr
code 7 = ip-address;
subnet 192.168.1.0 netmask 255.255.255.0 {
class "pxeclients" {
match if substring (option
vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
# At least one of the vendor-specific PXE
# options must be set in order for the client
# boot ROMs to realize that this is a PXE-
# compliant server. We set the MCAST IP address
# to 0.0.0.0 to tell the boot ROM that we can't
# provide multicast TFTP.
option PXE.mtftp-ip 0.0.0.0;
# This is the name of the file the boot ROMs
# should download.
filename "pxelinux.0";
# This is the name of the server they should
# get it from.
next-server 192.168.1.1;
}
pool {
max-lease-time 86400;
default-lease-time 86400;
range 192.168.1.2 192.168.1.254;
# If you include this, you must provide host
# entries for every client, optionally associating
# ethernet MAC addresses with IP addresses.
# deny unknown clients;
}
}
Obviously, the server at 192.168.1.1 must be configured to provide the TFTP service. It also must have a bootloader image called pxelinux.0, where the TFTP server process looks for it (usually in the directory /tftpboot). The TFTP server process usually is managed by one of the superservers, inetd or xinetd, so turning it on means messing around with one of their configuration files (/etc/inetd.conf or /etc/xinetd.conf, respectively).
The file pxelinux.0 is a bootloader that comes from H. Peter Anvin's SYSLINUX Project. Unlike generic bootloaders, such as LILO or GRUB, PXELINUX understands the PXE protocol and has the necessary networking functionality to pick up the boot process at this point by downloading the kernel and compressed RAM disk using TFTP. However, PXELINUX requires an enhanced TFTP server, one that understands the TSIZE option (RFC 2349). Fortunately, H. Peter Anvin also provides a modified version of the standard BSD TFTP dæmon, called tftp-hpa, that does support this option. The easiest thing to do is to replace the standard TFTP dæmon, often located at /usr/sbin/in.tftpd, with tftp-hpa.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Designing Electronics with Linux
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Build a Skype Server for Your Home Phone System
- Validate an E-Mail Address with PHP, the Right Way
- A Topic for Discussion - Open Source Feature-Richness?
- Why Python?
- Tech Tip: Really Simple HTTP Server with Python
- Great
1 hour 33 min ago - Reply to comment | Linux Journal
1 hour 41 min ago - Understanding the Linux Kernel
3 hours 55 min ago - General
6 hours 25 min ago - Kernel Problem
16 hours 28 min ago - BASH script to log IPs on public web server
20 hours 55 min ago - DynDNS
1 day 31 min ago - Reply to comment | Linux Journal
1 day 1 hour ago - All the articles you talked
1 day 3 hours ago - All the articles you talked
1 day 3 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Symbio Technologies' LTSP based diskless thin client solution
Readers who are interested in Linux-based diskless thin client technology should find the products of our company, Symbio Technologies, very compelling.
We offer a complete solution, based on LTSP, that can replace the PC on the desktop with low powered network terminals. We call the solution The Symbiont Solution. It includes:
1. The Symbiont Management Suite: Server based software that makes it easy to setup, configure, manage, and control a network comprised of diskless network terminals.
2. The Symbiont Boot Appliance: A device that boots the network terminals, directs them to the appropriate application server(s), and offers Internet-based access to setup, configure, manage and control the network. The SBA takes the place of a boot server and enables the efficient consolidation, management, and control of application servers.
3. Network terminals: These energy efficient units have no moving parts including no hard drives, no floppy drives, and no fans. They are guaranteed to work perfectly with our management suite and boot appliance.
Diskless Linux X Terminals and LTSP
Thanks Chip for a great article. It motivated me to do something usefull. I'm setting up a diskless machine for a friend which will boot off her partner's linux pc. She doesn't have enough disk to
setup a stand alone machine. I may not use pxe but expect to use etherboot via a floppy.
I think it a real shame that the "Diskless Linux X Terminal" article made no mention of the Linux Terminal Server Project! I followed the article and links and found it frustrating. (using SuSE 9.2) I downloaded the latest LTSP (www.ltsp.org) and had it all working in an
hour. The hardest part being getting the xdmcp to work. I would have found something explaining the differences between bootp, etherboot, and pxe really helpfull. Again the LTSP is very good at explaining this.
In the end I feel that as good as it was, the article had the
potential to be much better.
John Stern
Linux Specialist
RHCE
NVRAM? (I actually do need it....)
I liked your article, however, I am one of the few, the proud, who need NVRAM information:
The essential characteristic of any thin client is that it should have little or no persistent storage. Typically, a purpose-built X terminal has a small quantity of NVRAM used to store configuration options and nothing else. In practice, it usually is possible to put even these options in a configuration file stored on the server and downloaded by the terminal on boot. This article takes the purist view that an X terminal should have no persistent storage whatsoever.
I need to save some bootup settings there, such as monitor settings, kernel params, etc., in a situation that I do *not* have a managed thin-client situation.
I have a customer who does *not* want this saved on a server, but who wants to boot through CD's -- no hard disk drives, no flash, no boot ROMs or PXES, no floppies, etc.! Only whatever-else-is-part-of-a-bare-machine and CD-R's are allowed, here....
I also have a great deal of hardware configs, from P-90's to P4-2.5GHz machines, and a wide range of video cards and monitors....
Unfortunately, I have found virtually no information for /dev/nvram. I have done several Google searches, but perhaps I'm not using the correct search criteria.
Can anybody help, here?
You really want to check out
You really want to check out the "A Temporary Internet Lounge" article in the same issue - build your Knoppix disk to contain the stuff you want and not the stuff you don't.
Re: NVRAM? (I actually do need it....)
I have built several custom Knoppix and Morphix (and BeatrIX) CD's over the last year and a half, or so. This is precisely why I need to save my settings somewhere. (I read the "Internet Lounge" article ahwile ago, as well.)
All I have in my customer's machines is CD-R media and I just need a place to hold a few bytes for settings. This is a unique situation where I have no hard disk, no USB device, and I can't save to/load from a server.
Saving it in NVRAM would be ideal. I need maybe 20-30 bytes, or so, but I've heard that NVRAM can do 64-128 bytes, perhaps higher.
Can anybody help?