Building the LTSP Server for PXE Boot Thin Clients on Ubuntu 24.04

Building the LTSP Server for PXE Boot Thin Clients on Ubuntu 24.04

In Part 1, we introduced the design for a centralized Linux thin client solution using LTSP, LDAP, NFS, XFCE, Google Chrome kiosk mode, and Apache Guacamole.

In this second part, we will build the LTSP server that allows client machines to boot from the network using PXE and iPXE.

This article focuses on the LTSP server foundation. The goal is to prepare an Ubuntu 24.04 server, install LTSP, configure network boot services, generate a client image, and test the first PXE boot.

LDAP authentication, shared user home directories, desktop behavior, kiosk mode, Guacamole, security hardening, and Ansible automation will be covered in later parts of this series.

What We Are Building in This Part

The LTSP server will provide the boot environment for thin clients.

A client machine will power on, request network boot information, load iPXE, receive the LTSP boot menu, and start the Linux client environment from the LTSP server.

The basic boot flow looks like this:

Thin Client
     |
     | PXE boot request
     v
Network DHCP server
     |
     | IP address assignment
     v
LTSP Server with Proxy DHCP
     |
     | iPXE boot files
     v
LTSP Client Image
     |
     v
Linux desktop login screen

This setup uses a proxy DHCP model. That means the existing router or DHCP server can continue assigning IP addresses. The LTSP server only provides the network boot details needed by PXE clients.

This is useful when you do not want to replace the current DHCP service in an office, classroom, or lab network.

Why Use LTSP

LTSP provides an integrated solution for network booting Linux clients using iPXE, image management, and centralized configuration. Compared to manually combining PXE, TFTP, NFS, and boot scripts, LTSP simplifies deployment and maintenance by managing these components together.

For more details, see:
https://ltsp.org/docs/

Why Use Proxy DHCP

Proxy DHCP allows integration into existing networks without replacing the current DHCP server. This avoids disruption and reduces the risk of configuration conflicts.

Why Use dnsmasq

dnsmasq provides proxy DHCP, TFTP, and optional DNS in a single lightweight service. Alternatives such as ISC DHCP and standalone TFTP servers require more complex configuration.

Important note: On Ubuntu 24.04, dnsmasq can conflict with the system’s native DNS resolver (systemd-resolved). By default, systemd-resolved listens on port 53, which dnsmasq may also attempt to use if DNS functionality is enabled.

In this LTSP setup, dnsmasq is only used for proxy DHCP and TFTP, not DNS. The LTSP helper (ltsp dnsmasq) configures dnsmasq in proxy DHCP mode, which avoids DNS binding. If needed, explicitly disable DNS:

sudo nano /etc/dnsmasq.conf

Add or confirm:

port=0

Then restart dnsmasq:

sudo systemctl restart dnsmasq

Why Use iPXE

iPXE supports advanced boot features such as HTTP booting, scripting, and improved hardware compatibility compared to traditional PXE firmware.

Why Use NFS

NFS is used to serve the LTSP client image because it is efficient and well-supported for Linux network filesystems.

Why Use XFCE

XFCE is lightweight and performs well on older or low-resource thin clients.

Why Use LightDM

LightDM is lightweight and easy to configure for thin client environments.

Why Remove Snap

Snap is removed to maintain a consistent APT-based package environment and avoid automatic Snap dependencies.

Target Environment

ItemExample value
Server OSUbuntu 24.04 LTS
Server hostnameltsp01
Server IP address192.168.100.137
Network192.168.100.0/24
Existing DHCP serverRouter or firewall
LTSP modeProxy DHCP
Client boot methodPXE or UEFI network boot
Client desktopBasic XFCE login screen
BrowserGoogle Chrome Stable in a later part
SnapNot used

Replace the sample IP addresses with your own network values.

Ubuntu 24.04 LTS is supported with standard security maintenance until 31 May 2029.

See:
https://documentation.ubuntu.com/release-notes/24.04/

Before You Start

You need:

  • One Ubuntu 24.04 server
  • At least one test client or virtual machine that can boot from PXE
  • A wired network connection
  • An existing DHCP server on the network
  • Internet access on the LTSP server
  • Root or sudo access

Step 1: Prepare the Ubuntu 24.04 Server

Start with a clean Ubuntu 24.04 installation.

Update the system:

sudo apt update
sudo apt upgrade -y

Install basic tools:

sudo apt install -y software-properties-common curl wget gnupg ca-certificates

