Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2004 10:43:59 -0600
From:      Craig Boston <>
To:        "Reinier Kleipool" <>, <>
Subject:   Re: kernel enviroment in sysctl MIB
Message-ID:  <>
In-Reply-To: <000001c3a6df$60ef28f0$>
References:  <000001c3a6df$60ef28f0$>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sunday 09 November 2003 10:34 am, Reinier Kleipool wrote:
>   I am investigating the possiblilies for looking at the kernel boot
> parameters from within a userland utility. (Possibly a new FreeBSD install
> facility) The idea is that by looking at sysctl kern.environment.* you
> should be able to see the BTX variables. An install program could use this
> to see an variable (etc...) to use as
> install server. The BTX loader could provide these variables at install
> boot time, thus enableing fully automated installs.

I've been using the 'kenv' program for some time to do this.  For my purposes 
it seems to work quite well (have loader display a menu with an option of 
whether or not to start X after bootup).

It seems to do the trick for me -- if you need it from a program rather than a 
shell script you may want to look at the source for kenv(1) to see how it 
gets its information.


Want to link to this message? Use this URL: <>