The LTSP provides a simple way to utilize low-cost workstations as either graphical or character based terminals on a GNU/Linux server. Using the LTSP, you can take very low-end PCs, remove the hard drives and CD-ROMs, and add floppies or bootable network cards. Many network cards have bootrom sockets just waiting for a bootrom to be inserted. During the boot phase, the diskless workstation obtains its IP info and a kernel from the server, then mounts the root filesystem from the server via NFS.
A workstation using the LTSP can be configured in the following ways:
The workstation uses the X-Window System to access applications on the Linux Terminal Server
Multiple telnet sessions are invoked by the client to the telnet server. Users can switch between telnet sessions by pressing Alt+F1 through Alt+F9. However, telnet being an extremely insecure service, the use of this mode is strongly discouraged.
This basically drops the user in a minimalistic bash prompt. This mode is basically a diagonistic or troubleshooting mode that helps debug problems with X or NFS.
Depending on the size of the server and the applications being run, a number of clients can be served by a single Linux server. The LTSP official documentation tells us: "It's not unusual to have 40 workstations, all running Netscape and StarOffice from a Dual PIII 650 with 1GB of ram. We know this works. In fact, the load average is rarely above 1.0!"
Let us now look at how to configure LTSP on a Red Hat 9 server. Perform all the underlined steps as root
The packages required for LTSP are available at ltsp.org. To start, you will need the following packages:
Install the packages as follows:
[root@quaker install_scripts]#rpm -ivh ltspcore-x.x.x.i386.rpm [root@quaker install_scripts]#rpm -ivh ltsp_kernel-x.x.x.i386.rpm [root@quaker install_scripts]#rpm -ivh ltsp_x_core-x.x.x.i386.rpm [root@quaker install_scripts]#rpm -ivh ltsp_x_fonts-x.x.x.i386.rpm
Once the packages are installed, change to the directory /opt/ltsp/install_scripts/ and run the script redhat.sh
[root@quaker install_scripts]# cd /opt/ltsp/install_scripts/ [root@quaker install_scripts]# sh redhat.sh Take a look in /tmp/ltsp.install.log for a complete log of the installation. You now need to change to the /opt/ltsp/templates directory and run the ltsp_initialize script to complete the installation
Now change to the directory /opt/ltsp/templates and run the script ltsp_initialize. Follow the steps as indicated below.
[root@quaker install_scripts]# cd /opt/ltsp/templates/
[root@quaker templates]# ./ltsp_initialize
The Linux Terminal Server Project (http://www.LTSP.org)
About to update important system files. If you would like
to stop and review the changes that are about to be made,
you can cancel now and look at the replacement files that
are about to be installed.
Press <ENTER> to go on, or 'C' to cancel
The Linux Terminal Server Project (http://www.LTSP.org)
The following files will be created/modified:
/etc/X11/xdm/Xaccess The config file to allow remote xdm log [Y]
/etc/X11/xdm/Xservers Config file for xdm to launch local Xse [Y]
/etc/X11/xdm/Xsetup_workstation Sets the logo of your login window [Y]
/etc/dhcpd.conf.example Example config file for dhcp [Y]
/etc/exports The config file for nfs [Y]
/etc/X11/gdm/gdm.conf The config file for gdm [Y]
/etc/X11/gdm/Init/Default The gdm startup script [Y]
/etc/hosts.allow Configuration file for tcp wrappers [Y]
/etc/inetd.conf Config file for inetd [Y]
/etc/inittab Config file for init [Y]
/etc/kde/kdm/kdmrc The config file for kdm [Y]
/etc/X11/xdm/ltsp.gif The background logo for your login [Y]
/etc/rc.d/rc5.d/S60nfs Startup links for nfs [Y]
/etc/rc.d/rc5.d/S13portmap Startup links for portmapper [Y]
/etc/rc.d/init.d/syslog Startup script for syslogd [Y]
/etc/xinetd.d/tftp Enable the tftp daemon [Y]
/etc/X11/xdm/xdm-config The main config file for xdm/kdm [Y]
Ready to apply the changes? ( R-Review, A-Apply, C-Cancel )
The Linux Terminal Server Project (http://www.LTSP.org)
Doing the update
Xaccess.tmpl
Saving old /etc/X11/xdm/Xaccess as /etc/X11/xdm/Xaccess.2
Xservers.tmpl
Saving old /etc/X11/xdm/Xservers as /etc/X11/xdm/Xservers.2
Xsetup_workstation.tmpl
Saving old /etc/X11/xdm/Xsetup_workstation as /etc/X11/xdm/Xsetup_workstation.1
dhcpd.tmpl
Saving old /etc/dhcpd.conf.example as /etc/dhcpd.conf.example.1
Creating new dhcpd.leases file
Saving old /etc/exports as /etc/exports.2
gdm.conf.tmpl
Saving old /etc/X11/gdm/gdm.conf as /etc/X11/gdm/gdm.conf.2
gdm_Init_Default.tmpl
Saving old /etc/X11/gdm/Init/Default as /etc/X11/gdm/Init/:0
hosts.allow.tmpl
Saving old /etc/hosts.allow as /etc/hosts.allow.2
inetd.tmpl
Saving old /etc/inetd.conf as /etc/inetd.conf.1
inittab.tmpl
Saving old /etc/inittab as /etc/inittab.2
kdmrc.tmpl
Saving old /etc/kde/kdm/kdmrc as /etc/kde/kdm/kdmrc.2
ltsplogo.tmpl
Saving old /etc/X11/xdm/ltsp.gif as /etc/X11/xdm/ltsp.gif.1
nfs.tmpl
Saving old /etc/rc.d/init.d/syslog as /etc/rc.d/init.d/syslog.2
tftpd.tmpl
xdm-config.tmpl
Saving old /etc/X11/xdm/xdm-config as /etc/X11/xdm/xdm-config.2
Bingo!! That sure does take care of a lot of stuff! Now all we need to do is perform some minor changes to a few configuration files. The first file I usually modify is /etc/dhcpd.conf.
In this example, I assume a server with IP address 192.168.100.13 and a diskless workstation which will be assigned the IP address 192.168.100.14 and hostname ws001. This workstation's ethernet card has a MAC address 00:0B:2B:0B:6B:2E. The netmask is 255.255.255.0 and the domain name is gamingheaven.com.
In order to do this, open the file /etc/dhcpd.conf and make it read as follows (rather, change it to suit your setup ;)). This is a recommended minimum configuration:
ddns-update-style ad-hoc;
default-lease-time 21600;
max-lease-time 21600;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.100.255;
option root-path "192.168.100.13:/opt/ltsp/i386";
#The above line specifies where to fetch the root file system from
shared-network WORKSTATIONS {
subnet 192.168.100.0 netmask 255.255.255.0 {
}
}
group {
use-host-decl-names on;
option log-servers 192.168.100.13;
#configuring the first host
host ws001 {
hardware ethernet 00:0B:2B:0B:6B:2E;
fixed-address 192.168.100.14;
filename "/lts/vmlinuz-2.4.9-ltsp-5";
#We need to copy the above file to the tftpboot directory.
}
}
Computers usually love communicating with numbers. Human beings on the other hand prefer names because we find them easier to remember. This is where the file /etc/hosts or DNS comes into play. Theoritically, IP address to hostname mapping should not be required. In an LTSP environment, however, we can't do without it because NFS throws permission errors when the workstation tries to mount the root file system over the network. We just need to add a single line to /etc/hosts describing the workstation, so that surely won't be too painful! In my case the line would look like this:
ws001.gamingheaven.com ws001 192.168.100.14
We now need to edit the global LTSP configuration file /opt/ltsp/i386/lts.conf and perform the following steps. Again, this is a recommended minimum configuration.
SERVER = <your server ip>
In my case, it reads:
SERVER = 192.168.100.13
/etc/dhcpd.conf), you can play with the following options:
For example:
XSERVER = vesa #This forcibly loads the generic vesa driver module for you X-Server
For example, if you have a really old monitor, you could use the following modelines. (Use Ctrl+Alt+KP+ to cycle between the resolutions in the same order as you list them here.)
X_MODE_0 = 640x480 31.5 640 664 704 832 480 489 492 520 +hsync +vsync X_MODE_1 = 800x600 40 800 840 968 1056 600 601 605 628 +hsync +vsync X_MODE_2 = 1024x768 44.9 1024 1048 1208 1264 768 776 784 817 interlace
For example, I use the following line to initialize a Yamaha soundcard on one of my workstations:
MODULE_01 = opl3.o
For example:
PRINTER_0_DEVICE = /dev/lp0 PRINTER_0_TYPE = P
The ltsp_initialize script does a great job handling all the scripts, but makes a the mistake of setting XDM as the display manager for the clients. I personally enjoy the insane eye-candy of GDM. To use GDM, open the file /etc/inittab, scroll down to the line that reads x:5:respawn:/usr/X11R6/bin/xdm -nodaemon and change it to:
x:5:respawn:/usr/bin/gdm -nodaemon
[root@quaker etc] init 5
Making the floppy is usually as simple as downloading the boot image from Marty Connor's http://www.rom-o-matic.net. Marty has done an execellent job with the site: it generates boot images on the fly when you enter your network card chip model. The default configuration usually doesnt need changing. For my Realtek 8139 cards (rt8139), I got the following boot image:
eb-5.0.8-rtl8139.lzdsk
[sumeet@quaker sumeet]$ dd if=eb-5.0.8-rtl8139.lzdsk of=/dev/fd0
Creating boot images with Etherboot involves the following steps:
make bin32/<network-card-name.fd0>
For example, with my RTL 8139 cards I need to execute the following steps
[sumeet@quaker sumeet]$ tar -zxvf etherboot-5.0.8.tar.gz [sumeet@quaker sumeet]$ cd etherboot-5.0.8/src/ [sumeet@quaker src]$ make bin32/rtl8139.fd0
Shutting down a diskless node couldn't be easier. Just press the power switch and walk away. That's it!! Now isn't that easy?