Set the hostname:

sudo hostnamectl set-hostname ltsp01

Check the IP address:

ip addr

Step 2: Remove Snap from the Base Server

Remove Snap:

sudo apt purge snapd -y
sudo apt autoremove --purge -y

Prevent Snap from being reinstalled:

cat <<'EOF' | sudo tee /etc/apt/preferences.d/nosnap.pref
Package: snapd
Pin: release *
Pin-Priority: -10
EOF

Step 3: Add the LTSP PPA

sudo add-apt-repository ppa:ltsp/ppa -y
sudo apt update

See:
https://ltsp.org/docs/installation/

Step 4: Install LTSP and Required Packages

sudo apt install --install-recommends -y \
  ltsp ltsp-binaries dnsmasq nfs-kernel-server \
  openssh-server squashfs-tools ethtool net-tools epoptes \
  lightdm lightdm-gtk-greeter xfce4 \
  xserver-xorg-core xinit x11-xserver-utils

Add your admin user to epoptes:

sudo gpasswd -a administrator epoptes

Step 5: Configure LightDM for XFCE

sudo mkdir -p /etc/lightdm/lightdm.conf.d
sudo nano /etc/lightdm/lightdm.conf.d/50-xfce.conf
[Seat:*]
greeter-session=lightdm-gtk-greeter
greeter-hide-users=true
greeter-show-manual-login=true
user-session=xfce
allow-guest=false

Restart:

sudo systemctl restart lightdm

Step 6: Configure LTSP Proxy DHCP

sudo ltsp dnsmasq
sudo systemctl restart dnsmasq

Step 7: Generate the LTSP Client Image

sudo ltsp image /

See:
https://ltsp.org/man/ltsp/

Step 8: Generate the iPXE Boot Menu

sudo ltsp ipxe

Step 9: Configure NFS for LTSP

sudo ltsp nfs
sudo systemctl restart nfs-kernel-server

Step 10: Generate the LTSP Initrd Configuration

sudo ltsp initrd

See:
https://ltsp.org/man/ltsp.conf/

Step 11: Check the LTSP Services

systemctl status dnsmasq --no-pager
systemctl status nfs-kernel-server --no-pager
systemctl status ssh --no-pager

Step 12: Boot the First PXE Client

Set client boot order:

Network Boot / PXE Boot first
Disk boot second

The client should reach the LightDM login screen.

Step 13: Create a Temporary Local Test User

sudo adduser testuser

Rebuild:

sudo ltsp image /
sudo ltsp initrd

Step 14: Updating the LTSP Image After Changes

sudo ltsp image /

If configuration changes:

sudo ltsp initrd

Troubleshooting

The client does not get an IP address

Check the DHCP server.

The client gets an IP address but does not boot LTSP

Check dnsmasq.

dnsmasq fails to start

Ensure port=0 is set in /etc/dnsmasq.conf.

The client boots but fails to load the image

Check NFS.

The client reaches the login screen but login fails

Use a local test user.

Changes do not appear on the client

Rebuild the LTSP image.

What We Completed

We built the base LTSP server on Ubuntu 24.04.

What Comes Next

Part 3 will cover centralized authentication and user home directories.

References

LTSP Documentation
https://ltsp.org/docs/

LTSP Installation Guide
https://ltsp.org/docs/installation/

LTSP Manual
https://ltsp.org/man/ltsp/

LTSP Configuration Manual
https://ltsp.org/man/ltsp.conf/

Ubuntu 24.04 LTS Release Notes
https://documentation.ubuntu.com/release-notes/24.04/

Ubuntu Server Documentation
https://documentation.ubuntu.com/server/

Ubuntu Chromium Browser Package
https://packages.ubuntu.com/noble/chromium-browser

Google Linux Software Repositories
https://www.google.com/linuxrepositories/

lordfrancs3

lordfrancs3

Lordfrancis3 is a member of PinoyLinux since its establishment in 2011. With a wealth of experience spanning numerous years, he possesses a profound understanding of managing and deploying intricate infrastructure. His contributions have undoubtedly played a pivotal role in shaping the community's growth and success. His expertise and dedication reflect in every aspect of the journey, as PinoyLinux continues to champion the ideals of Linux and open-source technology. LordFrancis3's extensive experience remains an invaluable asset, and his commitment inspires fellow members to reach new heights. His enduring dedication to PinoyLinux's evolution is truly commendable.

Articles: 49