HOWTO: Install LTSP on Mandrake Linux 8.1

Version: 1.0.1
Revised: January 16th 2002
Maintainer: Mark Watts

The most recent version of this document can be found in the FAQ section of the Mandrake Mosix Terminal Server Project.

What Is LTSP?

LTSP is the Linux Terminal Server Project.

It provides the 'glue' for allowing Thin Clients (pc's that use no local storage and boot over a network) to boot into a remote X session on a Linux server. All programs are run on the server but all output is sent to the Thin Client. This is a great way of reviving old 486's and low end Pentium class machines.

What will this HOWTO tell me to do?

This HOWTO is designed as a walk-through for installing a basic LTSP system on a Mandrake 8.1 server, and getting a single remote client connected.

What do I need then?

For the client pc, you will need:

        % dd if=/path/to/rom-image of=/dev/fd0 bs=1024
  

For the server pc, you will need:

On the Linux box, the following services need to be installed and started (%service blah start):

        % urpmi tftp-server
        % urpmi nfs-utils
        % urpmi portmap
        % service portmap start
  

We will be making some changes to dhcpd.conf later on so don't worry about starting dhcpd yet

Installing LTSP

Ok, we now need to get the LTSP files to install. These can be obtained from the LTSP download page.

You will need:

Download the files to a suitable directory and unpack them (eg /tmp)

        % tar zxvf ltsp_core-3.0.0-i386.tgz
        % tar zxvf ltsp_kernel-3.0.1-i386.tgz
        % tar zxvf ltsp_x_core-3.0.1-i368.tgz
        % tar zxvf ltsp_x_fonts-3.0.0-i386.tgz
  

Next, change to the 'ltsp_core' directory that has just been created, and run the install.sh script

        % cd ltsp_core
        % sh install.sh
  

It will ask you if you want to use the network settings it suggests, say yes and let the script finish.

Now, change to /opt/ltsp/templates and run ltsp_initialize

        % cd /opt/ltsp/templates
        % ./ltsp_initalize
  

Finally, change to each of the other directories that were created (ltsp_kernel et al) and run install.sh as before.
Assuming you unpacked in /tmp:

        % cd /tmp/ltsp_kernerl
        % sh install.sh
        % cd /tmp/ltsp_x_core
        % sh install.sh
        % cd /tmp/ltsp_x_fonts
        % sh install.sh
  

You have now installed LTSP on your server. Yay! Now we need to configure it.

Configuring LTSP

For this part, we need to modify some files, specifically /etc/hosts, /etc/dchpd.conf and /opt/ltsp/i386/etc/ltsp.conf.

First we'll change /opt/ltsp/i386/etc/lts.conf. Open up that file in your favourite text editor and scroll to the [Default] section. The SERVER variable should ve set to the IP address of the server you are using (192.168.0.1 in our case). You will want to edit this file if you want to add more than one client pc. We will be using 'ws001' as our client. As you can see, this is set to automatically detect the X settings to use and to boot the client into runlevel 5 (graphical login). The settings are fairly self explanitary as you can see.

Now we need to modify /etc/hosts to add the IP addresses of the server and client. The file should look like the following:

        127.0.0.1   localhost
        192.168.0.1 ltsp-server # Or whatever your server name is
        192.168.0.5 ws001
  

Now for the slightly complicated bit. I'll go through my /etc/dhcpd.conf and explain the settings:

        #Sample dhcpd.conf file for LTSP

        ddns-update-style       adhoc;
        default-lease-time      21600;
        max-lease-time          21600;

        option subnet-mask              255.255.255.0;
        option broadcast-address        192.168.0.255;
        option routers                  192.168.0.1;
        option domain-name-servers      192.168.0.1;
        option domain-name              "myltsp.com";
        option root-path                "192.168.0.1:/opt/ltsp/i386";
        #option option-129 code 129 = text;

        shared-network WORKSTATIONS {
                subnet 192.168.0.0 netmask 255.255.255.0 {
                }
        }

        group {
                use-host-decl-names     on;
                option log-servers      192.168.0.1;

                host ws001 {
                        hardware ethernet       00:D0:B7:B0:48:CB;
                        fixed-address           192.168.0.5;
                        filename                "/ltsp/vmlinuz-2.4.9-ltsp5";
                        #option option-129      "NIC=natsemi";
                }
        }
  

The important line is the 'hardware ethernet' line. This should contain the ethernet (mac) address of the network card in the client pc. Use the Rom-O-Matic boot disk to determine what to put in here.

If all goes well, you can start dhcpd now

        % service dhcpd start
  

Now reboot your client pc with the Rom-O-Matic image. You *should* be presented with an X login with the default window manager. Login using an account on the server and enjoy!

Troubleshooting

Of all the things to configure, dhcpd.conf can cause the most problems. If dhcpd fails to start, check in /var/log/messages for the error (dhcpd is good like that). My main problem was to do with missing out a '}' near the end of the file.

LTSP help (if you can't see the answer on the LTSP website) can be obtained in #ltsp or #mandrake-ltsp on irc.openprojects.net

Thanks

Thanks go out to bhsx and habbe from #mandrake and #mandrake-ltsp for assistance in configuring LTSP.