Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

Using Edubuntu in LTSP Mode

What Is LTSP?

Perhaps one of the most useful features within Ubuntu is the LTSP environment. It’s worth spending a few minutes reading this section to understand exactly what the LTSP system is and what it can do for you. You’ll soon realize its applications are not limited just to education.

LTSP stands for Linux Terminal Server Project. It aims to give the same functionality to current client/server models that were present in the mainframe/dumb terminal setups prevalent many years ago.

How Does LTSP Work?

The LTSP model centers around one powerful machine that acts as a server and several often much lower-powered machines that act as clients. The machines are all connected on a local area network.

This network allows all data required for booting the client’s computer, which is normally held on the client’s hard drive, to be served to the client over the network. If all the data required for booting the computer is provided over the network, the client machine requires no storage media at all, which leads to the term diskless clients.

The Benefits of LTSP

Booting computers in this way does have some distinct advantages over the current preferred model of many powerful desktops, particularly where only a low budget is available.

  • Singular point of administration: Working with this model means that only one computer needs to have new software installed on it. By using the Add/Remove tools as demonstrated later in this chapter, you can make applications automatically available to all clients as they are essentially all using the same machine.

  • Low-cost hardware: Thin client machines are not required to be incredibly powerful since all processing is done by the server. This allows people to use much older hardware for their client machines, often reusing machines that were taken out of service for being sluggish several years ago.

  • Diskless clients: Anyone who has spent time administrating a network knows that often a computer used regularly suffers from corrupt files on the hard disk and needs reinstalling. If a client has no disk, there is no chance of a user corrupting data on the client’s hard drive.

  • Easy replacement: If one of your thin client machines breaks down, you still have all your data stored on the server. Just replace the client hardware and carry on working. It really is as easy as changing a light bulb.

Other Uses

The LTSP system has its uses in many other applications too. Imagine you are running an Internet cafe, where many people use the computers in exactly the same way. Each workstation would need the same set of applications installed. The tasks they are performing are not hugely CPU intensive, so a thin client system is perfectly suited to this type of application. You will also find LTSP solutions very commonly used in information systems (e.g., in airports) and in point-of-sale systems.

LTSP Availability in Ubuntu

The ability to install and configure the LTSP system automatically is available to the user with the Ubuntu alternate CD. Since Edubuntu is no longer available as a live or alternate CD, the LTSP server installation has been moved to the Ubuntu alternate CD. If installation of LTSP is required to an already installed Ubuntu, Kubuntu, or Xubuntu desktop or Ubuntu server, you should follow the instructions provided in the next section.

Installing an LTSP Server

Starting with Ubuntu 9.04, the LTSP installation process has one minor step prior to reading on. The first thing you need to do is acquire the Ubuntu alternate CD. LTSP server installation is no longer provided via an Edubuntu CD because the status of Edubuntu has changed from a distribution to an add-on. Once you have your LTSP server installed and configured, installation of Edubuntu and its applications is the same as previously presented in the “Installing Edubuntu as an Add-on” section of this chapter.

LTSP Server Configurations

The LTSP server install allows a great deal of flexibility and is designed to allow it to fit into any current network configuration. Essentially these fall into two categories: those that use the LTSP server as a primary gateway for all their LTSP clients and those that do not. Let’s take a few minutes to discuss the relative merits of each system.

Using the recommended configuration requires the LTSP server machine to have two network interface cards (NICs). One of these cards is connected to the rest of the network, that is, to the Internet or to other servers on the internal network. The other card is usually connected to a private subnet of the network where only Edubuntu LTSP clients reside. Figure 9-6 shows this two-NIC setup. No network data is routed from the second network card to the first, so client machines must be authenticated on the LTSP server before having access to the Internet or the rest of the network. This makes for a secure network setup.

The benefit to this setup is that client computers cannot connect to the network unless the LTSP server permits them to. This also reduces network traffic on the rest of the network because while the LTSP clients are booting from the LTSP server, data is being transferred only on the private subnet and not on the rest of the network. Also, the clients receive their network addresses from the LTSP server, which frees up addresses on the rest of the network.

Using LTSP as simply another server on a network allows for a more flexible atmosphere. For a start, you require only one network interface card in the server to run using this configuration. The LTSP clients are connected to the normal network and could, assuming they had the capabilities to boot, access the network without the help of the LTSP server. Figure 9-7 shows this one-NIC setup.

The benefits of this setup are that thin clients can be used with more than one OS. One establishment, for example, runs dual-booting Microsoft Windows and Edubuntu clients. This setup also allows users to have their LTSP thin clients receiving their DHCP network addresses from a single network server.

