LTSP on Ubuntu Intrepid mini-HOWTO

Linux Terminal Server Project (LTSP) is a free and open source add-on package for Linux that allows many people to simultaneously use the same computer (see Wikipedia). This mini-HOWTO will guide you though the installation and configuration procedure for deploy LTSP on Ubuntu Intrepid.

If browse though my blog you may found that I am a native Debian user, so why Ubuntu? Well, I try to fork similar setup within Debian Lenny, but found that using Ubuntu Intrepid is much more suitable:

  1. Ubuntu's LTSP is working with Network Block Device (NBD, see Wikipedia), where Debian still working with NFS. With this new handling client boot up time is boosted up in most cases.
  2. Ubuntu's LTSP boot image is working with SquashFS (see Wikipedia), where Debian's working with traditional format (well, sorry that I forget its format...). Moreover, Ununtu's LTSP boot image coming with additional benefit that you don't need to regenerate boot image every time after configure the lts.conf.
  3. Ubuntu's LTSP DHCP configuration file is pointed to /etc/ltsp/dhcpd.conf and DHCP server will ONLY use it for override /etc/dhcp/dhcpd.conf if there exists (check /etc/init.d/dhcp3-server for more information). In case of Debian you need to manually backup and configure your existing dhcpd.conf for LTSP.
  4. Ubuntu's LTSP + rDesktop run very smooth, where for Debian it become buggy. I try to compare their configuration files but can't figure out the reason...

Long story short: as Ubuntu coming with LTSP embed within their design, the support status are much handy and complete. IMHO, forget Debian in this case :S

Prepare your Ubuntu Intrepid

According to Edubuntu's suggestion you should install LTSP with special installation CD and procedure, but according to my experience what you need is just a normal Ubuntu Desktop installed. So download and install Ubuntu Desktop as usual.

You will at least required for a functional X.org installed, with one NIC. Edubuntu also suggest you to have 2 NIC for your LTSP server, but again that is not a must for me :D

Install LTSP for Ubuntu Intrepid

Open a console and run the following commands. This will change your connection as root, upgrade your system into latest stable, and install all packages required for LTSP:

sudo su - aptitude update && aptitude full-upgrade aptitude install ltsp-server-standalone

Configure DHCP server

LTSP is highly depended on DHCP server. From /etc/ltsp/dhcpd.conf you can find a demo setup as reference. Change it according to your network requirement.

Here is my setup as references:

# # Default LTSP dhcpd.conf config file. # authoritative; subnet 10.1.4.0 netmask 255.255.255.0 { range 10.1.4.220 10.1.4.250; option domain-name "example.com"; option domain-name-servers 10.1.2.34; option netbios-name-servers 10.1.2.34; option broadcast-address 10.1.4.255; option routers 10.1.4.254; next-server 10.1.4.10; # get-lease-hostnames true; option subnet-mask 255.255.255.0; 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"; } }
Where IPs for:
  • 10.1.4.0: Subnet for LTSP.
  • 10.1.4.220-250: IPs for LTSP clients.
  • 10.1.4.10: LTSP and DHCP server.
  • 10.1.2.34: DNS and WINS server.

Don't forget to active your DHCP server in /etc/default/dhcp3-server:

INTERFACES="eth0"

Restart your DHCP server with:

/etc/init.d/dhcp3-server restart

Boot a client from this subnet (but don't configure it with PXE bootable), and check if it can obtain a new IP successfully.

Build LTSP client environment

This is very simple, what you need is ltsp-build-client. BTW, if download the Ubuntu from US server, the speed is quite depend on your region, so we can use the following command (again, change .hk according to your region):

ltsp-build-client --mirror http://hk.archive.ubuntu.com/ubuntu

After that you LTSP client environment will install under /opt/ltsp/i386. You may even chroot into it and upgrade/install packages if required (but don't forget to run mount -t proc proc proc after chroot, or else apt/aptitude will complain for that).

Every time after update your client environment, don't forget to run the following commands in order to keep your LTSP up-to-date:

ltsp-update-kernels ltsp-update-image ltsp-update-sshkeys

Boot diskless client with PXE

Once your server is ready, you can now move to your diskless clients. For a diskless client we are only required for: CPU, 128MB RAM, display card and monitor, keyboard and mouse, and a network connection. Even harddisk, floppy and CDROM are useless.

Boot your client and go into its BIOS configuration page. Setup your client with network bootable (most likely PXE boot for modern PC) and first boot with PXE. Save your changes and exit the BIOS configuration.

After reboot your client should boot from PXE, get root file system from LTSP server, start a Ubuntu, and display a X login screen with LDM. Great, you get it :D

Encore: directly boot client with rDesktop

With normal LTSP setup your client will finally boot with LDM, remotely log into your LTSP server, and running all application within server. So can't we boot the diskless client with rdesktop support, and connect to a remote Windows 2008 server with terminal services supported automatically? Yes, you can.

Configure your /var/lib/tftpboot/ltsp/i386/lts.conf as below:

[default] RDP_OPTIONS = "-a 16" RDP_SERVER = 10.1.4.20 SCREEN_02 = rdesktop

Where IPs for:

  • 10.1.4.20: Windows 2008 Server with terminal service supported.

Once client boot with PXE, rDesktop will be load (instead of LDM) and automatically connect to your Windows 2008 Server. Now you will have diskless client with Windows terminal service supported :D

Well... Windows 2008 Server with terminal services support will be another story... Hopefully I will blog it soon... Research in progress :S

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.