[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]

FAI Guide (Fully Automatic Installation)
Chapter 3 Preparing booting


Before booting for the first time, you have to choose which medium you use for booting. You can use the boot floppy or configure the computer to boot via network card using a boot PROM, which is much smarter.


3.1 Booting from 3Com network card with boot PROM

If you have a 3Com network card that is equipped with a boot ROM by Lanworks Technologie or already includes the DynamicAccess Managed PC Boot Agent (MBA) software[8], you can enter the MBA setup by typing Ctrl+Alt+B during boot. The setup will look like this:

     Managed PC Boot Agent (MBA) v4.00
     (C) Copyright 1999 Lanworks Technologies Co. a subsidiary of 3Com Corporation
     All rights reserved.
     ===============================================================================
                                 Configuration
     
     Boot Method:                TCP/IP
     Protocol:                   BOOTP
     Default Boot:               Network
     Local Boot:                 Enabled
     Config Message:             Enabled
     Message Timeout:            3 Seconds
     Boot Failure Prompt:        Wait for key
     ===============================================================================
       Use cursor keys to edit: Up/Down change field, Left/Right change value
       ESC to quit, F9 restore previous settings, F10 to save

Set the boot method to TCP/IP and the protocol to either BOOTP or DHCP. I prefer BOOTP because the daemon automaticly reloads its configuration when it's changed. Make a symbolic link from the hostname of your client to the appropriate kernel image in /boot/fai. In the following example the host is called bigfoot. The file installimage_3com is created by imggen and suitable for booting 3Com network cards.

      
     kueppers[~]# cd /boot/fai
     kueppers[~]# ln -s installimage_3com bigfoot


3.2 Booting from network card with a PXE conforming boot ROM

Some network cards (e.g. Intel EtherExpress PRO 100) have a fixed configuration for booting using the PXE protocol. This requires a PXE Linux boot loader an a special version of the TFTP daemon. See /usr/share/doc/syslinux/pxelinux.doc.gz for more information, how to boot such an environment. There are also some mails in the FAI mailing list archive concerning this topic. Sometimes you do not need a netboot image for booting instead you can use the raw kernel image. So, copy the kernel image from the nfsroot to the TFTP directory:

     # cp /usr/lib/fai/nfsroot/vmlinuz-2.2.19 /boot/fai/installimage


3.3 Creating a boot floppy

If your network card can't boot itself, you have to boot via floppy. Use the command make-fai-bootfloppy to create the boot floppy. Since there's no client specific information on this floppy, it's suitable for all your install clients. You can also specify additional kernel parameters for this boot floppy, if desired. There's more help available.

     # make-fai-bootfloppy -h

If you have no BOOTP or DHCP server, supply the network configuration as kernel parameters. [9]


3.4 Collecting Ethernet addresses

Now it's time to boot your install clients for the first time. They will fail to boot completely, because no BOOTP or DHCP daemon is running yet or recognizes the hosts. But you can use this first boot attempt to easily collect all Ethernet addresses of the network cards.

You have to collect all Ethernet (MAC) addresses of the install clients and assign a hostname and IP address to each client. To collect all MAC addresses, now boot all your install clients. While the install clients are booting, they send broadcast packets to the LAN. You can log the MAC addresses of these hosts, if following command is running simultaneously on the server:

     # tcpdump -qte broadcast and port bootpc >/tmp/mac.lis