Essentially the choice of network design layout will impact the number of network cards installed in your server. It is primarily this that affects the difference between the standard Ubuntu install and the LTSP install.

The Installation Procedure

The installation procedure from the Ubuntu alternate CD looks very different from that of the desktop CD, but the questions asked are largely the same. The alternate CD is all text based, which can be a little daunting at first, but you will find installing Ubuntu in this way quicker because it doesn’t require the entire desktop session to be loaded.

After the CD has booted, press F4 and select Install an LTSP server, and then select the Install to the Hard Disk option. Confirm by pressing Enter to begin the installation. Notice also the workstation and command-line options at this point.

The first question you are asked simply sets up the language used for the install procedure, as well as the language for the final system. You are then asked to choose your location.

Now you must choose your keyboard layout. The text-based installer has an auto-detection routine that will ask you to press a series of keys on the keyboard. From these keys, the installer can work out which keyboard layout will best suit you. If there are any keyboard variations, these are now presented for you to choose from.

The installer will now load various components. If you have more than one NIC in your computer, you will be asked to choose the primary card for the installation (Figure 9-8). By this, the installer wishes to know which network card is connected to the outside network or the Internet.

If your network has DHCP enabled, this card will be set up with an IP address from the network. You will then be prompted to choose a hostname for the LTSP server. If your network doesn’t have DHCP enabled, you will have to set up the IP address manually.

The next step is to set up the hard disk ready for installation. By far the easiest method here is to select the default option of Guided Partitioning. If you wish to use LVM, please refer to the section on LVM in Chapters 2 and 5. If you require more in-depth partitioning or already have data on the hard drive that you do not want to lose, you will have to plan how you are going to proceed. If you are installing onto a computer that has partitions Ubuntu can resize, it will offer you that option. Doing this will allow you to have two operating systems installed on one computer and to switch between them at bootup. Whichever method you select, you will then be asked to confirm your partitioning choices.

After this, you must choose whether or not your clock is set to Coordinated Universal Time (UTC). Your system clock should be set to UTC. Your OS is then responsible for converting the system time into local time. Unless you have another OS that expects the system time to be the local time, you should answer “yes” here.

Now it’s time to set up the first user on the system. Remember that this user will have full administrative rights. First, enter the user’s full name, then the desired username, followed by the password twice. After this, the base system is installed.

After plowing through several steps, you are presented with a question about screen resolutions. For the type of system you are installing, a very high screen resolution could result in a slow connection between the server and the client. The default options are fine.

When this is completed, the installer begins building the LTSP client root filesystem (Figure 9-9). This is the very small version of Ubuntu mentioned earlier in this chapter. Essentially it consists of just a kernel and an X server.

Once the installation is complete, a prompt will ask you to remove the CD and press Enter to reboot the system into your new Edubuntu server.

Initial LTSP Server Setup

The DHCP server installed on your Ubuntu machine should start up automatically, so all that is left to do is to make your thin clients bootable from the network. If you are using the single network card setup described earlier and your network already has a DHCP server running, do not start the Ubuntu DHCP server, as this will likely cause both DHCP services to be unavailable.

Initial LTSP Client Setup

Modifying a client computer to boot from the network is usually done by altering a setting in the machine’s BIOS. It’s a good idea to look at the manual for the computer’s motherboard to find out how to alter these settings. For most machines it will simply be a case of entering the BIOS by pressing the Delete key at bootup and changing the boot device priority.

Once you’ve set up your client machines to boot from the network card, you should see a screen similar to the one Figure 9-10 shows on each of the clients. This means that the client machine has been issued with a DHCP address and that the PXELinux file has been loaded from the network.

If your client boots up to the graphical login and the screen looks similar to the one shown in Figure 9-11, congratulations—you have successfully set up your LTSP thin client system. If not, refer to the Troubleshooting LTSP section near the end of this chapter.

Switching to Edubuntu If Ubuntu Is Already Installed

Just like Kubuntu, Edubuntu is simply a set of customized packages from the Ubuntu repository. In your chosen package manager, look for the package called edubuntu-desktop. This package will install both the Edubuntu desktop and all the other educational applications required. This step will also install the latest Edubuntu artwork package, which will customize your desktop with the latest educational wallpapers and themes. If you ever need to go back to the Ubuntu desktop for any reason, just install the ubuntu-desktop package and your system will be returned to its pre-Edubuntu-looking state. If you require an LTSP setup, you will have to do a fair amount of manual configuration.

Installing the LTSP Environment in Ubuntu or on a Desktop Installation

