5 Allowing systems to boot across the network (On the server)

Make sure the /etc/inetd.conf file has entries for tftp and bootps. Mine are listed below:

tftp	dgram	udp	wait	nobody	/usr/libexec/tftpd	tftpd /tftpboot
#
# Additions by who ever you are
bootps  dgram  udp  wait  root  /usr/libexec/bootpd bootpd /etc/bootptab

If you have to change the /etc/inetd.conf file, send a HUP signal to inetd(8). To do this, get the process ID of inetd with ps -ax | grep inetd | grep -v grep. Once you have it, send it a HUP signal. Do this by kill -HUP <pid>. This will force inetd to re-read its config file.

Did you remember to note the addr line from the output of the boot loader on the diskless system? Guess what, here is where you need it.

Add an entry to /etc/bootptab (maybe creating the file). It should be laid out identical to this:

altair:\
        :ht=ether:\
        :ha=004001432666:\
        :sm=255.255.255.0:\
        :hn:\
        :ds=199.246.76.1:\
        :ip=199.246.76.2:\
        :gw=199.246.76.1:\
        :vm=rfc1048:

The lines are as follows:

altair the diskless systems name without the domain name.
ht=ether the hardware type of “ethernet”.
ha=004001432666 the hardware address (the number noted above).
sm=255.255.255.0 the subnet mask.
hn tells server to send client's hostname to the client.
ds=199.246.76.1 tells the client who the domain server is.
ip=199.246.76.2 tells the client what its IP address is.
gw=199.246.76.1 tells the client what the default gateway is.
vm=... just leave it there.

Note: Be sure to set up the IP addresses correctly, the addresses above are my own.

Create the directory /tftpboot on the server it will contain the configuration files for the diskless systems that the server will serve. These files will be named cfg.ip where ip is the IP address of the diskless system. The config file for altair is /tftpboot/cfg.199.246.76.2. The contents is:

rootfs 199.246.76.1:/DiskLess/rootfs/altair
hostname altair.example.com

The line hostname altair.example.com simply tells the diskless system what its fully qualified domain name is.

The line rootfs 199.246.76.1:/DiskLess/rootfs/altair tells the diskless system where its NFS mountable root filesystem is located.

Note: The NFS mounted root filesystem will be mounted read only.

The hierarchy for the diskless system can be re-mounted allowing read-write operations if required.

I use my spare 386DX-40 as a dedicated X terminal.

The hierarchy for altair is:

/
/bin
/etc
/tmp
/sbin
/dev
/dev/fd
/usr
/var
/var/run

The actual list of files is:

-r-xr-xr-x  1 root  wheel  779984 Dec 11 23:44 ./kernel
-r-xr-xr-x  1 root    bin  299008 Dec 12 00:22 ./bin/sh
-rw-r--r--  1 root  wheel     499 Dec 15 15:54 ./etc/rc
-rw-r--r--  1 root  wheel    1411 Dec 11 23:19 ./etc/ttys
-rw-r--r--  1 root  wheel     157 Dec 15 15:42 ./etc/hosts
-rw-r--r--  1 root    bin    1569 Dec 15 15:26 ./etc/XF86Config.altair
-r-x------  1 bin     bin  151552 Jun 10  1995 ./sbin/init
-r-xr-xr-x  1 bin     bin  176128 Jun 10  1995 ./sbin/ifconfig
-r-xr-xr-x  1 bin     bin  110592 Jun 10  1995 ./sbin/mount_nfs
-r-xr-xr-x  1 bin     bin  135168 Jun 10  1995 ./sbin/reboot
-r-xr-xr-x  1 root    bin   73728 Dec 13 22:38 ./sbin/mount
-r-xr-xr-x  1 root  wheel    1992 Jun 10  1995 ./dev/MAKEDEV.local
-r-xr-xr-x  1 root  wheel   24419 Jun 10  1995 ./dev/MAKEDEV

If you are not using devfs(5) (which is the default in FreeBSD 5.X), you should make sure that you do not forget to run MAKEDEV all in the dev directory.

My /etc/rc for altair is:

#!/bin/sh
#
PATH=/bin:/
export PATH
#
# configure the localhost
/sbin/ifconfig lo0 127.0.0.1
#
# configure the ethernet card
/sbin/ifconfig ed0 199.246.76.2 netmask 0xffffff00
#
# mount the root filesystem via NFS
/sbin/mount antares:/DiskLess/rootfs/altair /
#
# mount the /usr filesystem via NFS
/sbin/mount antares:/DiskLess/usr /usr
#
/usr/X11R6/bin/XF86_SVGA -query antares -xf86config /etc/XF86Config.altair > /dev/null 2>&1
#
# Reboot after X exits
/sbin/reboot
#
# We blew up....
exit 1

Any comments and all questions welcome.