Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Jun 2009 14:57:52 +0200
From:      Mister Olli <mister.olli@googlemail.com>
To:        Bob Bishop <rb@gid.co.uk>
Cc:        freebsd-current@freebsd.org, "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Assign IP address and hostname via kernel parameter
Message-ID:  <1244465872.12252.39.camel@phoenix.blechhirn.net>
In-Reply-To: <57A9FCBA-CBCB-45D2-9B95-5E5DBC0DB964@gid.co.uk>
References:  <1241623255.12407.6.camel@phoenix.blechhirn.net> <57A9FCBA-CBCB-45D2-9B95-5E5DBC0DB964@gid.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,


thanks for the hint, this brought me to a (IMHO) good way to accomplish
this.
When using FreeBSD as domU and configuring the kernel in the domU config
file (rather than using pygrub) it's possible to append kernel
parameters, by defining them in the variable 'extras' within the domU
config file.

With 'kenv' I can read them from within the bootet domU, so this should
be just a simple shell script to setup all parameters.

Currently I'm not sure where this script should hook into freebsd's
internas. 
The greatest thing would be having a 'rc.conf' parameter to enable
configuration from the kernel parameters. Setting this to 'true' would
simply fire up the shell script to do all the stuff.

Any suggestions or hints on this???

Regards,
---
Mr. Olli

On Wed, 2009-05-06 at 17:52 +0100, Bob Bishop wrote:
> Hi,
> 
> On 6 May 2009, at 16:20, Mister Olli wrote:
> 
> > is there a way to configure IP address and hostname on freebsd systems
> > via kernel command line parameters? [etc]
> 
> When running diskless, the loader sets kernel variables like:
> 
> boot.netif.gateway="192.168.198.1"
> boot.netif.hwaddr="00:15:17:47:14:fc"
> boot.netif.ip="192.168.198.8"
> boot.netif.netmask="255.255.255.0"
> 
> to values obtained from BOOTP or DHCP, and the right things happen. I  
> guess you could just set these in loader.conf or at the loader prompt.
> 
> --
> Bob Bishop
> rb@gid.co.uk
> 
> 
> 
> 




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