Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2008 12:59:20 +0200
From:      Danny Braniss <danny@cs.huji.ac.il>
To:        Ulrich Spoerlein <uspoerlein@gmail.com>
Cc:        Luigi Rizzo <rizzo@iet.unipi.it>, current@freebsd.org
Subject:   Re: RFC - per-host configuration of pxe booting 
Message-ID:  <E1L3qCu-000Mma-Mi@kabab.cs.huji.ac.il>
In-Reply-To: <20081122092657.GC1394@roadrunner.spoerlein.net> 
References:  <20081122012351.GA98158@onelab2.iet.unipi.it>  <20081122092657.GC1394@roadrunner.spoerlein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1L3qCu-000Mma-Mi>