From owner-freebsd-current@FreeBSD.ORG Mon Jun 8 12:58:07 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC9D1065678; Mon, 8 Jun 2009 12:58:07 +0000 (UTC) (envelope-from mister.olli@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA1A8FC12; Mon, 8 Jun 2009 12:58:00 +0000 (UTC) (envelope-from mister.olli@googlemail.com) Received: by fg-out-1718.google.com with SMTP id 22so1033405fge.12 for ; Mon, 08 Jun 2009 05:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=2JfEHAc/pWLfH4RYo11qkev4YFCyzL1sWT9HaQcJTmc=; b=gOaHd/pqmjE3z7nCMNYv6+QIF6BpfNnl8EZTOtzHbm1HysJD948FmaNH3D4n9l3OQh nHDvTjfcfXHsecG3bxQcs+DneIl4jeNZuFtKGfzB/vSQgrqrga7whRs7zeGdDIveImpy +wmJSwxZ1nY6NiaYBsQs21CAq2vJQyfqMyMxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=GQSVg6PWEmImfKz/eFCnPhL+IyYSPt2vvCOTm1BOEQ2i/2azrnTxNsY8rTISOo+wCv SkqOeebfkPDfjhT7OCXUKdjUKQ4+rPeHLgmHZCZAuSX3WnQD71FdzDEZNUcS8wpaqW/h r4deD9IwgolYDkqtuBFFtKiv2Y2eA/Y5rvW9I= Received: by 10.86.59.18 with SMTP id h18mr7192059fga.44.1244465879167; Mon, 08 Jun 2009 05:57:59 -0700 (PDT) Received: from ?192.168.220.101? (Yb1a7.y.pppool.de [89.60.177.167]) by mx.google.com with ESMTPS id 12sm228411fgg.15.2009.06.08.05.57.57 (version=SSLv3 cipher=RC4-MD5); Mon, 08 Jun 2009 05:57:57 -0700 (PDT) From: Mister Olli To: Bob Bishop 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> Content-Type: text/plain Date: Mon, 08 Jun 2009 14:57:52 +0200 Message-Id: <1244465872.12252.39.camel@phoenix.blechhirn.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, "freebsd-questions@freebsd.org" Subject: Re: Assign IP address and hostname via kernel parameter X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mister.olli@googlemail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 12:58:08 -0000 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 > > > >