LTSP on ubuntu 16.04 server

LTSP (Linux Terminal Server Project), adds thin client support to Linux servers. Just imagine PCs without a hard drive, running linux over the network. Pretty cool!

So what do we need to accomplish that ?

We just need a DHCP service (with specific options like 66, 67, 17), a linux box running the  LTSP server and some client PCs connected to the same network. You will find many guides on the internet on how to install a LTSP server. All guides install the DHCP server on the same box. Also they are using DHCP proxy etc. My case has a DHCP server working on mikrotik routerOS.

So, in this guide, I assume that my local network is 192.168.1.0/24, my mikrotik device is the gateway of the network and has an interface (ether1) with IP address 192.168.1.1 and my linux box has the ip address 192.168.1.10 and runs ubuntu server 16.04.

Lets set up the DHCP first. On routerOS apply the following

/ip pool add name=lab_pool ranges=192.168.1.11-192.168.1.254
/ip dhcp-server add name=lab interface=ether1 address-pool=lab_pool bootp-support=static
/ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24 dns-server=8.8.8.8 domain=domain.local next-server=192.168.1.10 boot-file-name=ltsp/amd64/pxelinux.0

Now our DHCP server is ready. Lets log in to the linux box and install LTSP server with the following commands. For the server :

sudo apt-get install ltsp-server-standalone

For the client environment :

sudo ltsp-build-client

The above command will install by default an 64bit ubuntu image. If you prefer a 32bit image then run the following :

sudo ltsp-build-client --arch i386

Reboot the server and connect a client PC on the network. Set it up to boot from network. If everything is working correctly, you will see a login screen on the client PC, but you will not be able to login. This is due to a bug on the nbd-server that cannot authenticate clients accessing the network storage and there is no gnome-shell installed on the client image we created.

To overcome the first issue until is fixed, we need to make some changes to files /etc/nbd-server/conf.d/ltsp_amd64.conf and /etc/nbd-server/conf.d/swap.conf. On both files, comment out the following line :

authfile = /etc/ltsp/nbd-server.allow

For the second issue, we have to install gnome in our client image.

You should always follow the procedure bellow if you want to upgrade the client image or install new packages.

So, first we make sure that the variable LTSP_HANDLE_DAEMONS=false is active. This will prevent the server from restarting its own daemons when upgrading the chroot:

export LTSP_HANDLE_DAEMONS=false

Then we chroot to our image and we mount /proc.

sudo chroot /opt/ltsp/amd64
mount -t proc proc /proc

Now we can upgrade or install new packages, like gnome.

apt-get update && apt-get dist-upgrade
apt-get install gnome-shell

Make sure that there are no errors when you install packages. Also you might notice a message like Can not write log, openpty() failed (/dev/pts not mounted?). This is just a cosmetic bug.

After the upgrade or package installation, exit the chroot :

exit

Run the following, if there was a kernel upgrade on the client image.

sudo ltsp-update-kernels

Unmount /proc and rebuild the client image.

sudo umount /opt/ltsp/amd64/proc
sudo ltsp-update-image

Reboot any client PC to load the new image. You can login on the client PC with the user that you log in on the server linux box. On that box you can create more users and they will be able to login from the client PCs. All client data are saved on the linux box, in every user’s home folder.

Good luck!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

6 thoughts on “LTSP on ubuntu 16.04 server

  1. Douglas G. Oechsler

    Hello!
    How are you?

    I am trying install LTSP on Linux Mint 19 64 bits!
    But I need to use with 2 NIC, on is Static and other can be Ltsp DHCP. I tried many configs but various seem to old version Linuxs.
    Can you help me please?

    My scenario:
    I have internet from PFsese (no dhcp) so, the Linux Mint has Static IP and other NIC can be used by DHCP LTSP server, and I have a switch connected at the DHCP NIC (I hope that works) and a Client connected to switch to receive “system”. I can not do working.

    Do Need I install isc-dhcp package? I did read too much and not help me.

    Thanks

    Reply
    1. Douglas G. Oechsler

      Hello!
      How are you
      Thanks for answer

      Yes I want Mint act as dhcp server. I did install dnsmasq package from:
      http://wiki.ltsp.org/wiki/Installation/Ubuntu

      So, I use the commad
      ltsp-config dnsmasq –overwrite # create a usual /etc/dnsmasq.d/ltsp-server-dnsmasq.conf

      At first moment dnsmasq not working, so i uncoment at: /etc/dnsmasq/ltsp-server-dnsmasq.conf
      port=0
      and restart dnsmasq

      My /etc/network/interfaces:
      auto lo
      iface lo inet loopback

      auto enp1s10
      iface enp1s10 inet static
      address 192.168.67.9
      netmask 255.255.255.0

      And my /etc/ltsp/dhcpd.conf
      authoritative;

      subnet 192.168.67.0 netmask 255.255.255.0 {
      range 192.168.67.20 192.168.67.250;
      option domain-name “ltsp”;
      option domain-name-servers 192.168.67.1;
      option broadcast-address 192.168.67.255;
      option routers 192.168.67.1;
      next-server 192.168.67.1;
      # get-lease-hostnames true;
      option subnet-mask 255.255.255.0;
      option root-path “/opt/ltsp/images”;
      if substring( option vendor-class-identifier, 0, 9 ) = “PXEClient” {
      filename “/ltsp/images/pxelinux.0”;
      } else {
      filename “/ltsp/images/amd64.img”;
      }
      }

      Seem something about DNS maybe. The server Ltsp connect Internet but The Client Not.
      I do not Know what to do more. I did read many blogs and Forum to fix it

      Please, can You Help me?
      Thanks attention and help

      Douglas

      Reply
      1. wizzy Post author

        If the thin client boots correctly then the settings are correct. Check on the client the network parameters and routes with ifconfig and ip route. Try to ping 8.8.8.8 from the client. If everything of the above is correct and working, check your firewall logs.

        Reply
        1. Douglas G. Oechsler

          Hello!
          How are you

          Read some foruns and lists seems need enable NAT in deb distros and
          set DNS_SERVER=8.8.8.8 in lts.conf
          and some more things but, still ltsp client not connect internet
          I wiil continue searching the solution

          Thanks attention

          Reply
  2. Shashikant Naik

    Hi
    Thanx for the installation guide.
    I have been using edubuntu for thin client setup
    it was very easy in edubuntu to setup LTSP (its suppoert is discontinued after 14.10)
    since I am not a technical person, do you have any easy instalation guide to setup thin client on Ubuntu 17.10

    Reply
    1. wizzy Post author

      Well, I haven’t use 17.10 yet, so I have no guide available. It is a good challenge to take a look at it but my spare time is limited these days. Maybe in the next few weeks

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *