[linux-fai] bootp, tftp and boot ROMs and boot floppies

Thomas Gebhardt gebhardt at HRZ.Uni-Marburg.DE
Mon Jun 5 15:15:22 CEST 2000


Hi,

just want to contribute my 2 cents to the advantages and
disadvantages of the different boot methods provided by fai.

The ecological niche where linux-fai made its first steps
was a rather homogenous cluster of PCs in an academic
environment. The potential of fai will hopefully make
it far more widespread. Fai will be

1. used to set up personal workstations with rather different
   hardware.

2. used to set up and restore Linux boxes in students PC
   rooms (a rather hostile environment).

3. used to install Linux on the fly on a remote PC somewhere
   in the campus, just to give Linux a try.

4. used in environments where the sysad has no direct access to
   the configuration of network services such as bootp/dhcp

5. included in the debian distribution.

Different environments will need different strategies, so we should
try to remain as flexible as we can. While using boot ROMs perfectly
makes sense in #2, it will not be useful in #3. Especially #5 will
make it necessary to make fai run in very different circumstances
and to provide a default configuration with a basic functionality
on an average PC hardware (I consider this to be a hard task!)
The hurdle that a fai newbie has to take should be made as low
as possible. IMHO this means that it should always be possible
to use fai without bootp/tftp/boot ROMs without hassle. Most
people will start using fai booting from floppy. When they start
to love it and they need it, then they can add bootp services
and burn Boot ROMs.

In order to take a step into that direction, I can contribute
a "mini howto" on the creation of a FAI Boot Floppy:

--------------------------------------------------------------

1. Make a kernel image that fits your personal needs. I suggest
to make a .deb package with the kernel-package provided by
the debian distribution. Select the following options (the
sections refer to the configuration scheme of kernel 2.2.15) :

 * Floppy disk support (in section "Block devices"); you may not
   compile it as a module since you will boot from the floppy

 * RAM disk support (section "Block devices")

 * IP: kernel level autoconfiguration (section "Networking options")
 *     BOOTP support (section "Networking options")

 * NFS filesystem support (section "Network File Systems")
 * root filesystem on NFS (section "Network File Systems")

 * be sure to include the appropriate ethernet card driver(s)

2. Insert an empty floppy. Since we will use LILO to boot from the
   floppy, we will need to make an ext2 filesystem on the floppy:

# mke2fs /dev/fd0

3. Install the previously built kernel on the floppy:

# mount -t ext2 /dev/fd0 /floppy
# cd /floppy    
# dpkg --fsys-tarfile /tmp/kernel-image-2.2.15_custom.1.0_i386.deb | tar xvf -

4. Make a symbolic link from /vmlinuz to your kernel and copy
the boot block:

# ln -s boot/vmlinuz-2.2.15 ./vmlinuz
# cp /boot/boot.b /floppy/boot/

5. Make a dummy NFS boot device in /dev:

# mknod /dev/boot255 c 0 255

6. Prepare a lilo.conf file somewhere (e.g. in /tmp). Here is my choice:

boot=/dev/fd0
root=/dev/boot255
install=/floppy/boot/boot.b
map=/floppy/boot/map
vga=extended
append = "nfsroot=<ip address of fai server>:/usr/lib/fai/nfsroot"
delay=10
compact
image=/floppy/vmlinuz
        label=FAI-nfsroot
        read-only

This will work in my environment where the basic network configuration
(but not the additional fai parameters) are provided by bootp/dhcp.
This is convenient because I can use the same boot floppy for every
PC that I want to install. If you do not have bootp/dhcp you can
hardcode the network configuration as an additional kernel parameter:
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
(for additional information see Documentation/nfsroot.txt in your kernel
sources).

BTW: We use Lilo as a boot loader rather than writing the raw kernel
image to the floppy because this gives us the possibility to supply
additional kernel parameters.

7. Make the floppy bootable with Lilo:

# lilo -C /tmp/lilo.conf

8. Unmount the floppy:

# cd /; umount /floppy

9. Make the floppy read-only and try to boot. Hopefully it works :-)
   Apart from installation I use this floppy as a "rescue floppy"
   whenever I cannot boot from disk anymore or when I do not want
   to touch the local hard disk (i.e. fsck on /).

---------------------------------------------------------

Kind regards, Thomas




More information about the linux-fai mailing list