Setting Up Your Own Diskless Workstations with LTSP - page 2
The Whys and Wherefores of LTSP
First of all, we need to download the software from the developer's site. Minimum packages include:
- ltsp_core-3.0.5-0.i386.rpm - LTSP package itself
- ltsp_kernel-3.0.4-0.i386.rpm - linux kernels for booting workstations
- ltsp_xcore-3.0.1-1.i386.rpm - X-Windows for workstations, version 4x
If you are planning to use very old PCs, you may need to download a few additional packages with X-Windows 3.3.6 with optimization for our existing video cards.
For sound support on the workstations we will need the package ltsp_sound-3.0.1i386.tgz. But, personally, I do not recommend turning sound on unless you absolutely have to--sound will quickly chew up network bandwidth.
Also, before installing LTSP we need to pre-install dhcp, tftp-server, and nfs-utils.
So, let's begin:
rpm -ihv ltsp_kernel-3.0.4-0.i386.rpm ltsp_core-3.0.5-0.i386.rpm ltsp_xcore-3.0.1-1.i386.rpm
If you do not have GNOME pre-installed (or, to be more exact, the gdm manager), you may see the next error message:
chmod: getting attributes of '/opt/ltsp/templates/gdm_Init_Default.tmpl': no such file or directory
This is normal and you can ignore it.
Before the next step in the process, check the value of the environment variable PATH. You must have /sbin and /usr/sbin be included in it. If these values are not there, run the following command:
export PATH=$PATH:/sbin:/usr/sbin
Now you can execute the LTSP setup:
cd /opt/ltsp/templates ./ltsp_initialize
The following message will appear:
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. Pressto go on, or 'C' to cancel
Press Enter. The program will display a file list, in which you make neccessary changes:
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/hosts.allow Configuration file for tcp wrappers [Y] /etc/inittab Config file for init [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/sysconfig/syslog Startup info 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 )
Pressing A and Enter will get you this displayed message:
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.1 Xservers.tmpl Saving old /etc/X11/xdm/Xservers as /etc/X11/xdm/Xservers.1 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 exports.tmpl Saving old /etc/exports as /etc/exports.1 hosts.allow.tmpl Saving old /etc/hosts.allow as /etc/hosts.allow.1 inittab.tmpl Saving old /etc/inittab as /etc/inittab.1 ltsplogo.tmpl Saving old /etc/X11/xdm/ltsp.gif as /etc/X11/xdm/ltsp.gif.1 nfs.tmpl portmap.tmpl syslog.tmpl Saving old /etc/sysconfig/syslog as /etc/sysconfig/syslog.1 tftpd.tmpl xdm-config.tmpl Saving old /etc/X11/xdm/xdm-config as /etc/X11/xdm/xdm-config.1
The startup configuration of this package is now complete. Let's configure the DHCP server now.
First, using your preferred text editor, edit the file /etc/dhcpd.conf.example. In this configuration file you will see an example of configuration for network 192.168.0.0/255.255.255.0. You need to change these examples to actual values used in your own network.
In the line options root-path
address you will need to set the server address from which your diskless workstations will boot.
If you already have a DHCP server in your network, you will need to modify its configuration like in the example file above.
An important argument in this configuration is option log-servers. It needs to be set to the IP address
of the computer where all the workstations' log files will be stored. Most likely is will be the IP address of your main server.
You will also need to pay attention to the argument host ws001 {}. The number of them should be the same as
number of workstations in the network, because these are individual environment
settings for each workstation. After the keyword, the host name of workstation should be set.
Next, set the IP address of each workstation, along with the file name of the kernel for each unit. For instance, the ltsp_kernel-3.0.4-0.i386.rpm package value of the file name will be /lts/vmlinuz-2.4.18-ltsp-1.
Now, execute the DHCP server with the command:
service dhcpd start
The configuration of the syslog has already been done by the script ltsp_initialize. We just need to reload it:
service syslog reload
An important and necessary requirement is a properly configured /etc/hosts file (and/or a good configuration of DNS). IP addresses, which will be allocated for each workstation, should be associated with domain names. Otherwise we will have problems with NFS, which is used for supporting access from the workstation to the central network server.
It's time to configure xfs (X-Windows font server). One could argue that each station could have its own package with fonts, but from my point of view, the proper solution will be a centralized font server.
To accomplish this, comment out the line no-listen = tcp in the file /etc/X11/fs/config and reload the xfs service"
service xfs start
Make sure you perform an actual restart, not a reload, or xfs will not handle network requests properly.
Also, we need to finish configuring NFS. In file /etc/exports fix these lines:
/opt/ltsp/i386 192.168.0.0/255.255.255.0(ro,no_root_squash) /var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0(rw,no_root_squash)
by correctly setting your own network addresses.
In the next step, you will configure /opt/ltsp/i386/etc/lts.conf. In this file all of the settings for the workstations are stored. In the first block of arguments are the default settings.
[Default]
SERVER = 192.168.0.254
XSERVER = auto
X_MOUSE_PROTOCOL = "PS/2"
X_MOUSE_DEVICE = "/dev/psaux"
X_MOUSE_RESOLUTION = 400
X_MOUSE_BUTTONS = 3
USE_XFS = Y
LOCAL_APPS = N
RUNLEVEL = 5
All of these arguments are understandable by their names, but here's a brief explanation:
- SERVER - host address with which all diskless workstations will be working. Also this address will be default for the font server and log server, if these names are not set.
- XSERVER - X-server (as application) that will be executed on workstations. By default this is autodetected. For xFree 4x, we can set the name of the loadable module. For XFree 3.3.6, this value is the name of the X server (for example, XF86_SVGA)
- X_MOUSE_PROTOCOL - type of mouse.
- Microsoft - for mouse, which is connected via COM-port
- PS/2 - for mouse which is connected via PS/2 port.
- X_MOUSE_DEVICE - device to which mouse is connected. For example, for COM1 it is /dev/ttyS0, for COM2 - /dev/ttyS1, for PS/2 - /dev/psaux
- X_MOUSE_BUTTONS - number of mouse buttons (2 or 3).
- USE_XFS - to use or not to use font server. We have to set Y - to use font server.
- LOCAL_APPS - will be Y only when we need to execute applications on a local workstation. It also requires the package ltsp_local_apps be installed.
- RUNLEVEL - 5 for graphic console.
The next blocks consist of individual descriptions and detailed settings for specific workstations and are named after the workstations. Everything inside these blocks will override all default values.
[ws001]
XSERVER = auto
LOCAL_APPS = N
USE_NFS_SWAP = N
SWAPFILE_SIZE = 48m
RUNLEVEL = 5
Notice there are two new lines here, as compared to the default settings.
- USE_NFS_SWAP - to use or not swap file on network partition. If we have at least 64Mb RAM on our workstation we can set it to N (do not use).
- SWAPFILE_SIZE - swap file size, in case if we will use it.
In the case of a workstation, on which we do not have anything except the kernel and X-server and nothing more will be executed--we will not need a lot of memory. That's why you will only need swap only if the workstation's RAM is very small or some applications are executed locally. I suggest not using swap; it works too slowly, and it overloads network a lot.
We also have a few very useful arguments, X_MODE_0, X_MODE_1, X_MODE_2, and so on, which help set screen resolutions:
X_MODE_0 = 800x600
X_MODE_1 = 1024x768
This will set the screen resolution to 800x600 during boot process, and will set the resolution to 1024x768 by pressing Ctrl-Alt-Plus.
A full list of arguments you can use in lts.conf are described in the file lts.conf.readme, which I recommend you peruse.
If you are using X Window on the server we need to modify the file /etc/X11/xdm/Xservers and uncomment the line
:0 local /usr/X11R6/bin/X
And, to crown it all, do not forget to set the X server to runlevel 5. This way NFS and xdm (gdm, kdm) will both be started.
- Skip Ahead
- 1. The Whys and Wherefores of LTSP
- 2. The Whys and Wherefores of LTSP
- 3. The Whys and Wherefores of LTSP
- 4. The Whys and Wherefores of LTSP
- 5. The Whys and Wherefores of LTSP
- 6. The Whys and Wherefores of LTSP
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.