CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are human.
  • Create new account
  • Reset your password

User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

Getting a handle on LTSP in Ubuntu Gutsy

Breadcrumb

  • Home
  • Getting a handle on LTSP in Ubuntu Gutsy

Ubuntu Gutsy is the first version of Ubuntu to include LTSP verison 5, MueKow. This new version of LTSP is designed to better be integrated with your distribution of choice, and while LTSP.org provides a source distribution, this is not recommended unless you are rolling your own Linux (e.g. "Linux From Scratch".)

Ubuntu provides a fairly complete set of software but truly abysmal documentation. The following is the result of my thrashing. My goal was to install LTSP completely from CD, with no contact with the internet. This is an indispensible ability, as it theoretically lets you start with a single CD (or DVD) and get an entire office's (or classroom's) worth of systems up and running with thin clients, network installs, remote booting, and so on.

This article will not cover certain elements in depth, like configuring a web server. What we will do is briefly discuss what steps must be taken to achieve this install at all. First, you need to install a web server:

sudo aptitude install apache-mpm-worker

This will install a whole raft of other dependencies, including everything you need to set up netbooting installs and other goodies. I'll touch on that subject briefly. For now all you need to know is that LTSP clients have their roots on NFS and they boot from PXE or BOOTP (PXE uses both DHCP and BOOTP.) In theory, a PC with an ISA NIC with a classic BOOTP-equipped "option ROM" (network boot ROM) can also be an LTSP client. You can also PXE boot using Etherboot, but that requires an ISA or PCI NIC in most cases (no USB.)

Set up the CD-ROM before you install Apache (it's enough to log in and insert the CD, if you haven't messed with autorun) and install Apache from there. Keep in mind that this is not a basic guide to Ubuntu administration. I'm assuming you can perform some basic tasks. I will tell you here to read the manpage for apt-cdrom, though.

Now, we will copy the contents of the CD to the proper location. We could just mount the CD but I had problems that required that I manually rename files - their names were truncated! You might avoid this problem by mounting the CD with the 'nojoliet' option, I haven't tried this yet. Regardless, we want to copy the contents of the CD, which we can do with the 'cp -r' command:

sudo mkdir -p /var/lib/tftpboot/ubuntu
sudo cp -r /media/cdrom0/* /var/lib/tftpboot/ubuntu

If your cdrom is not mounted on /media/cdrom0, copy from wherever it is actually mounted. We will need this directory to be web accessible. We don't really care in this stage if it's available via tftp, but this is valuable for performing remote installs, so this is where I put the files. If you con't care, you can put it anywhere; adjust the paths accordingly in later commands. Here's how we make it web-accessible:

sudo ln -s /var/lib/tftpboot/ubuntu /var/www/ubuntu

If you have filename truncation problems, the proper filenames will show up in /var/log/apache2/error_log as 404 (not found) errors. Go look for the filename that is closest to the 404'd filename (it's just missing a few characters) and rename it, or make a symbolic link as I did:

cd (wherever)
sudo ln -s truncatedfilename originalfilename

Believe it or not, this is all you need to do to create your own install repository, with the possible exception of needing to alter your apache configuration to permit following symlinks ("Options FollowSymlinks", if memory serves. But it probably doesn't.) This repository doesn't allow convenient adding of additional files, but you can create your own update repository easily enough - I'll cover that process later.

Now, we need to configure our local repository, and install the LTSP server. Save your /etc/apt/sources.list file aside for now, and replace it with one with this line:

deb http://192.168.1.42/ubuntu gutsy main

Then execute the following command:

sudo aptitude install ltsp-server

Provided all has been done properly, this will install a whole bunch of packages including the tftp server and so on. Once we've done that we can also use our new repository to create the LTSP client image. This is the root filesystem for the client, which is mounted via NFS. Note that if we do that without making any modifications we will NEED to be online and we will NEED to be able to access the Ubuntu security repositories. Period, THE END. Keep reading below these commands to find out the details.

sudo ltsp-build-client --mirror http://192.168.1.42/ubuntu/

If this process errors out, then the following command will get you back up and moving in the shortest possible time:

( sudo mv /opt/ltsp/i386 /opt/ltsp/i386- && sudo rm -rf /opt/ltsp/i386- ) &

This is necessary because if the process breaks you must start all over again. Don't blame me - I didn't write the ltsp-build-client script.

In the interest of you not having to make too many changes, I'll hip you to what you need to do right now. I went ahead and modified existing files, backing them up first; I'll be looking for a more graceful way to pull this off later. Regardless, right now you should cd to "/usr/share/ltsp/plugins/ltsp-build-client/Ubuntu", the home of the script files which do the actual ltsp client building. Assuming I haven't forgotten any, you need to modify the following files:

  • 010-manage-mirror
    comment out lines beginning with "if [ -f "$sources_list" ]; then" and ending with "add_mirror "$SECURITY_MIRROR" security" by prepending them with the hash ("#") symbol.
  • 010-security-mirror
    comment out the entire file (probably not necessary after tampering with the former file, let me know.)
  • 020-kernel-selection
    if you are on i386, change 'KERNEL_ARCH="i386"' to 'KERNEL_ARCH="generic"' if it isn't already (I might have tampered with this before?) The i386 kernel isn't on the CD, at least not the one I've got. If you're on x86_64, it already selects generic. (Clients just don't need to be 64 bit.)

Any files which are symbolic links would best be copied out to another file, the symbolic link deleted, and the copied file put in its place before any modifications. FYI, this is also what I would do while tampering with the Apache config. It's probably possible to just fork the entire tree and edit that, and perhaps in a future version of this guide I will do so.

howto
netboot
Ubuntu
  • Log in or register to post comments

Footer menu

  • Contact
Powered by Drupal

Copyright © 2026 Martin Espinoza - All rights reserved