LTSP Server with Ubuntu 16.04

Reading time ~2 minutes

LTSP Server with Ubuntu 16.04

LTSP Server with Ubuntu 16.04

1 Introduction

LTSP allows computers of a LAN to boot through network from a single server. One of the benefits of this is for example to cut down the administration and maintenance time of a classroom of computers (instead of installing, configuring and updating each of them, we do it only once).

Some details about how it works are described in this article (in case that you are curious):

The Edubuntu LTSP Live is the most easy way to run a classroom with Edubuntu LTSP. But it is a bit outdated (based on ubuntu-14.04). However it is not so difficult to build a LTSP server with the latest Ubuntu desktop.

In my case, all the clients are decent machines with 2GB RAM, and the server is just like them, so I decided to follow the ltsp-pnp approach for fat clients, which is also the most easy to implement. In this method the server is used as a template for the clients, so that almost all the programs, configurations, users, etc. that are installed on the server will be made available to the clients as well (through the network).

Also, the gateway/router of the LAN provides automatic network configuration (DHCP) as well, so I don't have to and I don't want to introduce another DHCP server on the LAN (which may potentially be a source of network problems).

2 Preparing the server

I started by making a standard installation of Ubuntu 16.04 desktop on the server PC, followed by some standard updates/customizations, like:

apt-get update
apt-get upgrade
apt-get install edubuntu-desktop

I tried to install all the programs/tools that should be available on the clients. In particular, one of them is epoptes, which allows remote desktop control for the clients:

apt-get install epoptes
gpasswd -a ${SUDO_USER:-$USER} epoptes

Then, I set a fixed IP address to the server by adding these lines to /etc/network/interfaces:

auto enp0s8
iface enp0s8 inet static

3 Installing LTSP

3.1 Install packages

I installed the package ltsp-server (not ltsp-server-standalone) and the other related packages:

add-apt-repository --yes
apt-get update
apt-get --yes --install-recommends install dnsmasq ltsp-server ltsp-client ldm-ubuntu-theme

3.2 Update kernels

echo 'IPAPPEND=3' >> /etc/ltsp/update-kernels.conf

3.3 Create lts.conf

The command:

ltsp-config lts.conf

creates the file /var/lib/tftpboot/ltsp/i386/lts.conf or /var/lib/tftpboot/ltsp/amd64/lts.conf (depending on the architecture of the server). I did not customize it.

3.4 Configure dnsmasq

The command:

ltsp-config dnsmasq

creates the configuration file /etc/dnsmasq.d/ltsp-server-dnsmasq.conf.

I had to fix a few things in it:

  • I don't want this server to give IP configuration (DHCP), so I commented out this line: dhcp-range=,,8h
  • The line port=0 breaks the name resolution (DNS) in Ubuntu-16.04, so I commented it out as well.

Then service dnsmasq restart

4 Creating the client image

The command:

ltsp-update-image --cleanup /

generates the client image. It may take some time.

Note: Whenever new packages are installed or packages are updated on the server, the image has to be updated as well, in order to make these changes available to the clients.

Date: 2017-01-07

Author: Dashamir Hoxha

Created: 2017-01-07 Sat 00:57

Building SSH Tunnels

Building SSH TunnelsBuilding SSH TunnelsTable of Contents1. Bypass a firewall blocking2. Connect to a database behind a firewall3. Access...… Continue reading

How to Build a Twitter-Bot

Published on March 24, 2017

Linux Guest Account

Published on January 14, 2017