Differences between revisions 10 and 11
Revision 10 as of 2006-02-05 13:13:52
Size: 10661
Comment:
Revision 11 as of 2006-02-05 13:14:23
Size: 10664
Comment:
Deletions are marked like this. Additions are marked like this.
Line 181: Line 181:
 * [http://people.debian.org/~bubulle/d-i/babelbox/tftpboot.tar.gz dhcp3.tar.gz]: contents of the {{{tftpboot}}} directory  * [http://people.debian.org/~bubulle/d-i/babelbox/tftpboot.tar.gz tftpboot.tar.gz]: contents of the {{{tftpboot}}} directory

/!\ IMPORTANT: This page is still work in progress. Access to demo files is not setup yet as the author needs to clean them up and remove local tweaking.

BabelBox : an automated DebianInstaller testing and demo machine

Principles

Babelbox is a system aimed at demonstrating the automation capabilities of the Debian installer.

It also enhances the high number and the quality of translations currently available for this installer.

For building Babelbox, two machines are needed:

  • a DHCP/TFTP/WWW server with a local mirror of Debian testing
  • a demo machine being able to do PXE boot, with a BIOS allowing to set the boot order to PXE/hard disk

General considerations about the demo machines

Boot server

The boot server serves several purposes:

  • DHCP/BOOTP server for answering the PXE boot requests from the demo machine
  • TFTP server for the distribution of the netboot version of Debian installer
  • WWW server for serving the few files needed at the end of the install on the demo server
  • A FTP server or a web server for hosting and serving the local Debian mirror. This part is not mandatory as the files may be downloaded on Debian official mirrors if the demo machine is connected to the Internet. It is however highly recommended for speed issues as the

demo machine will download a big number of files from the mirror it uses. You should also avoid doing the demo on a connected network because it induces a rather high traffic.

  • A DNS server for the mini-network used between the demo machine and the demo server. The server must be able to perform reverse DNS lookups on the demo machine when the demo machine will connect through SSH at the end of the install
  • A local account is also needed which will be used for interactions between the demo machine and the boot server at the end of the installation

The demo machine

The only requirement for the demo machine is having enough hard disk space for a standard Debian desktop install (or the kind of install which will be automated). It must also have fully supported hardware requiring no special tweaking.

Details of the setup

Boot server

Network

The boot server must be connected directly to the demo machine by a private network. If it hosts a Debian mirror, there is not need for it to be connected on another network. In the example files, the boot server has the 192.168.142.1 address on the private network and the demo machine will have the 192.168.142.2 address.

Changing these addresses requires changing the logger script as well as the .ssh/known_hosts file in ssh-keys.tar.gz.

Local user

A local account with no special privileges must be created on the boot server. In the remaining of this document, this account is named "demo".

Be aware that you will give this account write access to the TFTP boot directory. You are thus advised to secure it properly. Anyway, you are strongly advised to have the demo running on an isolated network segment.

Untar the ssh-keys.tar.gz file in "demo" home directory. This will bring the correct authorized_keys file.

If you prefer, you may create your own keypair rather than using the one in the package file. Be aware to create it without passphrase and to put it in ssh-keys.tar.gz.

This local account will be used when the demo box will complete its install cycle. The SSH connection that is made at the end of the install uses this account to modify the PXELinux file on the fly. It will also be used or logging the demo box activities in a file on the boot server.

DHCP server

The DHCP server must be configured for delivering a dynamic address to the demo machine. It may be a fully dynamic server but be aware that it needs to point its clients to the TFTP server.

You are thus advised to restrict it to the demo machine in order to avoid booting the installer on every machine PXE booting on your network.

The example dhcp3.tar.gz file must be extracted in /etc/dhcp3 on the boot server. You must edit this file and put the correct MAC address for the demo server in the host babelbox section in this file.

TFTP server

The TFTP server must be able to boot Debian Installer. The following assumes that the tftpboot directory is /var/lib/tftpboot.

The following line should appear in inetd.conf:

tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -u tftpd -s /var/lib/tftpboot

(the command line may vary, depending on the host system for the boot server)

The /var/lib/tftpboot directory must be writable by the local "demo" user.

The example tftpboot.tar.gz file must be extracted in /var/lib/tftpboot.

You must then add the kernel file and the initrd.gz file from a DebianInstaller netboot image. The kernel must be put as a file named linux in /var/lib/tftpboot and the initrd file must be named initrd.gz in the same directory.

The key file is the /var/lib/tftpboot/pxelinux.cfg/default file.

You may change the console-keymaps-at/keymap values to the name of the keymap you want to use. This keymap MUST be supported in Debian Installer. You should choose the keymap suited for the keyboard you'll use on the demo machine.

Each entry must have a different "debian-installer/locale" value, suited for the relevant languages.

Create a text file of all languages for the demo, save it as "langlist" in the home directory of the demo user. A sample file with the ?DebiaInstaller supported languages at the time of the first babelbox demo is given in the tftpboot.tar.gz file.

Define the first language entry on the "default" line in the TFTP "default" file.

WWW server

Untar the content of the www.tar.gz file in the root of your web server. This will create a "babel/" directory there, with the needed files. Some may need to be edited to your needs. See below.

This includes a tar file named ssh-keys.tar.gz in the babel/files directory. This file should contain:

  • .ssh/id_dsa
  • .ssh/id_dsa.pub
  • .ssh/known_hosts

The SSH keypair is the one you have created previously. You can use the one offered here, or use your own keypair. The known_hosts file must contain the host public key of the boot server (you can create it by ssh'ing into it once from another machine).

Other files in babel/ are *.cfg files use for preseeding the installer. The main file in the example is "bdesktop.cfg".

Postinstall file

Some tweaking is made in the postinstall.cfg file. Please read this file. It serves several purposes:

  • have a localized GDM login screen. This is hacked by copying /etc/environment over /etc/default/gdm
  • install the "logger" script which will connect to the boot server, switch the TFTP config file for the next language and write a log entry in the demo user home directory. This "logger" script need to be adapted to your local setup, especially the IP address of the boot server.
  • erase the hard disk boot sector and reboot after a delay.

As all this must be done on the installed system and the postinstall.cfg is run from the ?DebiaInstaller first stage, the trick is adding the required comment in /etc/crontab on the installed system and have this run after some delay after the reboot.

Demo machine details

The demo machine must have a network card with PXE boot capabilities. You must setup the boot order of this machine to:

  • hard disk
  • PXE boot
  • other boot

You must of course investigate the graphics card support in case the installer and subsequent X install do not properly set it up.

Running the demo

At the beginning of the demo, the machine should not be able to boot on its hard disk. If a working operating system is installed, you must use its boot menu capabilities to force a PXE boot.

The machine will boot from the network, then receive the D-I kernel image and initrd from the TFTP server, and boot D-I.

The language, country, keyboard questions are preseeded from the kernel command line (see the TFTP "default" file), then the machine gets its IP address from the DHCP server and load the preseeding file.

The first stage of the installer then runs automatically with nice localised messages showing up, the postinstall.cfg file runs a command before the end of the installation and puts the required magic in the installed system /etc/crontab file. GRUB is installed at the end and the machine reboots.

The installed system boots up and reaches the GDM login screen (with a randomized theme). Then, after the delay defined in /etc/crontab by the postinstall.cfg file, the logger scripts connects to the demo server, switches the language for the next install, logs the new install and finally the hard disk first sector is erased and the system reboots.

As the hard disk is not bootable anymore, the PXE boot starts again and the cycle continues...

Sounds

The 2005 Babelbox demo featured an automatic opening of a Gnome session and a nice "welcome" message in the relevant language, contributed by the Debian Women project members and DebianInstaller translators.

This has been removed in the 2006 version because this required too much hacking for a not very spectacular effect (unless you boost the sound very loudly..which becomes quite annoying for other booths).

The original sounds are available in ChristianPerrier [http://www.perrier.eu.org/debian/voices home page].

Material

Thanks

Many thanks to all people who helped setting up the first Babelbox demo at Solutions Linux, Paris 2005. Another Babelbox ran for Solutions Linux 2006, featuring the new graphical installer.

Special thanks to ONERA, the French Aeronautics and Space Research Center, and François Mescam, my boss, for allowing me to use its machines for the demo and spend some time in making it work.

Special thanks as well to all people who contributed the voices for the welcome messages in the 2005 Babelbox setup.

ChristianPerrier February 2005/February 2006