Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2010 23:10:59 +0100
From:      Erik Norgaard <norgaard@locolomo.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: diskless & dhclient
Message-ID:  <4BA7EAF3.6050208@locolomo.org>
In-Reply-To: <5e91cf2e1003221335x4afb161ib9fd565b97beb20a@mail.gmail.com>
References:  <5e91cf2e1003221335x4afb161ib9fd565b97beb20a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22/03/10 21:35, Mats Lindberg wrote:

> I've tried to get my freebsd diskless system to get hold of some of the
> dhcp-options.
> E.g. my dhcp-server will always be the nfs-server as well. So I was hoping
> to create the /etc/fstab with the the dhcpd's ip as the nfs server.
> Thus not needing to have the hard coded nfsroot:/conf/'ip-address'/etc.
> Instead i'm looking for having almost all necessary files in the
> nfsroot:/conf/base/etc directory.

you only need /conf/'ip-address' if you need different configurations 
for different clients. The ip-address is that of the diskless client, 
not the server.

> I've tried to set ifconfig_ETHDEV="DHCP" in /etc/rc.conf and creating a
> bourne shell script /etc/dhclient_enter_hooks, but as far as I can detect
> the script is never run.
>
> I guess since the kernel already got the ip-address during pxeboot it does
> not care about renewing the ip-address, or??

No, when the client detects it is a diskless client, 
/etc/rc.initdiskless is executed. See documentation in that file. 
Anyway, iirc you can find the dhcp options with kenv(1).

BR, Erik

-- 
Erik Nørgaard
Ph: +34.666334818/+34.915211157                  http://www.locolomo.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA7EAF3.6050208>