LTSP (5.2.4-2) on Debian Squeeze (6.0.4)

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

LTSP (5.2.4-2) on Debian Squeeze (6.0.4)

Post by ^rooker »

I'll write a quick light-HowTo about how to install LTSP (Linux Terminal Server Project) on a Debian Squeeze GNU/Linux system.

1) Install basic packages:

Code: Select all

apt-get install openssh-server sudo molly-guard screen
Add your user to the "sudo" group:

Code: Select all

adduser <myuser> sudo
2) Install the LTSP server package:

Code: Select all

apt-get install ltsp-server-standalone
This will pull in several hundreds of megabytes, so it could take a while...

It will ask you which folder you want to use as TFTP root-folder. The default is:
/srv/tftp
which is fine.

NOTE: Due to legacy reasons, LTSP-boot files are also copied the folder "/var/lib/tftpboot", automatically. Unfortunately, they're *real* copies of the files in /srv/tftp - which could lead to confusion during maintenance in the later lifetime of the LTSP-server.

Therefore, it makes sense to replace "/var/lib/tftpboot" with a symlink to "/var/tftp" in order to avoid accidential deltas in these 2 directories:

Code: Select all

cd /var/lib
rm -r tftpboot
ln -s /srv/tftp tftpboot
3) Generate the LTSP client system:
sudo ltsp-build-client

4) Configure audio (pulseaudio):
There's a great documentation about LTSP5-audio on bootpolish.net.

Install the required audio packages on the server:

Code: Select all

sudo apt-get install alsa-base alsa-utils libasound2-plugins pulseaudio pulseaudio-utils padevchooser pulseaudio-esound-compat
In order to forward audio from ALSA to pulseaudio, create the file "/etc/asound.conf", with the following content:

Code: Select all

pcm.!default {
        type pulse
}

ctl.!default {
        type pulse
}
This is necessary, because the LTSP server usually doesn't have a soundcard, but it then behaves like it does - and forwards the audio to the pulseaudio-server on the thin clients.

On the client, the pulseaudio daemon configuration is automatically created by the "ltsp-build-client" command. The generated "/opt/ltsp/i386/etc/pulse/daemon.conf" looks somewhat like this:

Code: Select all

daemonize = 1
high-priority = 1
log-target = stderr
resample-method = trivial
no-cpu-limit = 1
system-instance = 1
disable-shm = 1
5) Configure the NFS share for the client's operating system:
Add a line to "/etc/exports", which shares your "/opt/ltsp" folder via NFS to your network clients:

Code: Select all

/opt/ltsp       192.168.0.0/255.255.255.0(ro,no_root_squash,async,no_subtree_check)
In our case here, the network address to be served is "192.168.0.0/24".
Restart the NFS daemon to apply the configuration changes:

Code: Select all

sudo /etc/init.d/nfs-kernel-server restart
Now, in order to avoid confusion, rage and tears later on, it might be a good idea to verify if the NFS share can be mounted without problems:

Code: Select all

cd ~
mkdir test-nfs
sudo mount -v <IP_of_ltsp_server>:/opt/ltsp test-nfs/
That should mount the LTSP share in "/home/<myuser>/test-nfs". If it does, everything's fine so far, so just unmount it:

Code: Select all

sudo umount ~/test-nfs
More information about NFS for LTSP can be found in the LTSP/Howto on Debian.org Wiki.

6) Configure support for mounting local devices (e.g. USB sticks) on the thin clients:
Again, there's good documentation about LTSP5 and LocalDevices on bootpolish.net.
The most important things here are:
  • Add "LOCALDEV=true" to your LTSP-client configuration in "/opt/ltsp/i386/etc/lts.conf".
  • Make sure that users who will logon to the thin-clients are members of the group "fuse".
  • Make sure that the "fuse" kernel module is loaded:

    Code: Select all

    lsmod |grep fuse
    If that returns a line like this, you're fine:
    fuse 44268 1
  • Verify that the access rights for "/dev/fuse" allow r/w for the group "fuse". It should look like this:
    crw-rw---- 1 root fuse 10, 229 23. Mai 09:56 /dev/fuse
7) Restart the tftp-daemon and the DHCP server:

Code: Select all

/etc/init.d/tftpd-hpa restart
/etc/init.d/isc-dhcp-server
If everything works as expected, you should now be able to boot your first thin-client! :D
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Optional: ntpdate

Post by ^rooker »

As a good client/server relationship always relies on correct date/time settings, it is usually a good idea to synchronize the server's time to some NTP-server - and keep it in sync.

Install "ntpdate":

Code: Select all

sudo apt-get install ntpdate
Synchronize your date/time once manually:

Code: Select all

sudo ntpdate <timeserver>
NOTE: In some environments, the NTP-port may be blocked. If that's the case, make sure your firewall allows connection to ntp servers.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Verify loading of lts.conf on the clients

Post by ^rooker »

In order to verify which parameters from "lts.conf" have actually been loaded, issue the following command in a console on the LTSP client:

Code: Select all

getltscfg -a
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply