Welcome to the Mandrake/ltsp how-to

This documentation is mostly for Mandrake Linux, version 8.2. It was revised (updated) from the original which was for Mandrake 8.1. Most of it should also apply to earlier versions of Mandrake.

This how-to is made with the newbie in mind, so if you are a more advanced user, please have that in mind.

First off all, let's cover what the ltsp is, and what it can do for you. LTSP stands for Linux Terminal Server, and is a open source solution for running thin terminals with a linux server/system. The goal is to take use of low end hardware as workstations, with the prestanda of a better machine. Sounds like a dream, doesn't it?..heheheh. Well, once you have this system up and running, you will think that you are dreaming.

So, what is it really, and what are you talking about? Thin terminals? What's that? Isn't that what they used to have in companies with a monitor that had a blinking cursor at the bottom off the screen?

Yes, it is what you used to see a long time ago, dumb terminals that run from a big server. BUT, ltsp is like those old systems on steroids, and any other appropriate drug you can think of. Long gone are the monitors with just a blinking cursor on a monochrome screen. Here we are talking about low end (like a 486) running the latest KDE, or any other WM of choise. More so, it will run it at the server cpu speed. It gets even better, you don't even need a harddrive in the workstation. And that is what makes it a dream. So, follow me in this little setup, and you will soon be on your way to fame and fortune (yes, the babes love linux geeks).

Here is what you need

Getting the boot image for the workstation

We are going to start with what can look like the wrong end first. We need a way to boot the workstaion, and since we don't use harddrives, there are two ways of doing this. You can either use a bootrom on the networkcard (from now on we will call the network card a nic!), or from a floppy disk. For this HOWTO, we will make a boot floppy. Why? It is easy to set up, and you don't need any special equipment to make it work. That said, go to rom-o-matic.

At rom-o-matic, you choose the nic your workstation uses, make sure rom output is set to bootable floppy disk, and press "get rom". This will download a rom image to your harddrive. After that, use either dd or cat to copy the rom to the floppy. In my case the dd line is as follows:

		dd if=eb-5.0.4-eepro100.lzdsk of=/dev/fd0

and the cat line is as follows:

		cat eb-5.0.4-eepro100.lzdsk >/dev/fd0

You have to replace the "eb-5.0.4-eepro100.lzdsk with the file you downloaded. You have to have a empty floppy in the drive too, of course;-). If you don't know the driver to get, use google to search for your nic name, and linux kernel module. A search line could look like this: "realtek 8029 linux kernel module drivers", or something similar.

After the dd is done, put the floppy in the workstation to be, and boot up(set bios to boot from floppy first, if it insn't allready). The rom should find your nic, and show you the mac adress of that nic(the ethernet adress).

Setting up Mandrake for ltsp

First you have to install the dhcp-server and tne tftp-server. In mandrake that is easily done by typing the following as root:

	urpmi dhcp-server
	urpmi tftp-server

After that we need to start a few services, mostly the ones we just installed. Here is how that usually is done(remember, this is linux, so there is more then one way to skin a cat):

	service dhcpd start
	service xinetd restart  (tftp server is run through xinetd
	service portmap start
	service nfs start

Install the rpms that you downloaded:

	rpm -ivh ltsp*.rpm
This will install all four packages. The rpm installation process is intelligent enough to know that the _core_ rpm should be installed first.

All done? GREAT! That was pretty simple, wasn't it. ltsp is now installed on your system in the /opt/ltsp directory. During installation it also modified a few small things for you.

Man, we are rocking now! ;-)

The configuration

Start out with a quick jump into /opt/ltsp/i386/etc .Once there edit the file "lts.conf". Use your editor of choice (which of course is vi :-). Change the line that starts with "SERVER =" to the IP address of your server (the box you are installng ltsp on). Comment out all the entries for [ws001] with a # first in all the lines. You might have to use these settings later, but for now, let's leave them commented out. (Note: any time you change this config file, you must reboot any workstations that you want that change to take effect.)

Brief Theory: The "lts.conf" file contains a section at the beginning that contains several settings. This is the "global" section. Any settings made in the global section will affect each workstation unless it is overridden in a specific workstation section. In the default "lts.conf", there are some sample workstation sections. The examples used are "[ws001]" and "[ws002]". More on this near the end of this HOWTO.

The next file to the butcher is /etc/dhcpd.conf.example. Open that file up in a editor, and add the line:

	ddns-update-style none;
just above the default-lease-time. After that, change every instance of the default ip 192.168.0.254 to your server ip. Next remove the /tftpboot/ from the line that looks like this:
	"/tftpboot/lts/vmlinuz.ltsp";
We want to use that filename, but the "/tftpboot" portion of the path does not need to be there. The kernels are located in /tftpboot/lts/. In this case we will use the vmlinuz-2.4.9-ltsp-1. The correct line will look as follows:
	filename	"/lts/vmlinuz-2.4.9-ltsp-1";

Now move down to the ws001 entry. You need to change the hardware ethernet to the mac adress of the network card you will use on the workstation. You see the mac adress on the workstation screen if you boot up with the bootdisk we made earlier. It says Ethernet adress, and is followed by something like "00:E0:06:E8:00:84". Change the ip of ws001 (the workstation number one) to an unused IP for your LAN. For the purposes of this HOWTO, we'll use 192.168.0.42. Save it as dhcpd.conf and exit. This preserves the original dhcpd.conf.example in case you ever want to look at the original again.

More brief theory: With the dhcpd.conf that we just configured, we are pushing the name "ws001" out to whatever machine has the mac address that you configured. The magic line that does this is the "use-host-decl-names on;". When the terminal is booting, it uses the BOOTP protocol to request its network information. The only thing it really knows is the mac address of the card. The dhcp server sends back the answers with the ip address, netmask, and the ip address of the tftp server. Then the floppy image downloads the kernel using tftp and boots the kernel. The rest of the bootup process doesn't differ much from a standard workstation booting, except that the filesystem is mounted using nfs instead of being read from a local hard drive.

That should be it. If you boot your workstation now, you should be greeted with the graphical login screen, one of xdm, kdm, or gdm. Log in and play as much as you want.

Some additional tweaking

If you are running a workstation that is low on RAM ("less then 16mb) you might want to enable the nfs swap. This is done in the file /opt/ltsp/i386/etc/lts.conf. Uncomment the [ws001] that we commented out earlier, and uncomment the "USE_NFS_SWAP =Y" line by removing the "#" sign from the front of the line.

If your X doesn't start, you might have to specify the X server to use in the same file. The format is the same as the line

XSERVER	= sis
Of course you have to change "sis" to the server you want to use. You'll need to study the documenation for XFree86 for more information. This document does not attempt to cover that material.

If X starts up but the cursor just sits in the middle of the screen (you don't get a login screen), then you almost certainly are not running xdm/kdm/gdm on your server. As root, run one of the three (I like kdm myself) but typing 'kdm' and pressing enter -OR- just switch to runlevel 5 by typing 'init 5' as root. Runlevel 5 is the graphical login mode. Reboot the workstation and it should get to the login prompt this time.

For additional help you can join the ltsp irc channel and ask us there. Here is a quick how-to on how to get to that channel.

And most important, visit the ltsp page for additional doc's and news

That's it for today, feel free to contact me either by habbe@ltsp.org, or by visiting the #ltsp channel on irc.openprojects.net



Author: Michael Habbe

Rev 1: Todd Lyons (adjusted mostly technical content, preserving the original author's style)