From owner-freebsd-current Wed Apr 24 7:46:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from arg1.demon.co.uk (arg1.demon.co.uk [62.49.12.213]) by hub.freebsd.org (Postfix) with ESMTP id 7B05237B41D; Wed, 24 Apr 2002 07:46:29 -0700 (PDT) Received: by arg1.demon.co.uk (Postfix, from userid 1002) id DFA119B27; Wed, 24 Apr 2002 15:45:13 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by arg1.demon.co.uk (Postfix) with ESMTP id DC1AB5D0C; Wed, 24 Apr 2002 15:45:13 +0100 (BST) Date: Wed, 24 Apr 2002 15:45:13 +0100 (BST) From: Andrew Gordon X-X-Sender: To: Danny Braniss Cc: Freebsd Current , Subject: Re: what if/diskless booting In-Reply-To: Message-ID: <20020424144458.J40139-100000@server.arg.sj.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 24 Apr 2002, Danny Braniss wrote: > > i modified libstand/bootp.c to place all the tags - that dhcp provides - in > the kernel > environmet, so that they can be used later - eg in rc.diskless1. > > what if: > we place the rc.conf[.local] there? > in the dhcpd.conf: > option rc-conf "132.65.16.100:/d/4/etc/rc.conf" > and so - automagicaly - > `kenv rc.conf.diskless_root_readonly` > or > kenv | grep rc.conf | sed 's/rc.conf.//' > rc.conf > Note that Luigi has recently committed something similar to create the sysctl kern.bootp_cookie (see /sys/nfs_client/bootp.c rev 1.36). I have also been doing the same thing for some time, but the difference in my version is that I use four separate DHCP options (133,134,135,136 at present, though this isn't important) and concatenate their together onto the end of the (MFS copy of) /etc/rc.conf from rc.diskless1. The reason for using four options is that in the DHCP configuration there are a number of different scopes in which you can put the option assignments, all of which are potentially useful for diskless configuration options. For example, in our setup we have some things that need to be set per-subnet (eg. which servers to use), some that need to be per group{} of machines in the dhcpd.conf (eg. we have one group of 486-class machines that are pure X-terminals, and another of more powerful machines which are allowed to run more services locally), and finally there are some options that need to be set per-machine (eg. which machines need to run lpd because they have a printer attached). Each scope gets its own DHCP option, and then they are all concatenated together onto the end of rc.conf. Before implementing this scheme, we tried to use the /etc/conf/ scheme, but this didn't really scale well. We started with just two classes of hardware, so had two /etc/conf/{IBM,COMPAQ} directories with symlinks for each of the machines of that class, but then as the network expanded we needed per-subnet configuration and the /etc/conf/${ipba} scheme didn't work as we still needed the per-machine-class configuration too. Then we started adding local printers and we now had /etc/conf/{IBM-net10,COMPAQ-net10,IBM-net11,COMPAQ-net11,IBM-net10-printer} etc and then we got some new hardware that wasn't quite the same... With the new scheme, everything is configured in just one place and adding a new machine or a new per-subnet service is easy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message