IRIDIA cluster the boot process
The task of maintenance of the cluster is much easier if one knows the boot sequences of the clients. In fact, if the sequences are known, it is easier to find the source of errors and which files should be modified.
There are two kind of clients in the cluster, disk-less (the shelf-cluster) and with-disk (rack cluster). The boot sequence is obviously different for both, and therefore are explained separately.
Diskless boot process
- Step 1
- The clients is switched on. Its ethernet card sends a DHCP request in broadcast on the network. The program in the card's firmware that deals with this is called PXE (PXE is actually one of the standards that can be used to boot, and is developed mainly by Intel. 3com cards, for instance, require different procedures that the one described here in order to receive a kernel to boot.)
The BIOS of the client must be configured in order to enable PXE. Moreover, the card should be set as first booting device.
- Step 2
- majorana receives the requests and start a DHCP dialog with the client. During the dialog, the server tells the client its IP address, its name, the default gateways, name and time servers. Most importantly, it tells to which computer the client should address to receive the kernel (majorana again), which is the file to request (pxelinux.0) and where to find the root image to mount (on majorana).
On majorana, /etc/dhcp.conf or /etc/dhcp3/dhcp.conf. pxelinux.0 is part of the syslinux package.
- Step 3
- The client start a TFTP (Trivial FTP) connection to the server it was told.
- Step 4
- The server receives the TFTP request, starts a TFTP server, and sends pxelinux.0 in /tftpboot/ to the client. The TFTP repository /tftpboot is specified as command line to the TFTP server and is specified in /etc/inetd.conf.
The Debian way to modify this file is by using update-inetd.
- Step 5
- The client receives and executes pxelinux.0, which IS NOT the kernel! It is just a boot loader, like LILO or GRUB, with the difference that it works via network. The client asks the server, via TFTP, the boot configuration file (something like GRUB's menu.lst or LILO's lilo.conf). The file is exepcted to be in a subdirectory called pxelinux.cfg. pxlinux.0 then tries several different filenames, till one of them is found on the server and retrieved. The first one is equal to the IP address of the client converted in hexadecimal (if the IP is 192.168.100.2, then the file name is C0A86402). If it is not found, it continues by taking away the last letter of the name, till a matching name is found (C0A8640, C0A864, etc.). When also the last one fails, it tries with the name default, which actually is the only one present on the server.
- Step 6
- The clients receives and reads theconfiguration file, which specifies the name of the kernel to download and its parameters. The client then execute the last TFTP tranfer to download the kernel.
The name specified in the configuration file must be the name of a file in /tftboot.
- Step 7
- The PXE loads the kernel into memory and executes it. During the boot the kernel re-start the DHCP dialogue to step 1. Then it mounts the NFS directory specified during the dialogue, called nfsroot, on /.
The nfsroot is on majorana, in /var/lib/diskless/simple/root/. The list of exported directories is in /etc/exports.
After each change to this file, the NFS server should be restarted with /etc/init.d/nfs-kernel-server restart.
- Step 8
- The nfsroot contains those files and applications common to all disk-less client. However, each client needs to have some specific and reserved areas for its programs. One example is the /var directory, which contains, among the others, the log files. It is important, in order to fix any problem, that each host has its own log, and therefore the /var directories should be separated. The same applies for /dev, /etc, /tmp. The private directories are on majorana. During the boot, the client mounts its own private directories from the server (The server uses the package diskless, which decided for this division and structure, to manage and maintain all the directories.)
/var/lib/diskless/simple/<CLIENT_IP>/dev, /var/lib/diskless/simple/<CLIENT_IP>/etc, /var/lib/diskless/simple/<CLIENT_IP>/tmp and /var/lib/diskless/simple/<CLIENT_IP>/var.
- Step 9
- The client proceeds with the normal linux boot, activating all the services specified in the default run-level (2).