LTSP Part 1 – gPXE

Disclaimer: This is a work in progress blog post. There may be better ways of doing things, and things may have been done wrong. Although I hope you will find this helpful, please don’t take the contents of this post as gospel.

At work we have Ubuntu terminal servers which the students currently connect to using NX on ThinStation in the labs. This is not an ideal setup, especially because the ThinStation kernel is too old to run on (even relatively) modern hardware. It is designed to setup an old computer as a thin client, and allow it to access a terminal server which will do all the hard work.

The other issue which we have is that the network is not owned or managed by my department (computer science), but by the central IT department of the university. This means I do not have access to the DHCP server which is required to PXE boot the computers. On top of this, the computers need to dual boot between the thin client/terminal server and a local installation of Windows.

This is where gPXE comes to the rescue! What gPXE allows me to do is retrieve an IP address from the university DHCP server, and then create my own network boot script completely separately.

LTSP Installation on Ubuntu

This was (relatively) painless on Ubuntu Lucid. As I’m currently just setting up a test server, I used the ltsp-server-standalone package.

sudo apt-get install ltsp-server-standalone

This installs all the relevant packages (including DHCP) to set up a terminal server. Once that had installed I needed to make the thin client OS. Also, as the terminal server is running Ubuntu 64 and the clients are 32 bit, I needed to use the –arch parameter.

sudo ltsp-build-client --arch i386

For some reason I had trouble with the default tftp server (tftpd-hpa), so I ended up installing at atftpd.

sudo apt-get install atftpd

This seemed to solve the problem.

gPXE

The easiest way to test gPXE is to download the ISO from rom-o-matic, burn it to a CD and boot off it. During the boot sequence it tells you to press ctrl+B to enter the console, if you do that you have a minimal CLI.

What I wanted to do was to retrieve an IP from the main DHCP server, and then specify the next-server and boot file (which are normally specified by the DHCP server).

gpxe> dhcp net0
gpxe> set next-server xxx.xxx.xxx.xxx
gpxe> set filename ltsp/i386/pxelinux.0
gpxe> autoboot

Line 1 tells it to retrieve an IP for the network adapted net0. This may differ if you have multiple network cards installed. Line 2 sets where it should go to next (which contains the tftp server location to download the pxe boot image). Line 3 sets the path/filename for the pxelinux boot image which is the default location for aftpd. Finally we tell it to attempt to boot with those parameters.

Problems

As stated at the top, this is still very much work in progress, and I plan to edit it as I find fixes. I am still have trouble with this (as I stated at the top this is work in progress, and will be editing it as I go along). The first is that gPXE has trouble working with a batch of network cards which we have in some of the labs. These cards are on-board Intel 82566DM [8086/104a] (rev 2) network cards. For some reason gPXE cannot interface with them. I am going to try and overcome this by putting other network cards into those machines.

Also, when I boot up, I get the Ubuntu boot screen, which shows it’s connecting to the terminal server, however it then fails with an errror saying

Error: Failed to connect to NBD server

And I get sent to a basic busybox shell.

This (I am hoping) is nothing to do with the gPXE boot, but with the LTSP setup. So I will do further investigation into that and report back.

2 thoughts on “LTSP Part 1 – gPXE

  1. Hello,
    great to find your article.
    I have a somewhat similar problem as I am trying to gpxe connect to ltsp terminal server with some older clients. the reason is that the students still use an old dos program and so I have an autoexec.bat based menu. They can either run that dos thing or loadlin gpxe.lkrn.
    Problem is that loadlin loads fine the gpxe, but gpxe stops after receiving the ip address for the client.

    Any ideas?
    Thx, Csaba

  2. I have the same issue with nbd but do not know any answer for this issue.

    Have you found the problem and solution for this?

    Thanks

Leave a Reply