Voodoo Network Booting Environment

Authors: Risto Järvinen, Joni Nevalainen
Thanks: Tommi Saranpää / Veijo Kylaverkko, Heikki Lindroos, Mikko Ikola

This document details the Voodoo Network Booting environment as it has been implemented in the Otaniemi Campus network, Trinet.

A boot server is implemented as a virtual server running Ubuntu 8.04 LTS. The service has a fixed DNS name, voodoo.kyla.fi in this case. Failover can be implemented to cover that particular name. Most clients don't maintain permanent connections to the server.

Each client is furnished with a network interface card (NIC) with gPXE boot-ROM, with integrated script containing instructions to boot from the voodoo boot server.

gPXE is an enhanced implementation of PXE stack. Main differences exploited here are the ability to integrate instructions to ROM image, ability to resolve DNS names, ability to download images with HTTP. Also due to open source nature of the project, a simple fallback mechanism was added. See chapter network boot scripting.

For simple webterminals, a dedicated Linux distribution, Tiny Core Linux, is used. For more general terminals, Thinstation/LTSP is used with full Ubuntu Desktop.

Tiny Core Linux

Tiny Core Linux (TC) is a very small (starting from around 10MB) Linux desktop distribution. It's based on a recent kernel (2.6), busybox and TinyX. It's small enough to be network-booted and ran wholly from RAM. Since it's still a "complete" distribution, applications like web browser will run on the terminal (as opposed to running them on the server, like with X-terminals). This will allow the system to scale far better.

Only apparent drawback of using TC is that TinyX is lacking on hardware acceleration support (not an immense problem). This could be fixed at expense of using more RAM.

To use TC as laundryterminal we did the following modifications:

  • Copied fi-latin1.kmap from kmaps.tce package to the main initrd.
  • Copied Opera from opera.tce package to the main initrd.
  • Added .opera directory and prefilled data to /etc/skel on the main initrd, to skip the license popup and to set the homepage of the browser.
  • Edited JVM config to ignore common window control key combinations (/etc/skel/.jwmrc-keys)
  • Added command line parameters to select fi-latin1 keymap.
  • Added script to start opera at fullscreen. (included in .xsession)
  • Added boot-time configuration script that updates the browser homepage based on terminal location. (/usr/bin/homepage.sh, ran in .xsession)
  • MAC-address to homepage mappings are stored in /var/www/boot/locations.txt

Changes to TC are integrated to the initrd image using commands described in:

	http://wiki.tinycorelinux.com/tiki-index.php?page=Remastering

Netboot Scripting

The integrated gPXE script for each client is as follows:

#!gpxe
dhcp net0
chain http://voodoo.kyla.fi/boot/${net0/mac}.gpxe
chain http://voodoo.kyla.fi/boot/default.gpxe

Individual boot scripts can then be stored using MAC addresses as identifying parameter. If no MAC-based script is given, default script is ran instead. gPXE script integration is done with compile flag EMBEDDED_IMAGE, as follows: make EMBEDDED_IMAGE=myscript.gpxe

In order to facilitate fallback with chain commands, the following patch must be applied to gPXE.

diff -u -r gpxe-0.9.7/src/hci/commands/image_cmd.c gpxe-0.9.7.new/src/hci/commands/image_cmd.c
--- gpxe-0.9.7/src/hci/commands/image_cmd.c     2009-03-02 04:23:42.000000000 +0200
+++ gpxe-0.9.7.new/src/hci/commands/image_cmd.c 2009-08-20 12:32:00.000000000 +0300
@@ -232,7 +232,7 @@
        int rc;

        if ( ( rc = imgfetch_core_exec ( NULL, IMG_EXEC, argc, argv ) ) != 0
)
-               return rc;
+               return 0;

        return 0;
 }

This will make gPXE continue running even if a "chain" command fails, instead of bailing out of the boot process.

Server-side scripts are in style of:

#!gpxe
kernel http://voodoo.kyla.fi/linux/vmlinuz
initrd http://voodoo.kyla.fi/linux/initrd
boot

Kernel boot command line parameters can be added after the kernel line.

In addition to these low-level tweaks, the tinycore system was modified to customize terminal settings and to hook in the terminal identity, which is also loaded from the network, so that the system uses a single system image.

Adding terminals

Adding terminals to the system needs few steps:

  1. Ensure the hardware is compatible with the image.
  2. Add the terminal MAC address to the system files at /var/www/boot
    1. Each MAC address should have a 01:23:45:67:89:0a.gpxe symbolic link that points to the configuration (kernel+image) it should run. If no such link is given, default.gpxe is falled back on.
    2. agents.txt contains list of identities to set the web browser ident string by: format is "macaddress idstring".
    3. locations.txt contains list of identities to set the web broweser homepage by: format is "macaddress url".

And that's it. Do remember to double-check the MAC addresses. If there are multiple matching entries in any of the files, it probably will cause mayhem to the system. Fix the files and reboot associated terminals.


Otaniemi Recycling Center

Moving Service otettu pois näkyvistä 4.12.2014/AR * Moving service

Info

* Waste electronics recycling guide * Requesting or Donating Items

PmWiki

edit SideBar