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:
- 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.
- 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.
- Ubuntu's LTSP DHCP configuration file is pointed to
/etc/ltsp/dhcpd.confand DHCP server will ONLY use it for override/etc/dhcp/dhcpd.confif there exists (check/etc/init.d/dhcp3-serverfor more information). In case of Debian you need to manually backup and configure your existing dhcpd.conf for LTSP.- 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-standaloneConfigure 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 restartBoot 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/ubuntuAfter 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 = rdesktopWhere 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


















Hey! Great tutorial! I did
Hey! Great tutorial! I did have a question, though. In your dhcpd.conf file, you mention a "/opt/ltsp/i386/pxelinux.0" file and a "/opt/ltsp/i386/nbi.img" file. I installed all the LTSP stuff, but those are not part of the default package. How do you make those, or where can I find them? Thanks for your help!
After "Build LTSP client environment"
When every thing are ready, they should be there.
----------------------------------------
Edison Wong
They aren't there
Well, the files are not there. Also, I copy'n'pasted your dhcpd.conf, but I get this in syslog:
Apr 17 23:00:29 ltsp-server dhcpd: No subnet declaration for eth0 (10.1.4.10).
Apr 17 23:00:29 ltsp-server dhcpd: ** Ignoring requests on eth0. If this is not what
Apr 17 23:00:29 ltsp-server dhcpd: you want, please write a subnet declaration
Apr 17 23:00:29 ltsp-server dhcpd: in your dhcpd.conf file for the network segment
Apr 17 23:00:29 ltsp-server dhcpd: to which interface eth0 is attached. **
Apr 17 23:00:29 ltsp-server dhcpd:
I made a ubuntu 8.10 amd64 server, and by default it builds amd64 clients. Is there any way to build i386 clients too and serve them?
Found it!
I've found the --arch option :-)
the client doesn't boot
I'm trying this on virtualbox
the "server" has two nics (one bridged to my network, the other goes to an "internal network"). the "client" has only one nic configured as "internal network"
the client finds the kernel and the initrd but then it stops booting. the messages on the client are:
Loading vmlinuz....................
Loading initrd.img..............................ready
IP-Config: eth0 hardware address xx:xx:xx:xx:xx:xx mtu 1500 DHCP RARP
IP-Config: eth0 complete (from 192.168.0.1):
address: 192.168.0.20 broadcast: 192.168.0.255 netmask: 255.255.255.0
gateway: 192.168.0.1 dns0 : 192.168.0.1 dns1 : 0.0.0.0
domain : example.com
rootserver: 192.168.0.1 rootpath: /opt/ltsp/i386
filename : /ltsp/i386/nbi.img
Negotiation: ..size = 175312KB
bs=1024, sz=175312KB
kernel call returned: Broken pipe Reconnecting
Negotiation: ..size = 175312KB
Error: Ioctl/1.1a failed: Bad file descriptor
Do you know what's going on? Thanks
Great tutorial, but i have
Great tutorial, but i have some problem. iam using rdesktop to windows server, but every logoff windows server my computer always back to login screen again. can you halp me? thanks
Hermawan: Just disconnect
Hermawan: Just disconnect your session to windows server. do not log off maybe that works.
Little typo for ubuntu users:
/etc/defaults/dhcp3-server -> /etc/default/dhcp3-server
@Hermawan & Anon: LTSP client
@Hermawan & Anon: LTSP client keep on reconnect due to the setup of LTSP's rdesktop connection script. It contain an endless loop which keep on restart rdeskop whenever it is get killed. Please dig it for more information. I am also searching for some solution.
@Hermawan: Thanks for pointing out. It is now get fixed :D
----------------------------------------
Edison Wong
Post new comment