|
|
Subscribe / Log in / New account

Gentoo and the Linux Terminal Server Project

January 10, 2007

This article was contributed by Donnie Berkholz

The Linux Terminal Server Project (LTSP) makes it easy to set up Linux-based thin clients. It packages up all the necessary software and adds custom-written scripts and packages to make the whole process incredibly easy. But the world of LTSP is changing.

Project MueKow (pronounced "Moo-Cow") is a complete rethink on how to handle the creation and distribution of LTSP. In the current 4.x series, the project builds and packages essentially form an entire Linux distribution. Developers Jim McQuillan and Scott Balneaves realized this doesn't make sense because they only add value to a small proportion of packages—5% would be optimistic. Everything else is simply an additional burden that detracts from the time they can spend on the project's real focus. And from a user and distribution perspective, all those packages outside of the distribution's package management create more opportunities for outdated packages, security holes, and other fun problems. MueKow will become LTSP-5.

Four months ago, LWN briefly referred to a story about the future of LTSP, which inspired your author to start a native Gentoo port. What makes Gentoo a solid platform for LTSP? Its source-based nature gives it a number of benefits. Not only can one infamously customize the optimization flags with which packages are compiled, but one can also decide which features to include and which to exclude. For example, one can choose to leave out Kerberos support in Gentoo. In a binary distribution, packages may link against and depend upon Kerberos unconditionally. With diskless clients, including unnecessary features raises the number and size of files that must be transported across the network. This problem gets increasingly severe as one scales up to more clients. Once the Gentoo port is done, the automated client builder will take care of removing unneeded cruft.

Many people use Gentoo not because it is source-based but because of the power and flexibility of the package manager, portage. One feature that makes portage powerful for embedded setups and diskless clients is its ability to install packages into an arbitrary chroot without requiring that the package manager itself be installed there. A simple command such as `ROOT="/opt/ltsp" emerge packagename` will install that package, all of its run-time (not build-time) dependencies, and package metadata to /opt/ltsp. Software installed in a chroot can later be easily updated or uninstalled using similar commands. This integration of the client chroot with the server installation may be unique to Gentoo.

For a distribution to qualify as LTSP-compliant, the LTSP project defined a set of requirements:

  • Netboot thin clients with PXE and Etherboot
  • Local devices with a FUSE filesystem called LTSPFS
  • Network-transparent sound and video
  • Screen scripts, including XDMCP, ldm/sdm, rdesktop, telnet, shell
  • Boot thin clients with 32MB memory or more
  • Use LTSP tools such as getltscfg
  • Pass VCI (Vendor Class Identifier) string from the client to the server (in initramfs)
  • Transparent pass-through printing
  • Network swap using methods such as NBD, iSCSI or NFS
  • Configurable location of the LTSP chroot tree
  • Control per-client options with a single file, lts.conf

A native LTSP port fulfills the LTSP-5 requirements by adding LTSP-specific packages, porting the automated client builder's distribution-specific plugins, and writing the needed init scripts. Those three steps pretty well take care of the distribution's role in fulfilling the LTSP-5 requirements. The rest is a matter of server configuration. As the packaging and init script porting are fairly trivial once you understand an individual distribution's quirks, we will spend most of our time discussing the client builder. Adding LTSP-specific packages amounts to making a map of the packages installed on an LTSP-4 system, determining which are installed by default, and adding a metapackage to pull in the rest. Many distributions will not have much to port in the init scripts, but Gentoo has a BSD-style, dependency-based initialization process for which the LTSP init scripts will require significant rewriting.

To build a client environment, one runs a script called ltsp-build-client. It creates the chroot, installs the client packages and sets up reasonable defaults. The LTSP client-root builder is a fine piece of work. It's entirely written in shell, and its core is beautifully created so one can simply drop in a new shell-script plugin and have it instantly start working. Each distribution has its own directory for plugins in /usr/share/ltsp/plugins/ltsp-build-client, as a number of tasks are expected to be distribution-specific, but there is a common directory for those few distribution-neutral tasks. Files in the distribution directories can override common files with the same name, and they can use files from another distribution. This is particularly useful in the case of related distributions such as Ubuntu and Debian, both of which already have mostly working LTSP-5 ports. In addition to distribution-level overrides, system administrators can install their own overrides of distribution plugins in /etc/ltsp/plugins/ltsp-build-client.

LTSP has no shortage of interesting projects, such as enhancing support for local devices and selectively running applications on the client rather than the server. To get involved or learn more, join the #ltsp channel on irc.freenode.net or visit the home page.

Index entries for this article
GuestArticlesBerkholz, Donnie


to post comments

Gentoo and the Linux Terminal Server Project

Posted Jan 11, 2007 7:52 UTC (Thu) by ldo (guest, #40946) [Link] (7 responses)

>One feature that makes portage powerful for embedded setups and
>diskless clients is its ability to install packages into an arbitrary
>chroot without requiring that the package manager itself be installed
>there. A simple command such as `ROOT="/opt/ltsp" emerge packagename`
>will install that package, all of its run-time (not build-time)
>dependencies, and package metadata to /opt/ltsp.

How is this fundamentally different from

rpm --root /opt/ltsp ...

?

Gentoo and the Linux Terminal Server Project

Posted Jan 11, 2007 14:46 UTC (Thu) by tetromino (subscriber, #33846) [Link] (2 responses)

rpm is a low-level program for working with individual packages; the Gentoo equivalent of that is ebuild. By contrast, emerge is the high-level package manager which will install all your needed dependencies etc. In the RPM universe, that role is handled by yum and apt-rpm.

The question is, does yum allow you to install some packages into a different root? (I don't run Fedora, so I have no idea.)

using yum to build a chroot

Posted Jan 11, 2007 20:53 UTC (Thu) by scottt (guest, #5028) [Link] (1 responses)

Yum does support installing into a different root directory.

$ yum --help | grep root
--installroot=[path] set install root

There is another tool "mock" that builds rpms which uses yum to create a clean chroot with only the required build dependencies for each package build.

using urpmi to build a chroot

Posted Jan 14, 2007 19:24 UTC (Sun) by Zero_Dogg (subscriber, #31310) [Link]

urpmi too:

[root@wulfgar zerodogg]# LC_ALL=C urpmi --help |grep root
--root - use another root for rpm installation.

Gentoo and the Linux Terminal Server Project

Posted Jan 11, 2007 16:32 UTC (Thu) by dberkholz (guest, #23346) [Link] (3 responses)

An RPM needs to support this for it to work, and my understanding is that many of them don't. Gentoo's ROOT working is mandated by our policy.

Gentoo and the Linux Terminal Server Project

Posted Jan 11, 2007 21:48 UTC (Thu) by ldo (guest, #40946) [Link] (2 responses)

>An RPM needs to support this for it to work, and my understanding
>is that many of them don't.

What does an RPM file need to do to support an alternative installroot? Nothing. The RPM system itself does all the work.

Gentoo and the Linux Terminal Server Project

Posted Jan 12, 2007 1:03 UTC (Fri) by dberkholz (guest, #23346) [Link]

I spent a couple minutes doing research today, and I think I confused RPM's "root" support with its "relocatable" support. Easy enough to do, since I've never used either. =)

Gentoo and the Linux Terminal Server Project

Posted Jan 13, 2007 0:49 UTC (Sat) by emj (guest, #14307) [Link]

What you cant do with yum and apt is to add a --prefix=/opt/gaim/2.4.0 when installing an
application. That's the only good thing about Gentoo.


Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds