Chapter 3. Getting Started

Table of Contents
Building the kernel
Configuring BOOTP and TFTP
diskless-newimage: Create/maintain new image/master directory
diskless-newhost: create/maintain new host
Configure /etc/exports

Steps to get going:

  1. Build the kernel.

  2. Configure BOOTP (Someone may use dhcpd, I use rarpd) and perhaps tftp.

  3. Setup the group.

  4. Setup the hosts within the group.

  5. Setting up /etc/exports.

  6. Boot remote NFS system (not described here).

Steps 3 and 4 should be repeated (in that order) whenever the configuration on the masterdir has changed.

All steps should be conducted on the NFS-server (or another computer that has access to the correct directories), unless stated otherwise.

Building the kernel

The kernel should be configured for NFS-ROOT. I think the most important options are:


CONFIG_NET=y
CONFIG_PNP=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
      

Also, recent kernels (since 2.2.16 or somewhere around, and 2.4.x series, and 2.5.x series) do not boot off network by default, a one-line patch is required in net/ipv4/ipconfig.c to change the value of the variable.


	int ic_enable __initdata = 0;                   /* IP config enabled? */
      

In addition, the desired network cards must be compiled into the kernel (ie a module will not work).

The resultant package should be installed onto the root file-system and in a place where it can be loaded by the remote system.

For example, someone used to use (for kernel version 2.1.29):


dpkg -i kernel-image-2.1.129-nfs_1.00_i386.deb
mknbi-linux /boot/vmlinuz-2.1.129-nfs $VAR/boot/linux_2.1.129 -d rom
      

This requires the debian package netboot to be installed.

However, putting the kernel image onto a place reachable by TFTP should suffice.