Next Previous Contents

3. Setup on the server

3.1 Compiling the kernels

RARP support in the kernel of the server will probably be a good idea. You must have it if you will boot without kernel parameters. On the other hand it doesn't help you, if the client isn't on the same subnet than the server.

The kernel for the workstation needs the following as a minimum set compiled in:

If the workstation will be booted without kernel parameters, you need also to set the root device to 0:255. Do this by creating a dummy device file with mknod /dev/nfsroot b 0 255. After having created such a device file, you can set root device of the kernel image with rdev <kernel-image> /dev/nfsroot.

3.2 Creation of the root filesystem

Copying the filesystem

Warning: while these instruction might work for you, they are by no means sensefull in a production enviroment. For a better way to setup a root filesystem for the clients, see the NFS-Root-Client mini howto by Ofer Maor <ofer@hadar.co.il>.

After having decided where to place the root tree, create it with (e.g.) mkdir -p <directory> and tar cClf / - | tar xpCf <directory> -.

If you boot your kernel without LILO, then the rootdir has to be /tftpboot/<IP-address>. If you don't like it, you can change it in the top Makefile in the kernel sources, look for a line like: NFS_ROOT = -DNFS_ROOT="\"/tftpboot/%s\"" If you change this, you have to recompile the kernel.

Changes to the root filesystem

Now trim the unneeded files, and check the /etc/rc.d scripts. Some important points:

Exporting the filesystem

Export the root dir to the work station. See exports(5). You most likely will have to restart the nfsd/mountd after this change. Under RedHat this can easily be done by typing /etc/rc.d/init.d/nfs stop ; /etc/rc.d/init.d/nfs start .

RARP setup

Setup the RARP somewhere on the net. If you boot without a nfsroot parameter, the RARP server has to be the NFS server. Usually this will be the NFS server. To do this, you will need to run a kernel with RARP support.

To do this, execute (and install it somewhere in /etc/rc.d of the server!):

/sbin/rarp -s <ip-addr> <hardware-addr>

where

ip-addr

is the IP address of the workstation, and

hardware-addr

is the Ethernet address of the network card of the workstation.

example: /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

You can also use a symbolic name instead of the IP-address, as long the server is able to find out the IP-address. (/etc/hosts or DNS lookups)

BOOTP setup

For BOOTP setup you need to edit /etc/bootptab. Please consult the bootpd(8) and bootptab(5) man pages.

Finding out hardware addresses

I don't know the hardware address! How can I find it out?


Next Previous Contents