From owner-freebsd-current@FreeBSD.ORG Sat Nov 22 10:59:22 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 156891065670 for ; Sat, 22 Nov 2008 10:59:22 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id B4C748FC08 for ; Sat, 22 Nov 2008 10:59:21 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1L3qCu-000Mma-Mi; Sat, 22 Nov 2008 12:59:20 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Ulrich Spoerlein In-reply-to: <20081122092657.GC1394@roadrunner.spoerlein.net> References: <20081122012351.GA98158@onelab2.iet.unipi.it> <20081122092657.GC1394@roadrunner.spoerlein.net> Comments: In-reply-to Ulrich Spoerlein message dated "Sat, 22 Nov 2008 10:26:57 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 22 Nov 2008 12:59:20 +0200 From: Danny Braniss Message-ID: Cc: Luigi Rizzo , current@freebsd.org Subject: Re: RFC - per-host configuration of pxe booting X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2008 10:59:22 -0000 > On Sat, 22.11.2008 at 02:23:51 +0100, Luigi Rizzo wrote: > > The goal of this email is to figure out how to load host-specific > > configurations from pxeboot -- maybe as simple as loading > > /boot/loader.conf.${hostname} and possibly something slightly more > > flexible that allows me to define machine 'classes' (e.g. based on > > similar hardware configurations etc.). > > > > loader_conf_files="/boot/device.hints /boot/device.hints.${dhcp.host-name} /boot/loader.conf /boot/loader.conf.${dhcp.host-name}" > > > > It might be useful to let dhcp pass more parameters to pxeboot > > so e.g. we can expand it to a 'machine class' which can be used > > for multiple machines. This should be relatively trivial to impelemnt, > > but it requires modifications to the pxeboot binary -- no big deal > > since this is something centralized. > > Hi Luigi, > > while the dhcp host-name is a good start, you should definitely add a > dhcp class-name (vendor-class-identifier) to make it useful for booting > a whole range of thin clients, for example. the bootp.c in ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot sets it to FreeBSD and so in dhcpd.conf: class "freeBSD" { option FBSD.kernel "kernel"; match if substring (option vendor-class-identifier, 0, 7) = "FreeBSD"; option root-path "132.65.16.52:/vol/binary/bsd/amd64/7.0"; vendor-option-space FBSD; option FBSD.rc-conf "conf/rc.conf"; # the following only works if server is FreeBSD #option FBSD.boot-nfsroot-options "nfsv3"; } ... and group { # fbsd-6.1-bsd-i386-u filename "freebsd/pxeboot"; option root-path "132.65.16.112:/d/3"; option FBSD.conf-path="fr-01:/vol/system/share/conf"; option FBSD.rc-conf0 "rc.conf"; option FBSD.rc-conf2 "rc.conf-6"; option FBSD.rc-conf4 "rc.conf-6.1"; host wrap-3 { fixed-address wrap-3; hardware ethernet 00:0D:B9:04:C3:9C; #filename "freebsd/kernel.wrap"; filename "freebsd/pxeboot-r"; option root-path "132.65.16.112:/d/2"; } ... } danny