Perhaps you already have an Ubuntu machine and wish to make it available in an LTSP setup. To do this is a simple procedure and requires very little configuration. To begin, you must decide whether you require a DHCP server. If so, install the ltsp-server-standalone package. If you already have a DHCP server and are going to configure it to point to the LTSP server, by modifying the filename, next-server, and root-path options, you should install the ltsp-server package. Along with this, you will need the openssh-server package.

The easiest way to do this is to open a terminal window via the Applications > Accessories > Terminal link in the main menu. Once here, you should type the following commands to install the LTSP server and the SSH server. In our example, a DHCP server was not required.

sudo apt-get install ltsp-server openssh-server

All that is left to do now is to install the client chroot by running the following command:

sudo ltsp-build-client

After this, you should be able to boot your first thin client.

Special LTSP Cases

Setting Up LTSP to Coexist with an Existing DHCP Server

Sometimes you might not want your machines to be on a totally separate subnetwork. However, the problem then becomes that the current DHCP server will not be set up to serve the correct options to enable the clients to boot from the network. Modifying a Linux-based DHCP server is well documented; however, some establishments will require the modification of a Microsoft Windows DHCP server to allow network clients to boot from the network.

The following setup assumes that there are currently no thin client systems running on the Windows network. Opening up the Windows DHCP administration tool will allow you to create reservations for your machines. A reservation is an IP address tied to a specific MAC address. In this way, each time a machine requests an IP address from the DHCP server, it is always given the same IP address. This has its benefits as you can then set advanced options for the client as well.

For each client, you will need to create a reservation and then add the following options to each one (Figure 9-12).

  • 017 Root Path:/opt/ltsp/i386
  • 066 Boot Server Host Name: <server ip>
  • 067 Bootfile Name: /ltsp/i386/pxelinux.0

It is recommended that you restart the DHCP server. After this, the clients should be able to correctly pick up their IP address from the server and then boot from the LTSP server via NFS.

Dual-Booting with Another Operating System on the Hard Disk

Perhaps you have a suite of computers that are already happily running another OS, and you would prefer to keep both systems running for a while. Hopefully, after using Edubuntu for any length of time, you will eventually make the switch permanent. In these situations, it is easy to set up the server to allow the client to boot from either the network or the first hard disk in the computer.

The bulk of the editing takes place in the pxelinux.cfg/default configuration file in the directory /var/lib/tftpboot/ltsp/<arch>/. The format of this file is very similar to the old LILO configuration syntax (for those of you familiar with that bootloader). The following sample configuration will present a message to the client, which is explained later. The user can then choose to either allow the system to boot its default configuration, which in this example would be the local hard disk, or to type in the word linux and press Enter, which would load the LTSP thin client.

DEFAULT localboot
DISPLAY display.msg

LABEL linux
   KERNEL vmlinuz
   APPEND ro initrd=initrd.img quiet splash

LABEL localboot

Let’s take a look at the configuration file and break it down so that you can create your own to suit your environment. (If this sample file fits the bill for you, you can skip down to the part about creating the display.msg file.)

The DEFAULT keyword specifies which boot option will be chosen once the timeout expires. The TIMEOUT option specifies how long to wait before booting the default option. This timeout is measured in one-tenth of a second; thus a value of 50 sets it for 5 seconds. The PROMPT option specifies whether the PXE software displays the boot: prompt to enable users to choose an operating system. The DISPLAY option displays a text file on the screen as an introduction. In this case, the file is called display.msg and must be placed in the root LTSP directory, alongside the pxelinux.0 file. An example of this file is proposed a little later.

The three lines starting with LABEL linux define the linux option for booting. This is configured by the KERNEL and APPEND options, which you will notice are extracted from the original default file, as shown here:

DEFAULT vmlinuz ro initrd=initrd.img quiet splash

All that is needed now is the option for booting from the local hard drive, shown by the two lines starting LABEL localboot. These lines define the localboot option as used with the DEFAULT keyword earlier in the file. The only definition included in this option is the LOCALBOOT option, with a parameter of 0. This provides normal hard disk booting. Other parameters are available, as you can see by visiting the Syslinux home page, http://syslinux.zytor.com.

The display.msg file should contain some information that tells the user what to do to choose an operating system. Following is an example file that is suitable for the configuration above. When creating this file, it is suggested to use a number of blank lines before the text actually begins. This has the effect of clearing the screen so that users don’t get confused by the PXELinux start-up text.


                  Welcome to the Multiboot System

                   The system will start in 5 seconds...

       for Linux users type : linux
       at the boot: prompt and press <enter>


After rebooting the client, you should now see the text from the display message file. It should look similar to that shown in Figure 9-13.

  • + Share This
  • 🔖 Save To Your Account