August 10, 2009

LTSP – A great option for setting up a training lab cheaply

I have been working on building a small training lab. The idea is that I will have six thin client pc’s and use my day to day desktop machine as a server. The server will run dhcp and the Linux Terminal Server Project server modules to provide a boot over ethernet (PXE) service for the thin clients. With LTSP I will be able to look at the screens of my trainees and share my screen back with them.

I did the basic install something like this:

sudo apt-get install ldm ldm-ubuntu-themes thin-client-manager-backend \
         thin-client-manager-gnome ltsp-manager controlaula ltsp-server-standalone \
         ltsp-build-client ltsp-server
}}}

I’ve disabled the DHCP functions on my home router and set up my dhcp configuration file like this:

{{{
#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
    # Give any computer requesting an address an IP Address in the range 20 to 250
    range 192.168.1.20 192.168.1.250;
    option domain-name "linfiniti.com";
    # Using open dns prevents phishing attacks and other potential dns based exploits
    option domain-name-servers 208.67.222.222,208.67.220.220;
    # Example of how to give a computer the same IP address each time it connects
    host timbuntu {
      #Always make this computer ip 1
      hardware ethernet 00:22:3f:df:bf:0b;
      fixed-address 192.168.1.2;
    }

    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;

    # For pxe boot

    # next-server 192.168.0.1;
    # get-lease-hostnames true;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}

I did encounter one gotcha when following the instructions at https://help.ubuntu.com/community/ThinClientHowto and that is due to the fact that the server runs x86_64 Ubuntu and the clients are 32 bit. To take care of future clients that may also be 64 bit, I added client support for both architectures like this:

#x86_64
sudo ltsp-build-client
#x86_32
sudo ltsp-build-client --arch=i386

Currently I am using my fit-pc as the thin client, and I will probably look at buying four Acer One Aspire netbooks (going for ZAR 2000 a pop now at Incredible Connection!) for the remaining clients assuming they can do PXE and run at a decent resolution on an external monitor.

I’m still getting things set up and configured, tested etc so I can’t say how well this approach all works out yet. My fallback will be to use NXServer if it doesnt work out, which has the advantage of requiring less configuration to set up and less bandwidth to use, but the disadvantage of not providing all the training room tools like screen takovers and screen sharing. I’ll post more once I have got everything running in earnest to let you know how it works out….