DHCP and NFSROOT

Chad Walstrom chad at ima.umn.edu
Thu Nov 29 19:39:16 CET 2001


On Thu, Nov 29, 2001 at 06:16:41PM +0100, Bert De Vuyst wrote:
> I 'm trying to set up FAI, but I have a problem with the bootdisks.
> Every time I boot with the FAI-DHCP bootdisk, it finds the DHCP-server
> (and it gets a IP-number) but it doesn't find my NFS root. 

Ah, yes.  I floundered on this for a while.  You can force Linux to look
for the correct NFS root server at the lilo prompt with the kernel
parameter "nfsroot".  This is not very practical, since you could easily
want different clients to go to different servers (as in the BOOTP
protocol, which DHCP extends).

The answer to your dilemma is in the dhcpd.conf(5) manpage.  What you're
looking for is the option called "next-server", which is quite
appropriately named.  It is the "next-server" you want the dhcp client
to look at for the root directory.

Here's the section from dhcpd.conf(5) that explains the difference
between "server-name" and "next-server":

       The server-name statement

        server-name "name";

       The server-name statement can be used to inform the client
       of the name of the server from which it is booting.   Name
       should be the name that will be provided to the client.

Note: the client is "booting" -- getting its IP address.  Next it will
look for it's root/boot file.

       The next-server statement

        next-server server-name;

       The next-server statement is  used  to  specify  the  host
       address  of  the  server  from which the initial boot file
       (specified in the filename statement)  is  to  be  loaded.
       Server-name  should  be  a  numeric IP address or a domain
       name.   If no next-server parameter  applies  to  a  given
       client, the DHCP server's IP address is used.

So this should work:

	# FAI Clients
	group {
		server-name "dhcp.mydomain.tld";
		next-server "nfsroot.mydomain.tld";
		file-name "/usr/lib/fai/nfsroot"
		use-host-decl-names on;

		# other FAI options...

		host myhost {
			hardware address 00:00:00:00:00:00;
			fixed-address myhost.mydomain.tld;
		}
		#...
	}

I hope this helps.  

-- 
Chad C. Walstrom <chad at ima.umn.edu>             http://www.ima.umn.edu
Assistant Systems Manager, IMA                  Phone: 612-624-4353
                                                Fax: 612-626-7370



More information about the linux-fai mailing list