After the hosts has been sent some broadcast packets (they will fail to boot because bootpd isn't running or does not recognize the MAC address yet) abort tcpdump by typing ctrl-c. You get a list of all unique MAC addresses with these commands:

     # perl -ane 'print "\U$F[0]\n"' /tmp/mac.lis|sort|uniq

After that, you only have to assign these MAC addresses to hostnames and IP addresses (/etc/ethers and /etc/hosts or corresponding NIS maps). With these information you can configure your BOOTP or DHCP daemon (see the section Configuration of the BOOTP daemon, Section 3.5). I recommend to write the MAC addresses (last three bytes will suffice if you have network cards from the same vendor) and the hostname in the front of each chassis.


3.5 Configuration of the BOOTP daemon

An example configuration for the BOOTP daemon is included in FAI. If you have no /etc/bootptab file you can use /usr/share/doc/fai/examples/etc/bootptab as template.

     # /etc/bootptab example for FAI
     # replace FAISERVER with the name of your install server
     
     .faiglobal:\
      :ms=1024:\
      :hd=/boot/fai:\
      :hn:bs=auto:\
      :rp=/usr/lib/fai/nfsroot:
     # rp: $NFSROOT
     
     # your local values
     # sa: your tftp server (install server)
     # ts: your timeserver (time enabled in inetd.conf)
     
     # these are optional
     # ys: NIS server
     # yd: NIS domainname
     # nt: list of NTP servers
     
     .failocal:\
      :tc=.faiglobal:\
      :sa=FAISERVER:\
      :ts=FAISERVER:\
      :T170="FAISERVER:/usr/local/share/fai":\
      :T171="sysinfo":\
      :sm=255.255.255.0:\
      :gw=134.95.9.254:\
      :dn=informatik.uni-koeln.de:\
      :ds=134.95.9.136,134.95.100.209,134.95.100.208,134.95.140.208:\
      :ys=rubens:yd=informatik4711.YP:\
      :nt=time.rrz.uni-koeln.de,time2.rrz.uni-koeln.de:
     
     # now one entry for each install client
     bigfoot:ha=0x00105A240012:bf=bigfoot:tc=.failocal:T171="sysinfo":T172="verbose sshd createvt debug":
     ant01:ha=0x00105A000000:bf=ant01:tc=.failocal:T172="sshd":

Insert one line for each install client at the end of this file as done for bigfoot and ant01. Replace the string FAISERVER with the name of your install server. If the install server has multiple network cards and host names, use the host name of the network card to which the install clients are connected. Then adjust the other network tags (sm, gw, dn, ds) to your local needs.

sm
: Subnet mask

gw
: Default gateway / router

dn
: Domain name

ds
: List of DNS server

T170
Location of the FAI configuration directory

T171
FAI_ACTION

T172
List of FAI_FLAGS; e.g. verbose, debug, reboot, createvt, sshd

T173
Reserved for future use

T174
Reserved for backup devices and backup options; NOT YET USED

The tags for NIS and time servers (yp, yd, nt) are optional. Tags with prefix T (starting from T170) are generic tags which are used to transfer some FAI specific data to the clients. It is important, that T171 (equivalent to variable FAI_ACTION[10]. is set to sysinfo ! Later you can set it to install, in order to start the automatic installation. For more information on all tags see bootptab(5). The list of FAI_FLAGS can be space or comma separated. FAI_FLAGS in bootptab must be separated by whitespace. If you define FAI_FLAGS as additional kernel parameter, the flags must be separated with a comma.

When you have created your bootptab file, you have to enable the BOOTP daemon once. It's installed but Debian does not enable it by default. Edit /etc/inetd.conf and remove the comment (the hash) in the line containing #bootps. Then tell inetd to reload its configuration.

     # /etc/init.d/inetd reload

I recommend to use the BOOTP daemon and protocol for booting because it automatically reloads the configuration file if any changes are made to it. The daemon for DHCP must always be manually restarted after changes to the configuration file are made [11]. Now it's time to boot all install clients again! FAI can perform several actions when the client is booting. This action is defined in the variable FAI_ACTION Be very carefully if you set FAI_ACTION to install. This can destroy all your data on the install client, indeed most time it should do this ;-). It's recommended to change this only on a per client base in the BOOTP configuration. Do not change it in the section .failocal in /etc/bootptab, which is a definition for all clients.


3.5.1 Troubleshooting BOOTP daemon

The BOOTP daemon can also be started in debug modus, if it is not enabled in inetd.conf:

     # bootpd -d7


3.6 Configuration of the DHCP daemon

An example for dhcp.conf(5) is available in /usr/share/doc/fai/examples/etc. Start using this example and look at all options used therein. If you make any changes to this configuration, you must restart the daemon.


3.7 Boot messages

These are the messages, when booting from floppy.

     LILO Loading FAI-BOOTP.
     Uncompressing Linux... OK, booting the Kernel.
     Linux version 2.2.19 (root@kueppers) (gcc version 2.95.2 20000220
     .
     .
     .

The rest of the boot message will be equal to those when booting from network card. When booting from network card you will see:

     BOOTP.
     TFTP....
     Linux Net Boot Image Loader Version 0.8.1 (netboot)
     .
     Uncompressing Linux... OK, booting the Kernel.
     Linux version 2.2.19 (root@kueppers) (gcc version 2.95.2 20000220
     .
     .
     .
     Sending BOOTP requests ..... OK
     IP-Config: Got BOOTP answer from 134.95.9.149
     IP-Config: Complete:
      device=eth0, addr=134.95.9.200, mask=255.255.255.0, gw=134.95.9.254,
      host=ant01, domain=informatik.uni-koeln.de, nis-domain=informatik4711.YP,
      bootserver=134.95.9.149, rootserver=134.95.9.149, rootpath=/usr/lib/fai/nfsroot
     .
     .
        ------------------------------------------------------
          FAI 2.2.3, 15 november, 2001
          Fully Automatic Installation for Debian GNU/Linux
     
          Copyright (c) 1999-2001, Thomas Lange
                  lange@informatik.uni-koeln.de
        ------------------------------------------------------
     
     Calling task_confdir
     Kernel parameters:auto rw root=/dev/nfs
     Defining variable: root=/dev/nfs
     Sending BOOTP request using device eth0
     /fai mounted from kueppers:/usr/local/share/fai
     Calling task_setup
     .
     .
     Calling task_action
     FAI_ACTION: install
     Performing FAI installation. All data may be overwritten !
     .
     .
     Press <RETURN> to reboot or ctrl-c to execute a shell

When the copyright message is shown, the install client has mounted the nfsroot[12] to the clients root directory /. This is the whole filesystem for the client at this moment. When /fai is mounted, the configuration data from the install server is available on the client.

Following error message indicates, that your install client doesn't get an answer from a BOOTP server. Check your cables or start the bootpd(8) daemon with the debug flag enabled.

     Sending BOOTP requests ........ timed out!
     IP-Config: Retrying forever (NFS root)...

If you get the following error message, the install kernel has no driver compiled in for your network card.

     IP-Config: No network devices available
     Partition check:
      hda: hda1 hda2 < hda5 hda6 hda7 hda8 >
     Root-NFS: No NFS server available, giving up.
     VFS: Unable to mount root fs via NFS, trying floppy.
     VFS: Insert root floppy and press ENTER

Then you have to compile a new kernel has a driver compiled in, which supports your network card. This driver must no be a kernel module. To compile the new kernel, start using the default kernel configuration of FAI.

     kueppers# cd /usr/src/kernel-source-2.2.19
     kueppers# cp /usr/lib/fai/nfsroot/boot/config-2.2.19 .config
     kueppers# make menuconfig

Call make menuconfig and add the driver in menu Network device support/Ethernet which supports your network card. Then create a Debian package using make-kpkg(8):

     kueppers# make-kpkg clean
     kueppers# make-kpkg --revision BOOTP2 kernel-image

This command creates the file /usr/src/kernel-image-2.2.19_BOOTP2_i386.deb. Adjust the variable KERNELPACKAGE in /etc/fai.conf and rebuild the nfsroot.

     kueppers# make-fai-nfsroot

After that, you have to create a new boot floppy. Now your network card should be recognized and the install kernel should mount the nfsroot successfully. More information how to compile an install kernel can be found in the README of the package fai-kernels.


3.8 Collecting other system information

Now the clients have booted with FAI_ACTION set to sysinfo. Type ctrl-c to get a shell or use Alt-F2 or Alt-F3 and you will get another console terminal, if you have added createvt to FAI_FLAGS. Remote login is available via the secure shell, if sshd if added to FAI_FLAGS. The encrypted password is set with variable FAI_ROOTPW in /etc/fai.conf and is default to "fai". You can also log in without a password when using SSH_IDENTITY. To log in from your server to the install client (for eg. named ant01) use:

     > ssh -l root ant01
     Warning: Permanently added 'ant01,134.95.9.200' to the list of known hosts.
     root@ant01's password:

You have now a running Linux system on the install client without using the local hard disk. Use this as a rescue system, if your local disk is damaged or the computer can't boot properly from hard disk. You will get a shell and can execute various commands (dmesg, lsmod, df, lspci, ...). Look at the log file in /tmp. There you can find much information about the boot process. All log files from /tmp are also written to the install server into the directory ~fai/ant01/sysinfo/[13]

A very nice feature is, that FAI mounts all filesystems it finds on the local disks read only. It also tells you on which partition a file /etc/fstab exists. When only one file is found, the partitions are mounted according to this information. Here's an example:

     ant01:~# df
     Filesystem   1k-blocks    Used Available Use% Mounted on
     /dev/root      1249132  855648    330032  72% /
     /dev/ram0         3963      36      3927   1% /tmp
     kueppers:/usr/local/share/fai
                    1249132  855648    330032  72% /fai
     /dev/hda1        54447    9859     41777  19% /tmp/target
     /dev/hda10     1153576      20   1141992   0% /tmp/target/files/install
     /dev/hda9       711540      20    711520   0% /tmp/target/home
     /dev/hda8       303336      13    300191   0% /tmp/target/tmp
     /dev/hda7      1517948   98252   1342588   7% /tmp/target/usr
     /dev/hda6       202225    8834    182949   5% /tmp/target/var

This method can be used as an rescue environment ! In future it will be possible to make backups or restore data to existing filesystems. If you need a filesystem with read-write access use the rwmount command:

     ant01:~# rwmount /tmp/target/home


3.9 Checking parameters from BOOTP and DHCP servers

If the install client boots with action sysinfo, you can also check if all information from the BOOTP or DHCP daemons are received correctly. If the kernel uses BOOTP requests to receive data, these information will be written to /tmp/bootp.log. If the kernel support the DHCP protocol all is written to /tmp/dhcp.log. And example for the result of a BOOTP requests can be found in The setup routines of the install clients, Section 6.3.


3.10 Rebooting the computer

At any time you can reboot the computer using the command faireboot, also if logged in from remote. If the installation hasn't finished, use faireboot -s, so the log files are also copied to the install server.


[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]
FAI Guide (Fully Automatic Installation)
Version 1.3.1 for FAI version 2.2.3, 15 november 2001
Thomas Lange lange@informatik.uni-koeln.de