From owner-freebsd-current Tue Apr 23 23:19:47 2002 Delivered-To: freebsd-current@freebsd.org Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.10]) by hub.freebsd.org (Postfix) with ESMTP id C83A137B41B; Tue, 23 Apr 2002 23:19:34 -0700 (PDT) Received: from pampa.cs.huji.ac.il ([132.65.80.32] ident=danny) by cs.huji.ac.il with esmtp (Exim 3.35 #2) id 170G7o-0002Dy-00; Wed, 24 Apr 2002 09:19:32 +0300 X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: obrien@FreeBSD.ORG Cc: Robert Watson , Terry Lambert , Freebsd Current Subject: Re: diskless booting In-Reply-To: Message from "David O'Brien" of "Tue, 23 Apr 2002 10:40:40 PDT." <20020423104040.A2524@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 24 Apr 2002 09:19:32 +0300 From: Danny Braniss Message-Id: 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 Tue, Apr 23, 2002 at 08:32:51PM +0300, Danny Braniss wrote: > > > On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > > > > diskless_root_readonly="NO" # Make it "YES" for readonly > > > > > > good. > > > > > > > diskless_etc_localmd="NO" # Make it "YES" to have the > > > > # diskless environment md-mount and replicate /etc from /conf > > > > > > Seems the "if [ -d ]" tests in rc.diskless are OK already. If we add > > > this knob, then a knob should also be added for the source of the files > > > rather than assuming /conf/etc or /conf/{client}/etc. In other words > > > either really engineer this to make diskless properly configurable, or > > > have the minimal number of knobs, etc. > > > > nice, but impractical, because of the chicken and egg problem, or in other > > words, the load/over-write of rc.conf[.local] happens a bit later ... > > Please explain farther what is impractical and where the chicken-and-egg > problem is. I rc.diskless1 already has: > > if [ -d /conf/default/etc ]; then > ..snip.. > if [ -d /conf/${i}/etc ]; then in rc.diskless1 is where the decision is made about /etc, /tmp, /var. the mount is done some lines before the test. i guess a first run could be made, before the actual mount: ... echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" for i in ${bootp_ipbca} ${bootp_ipa} ${hostname} ; do if [ -d /conf/${i}/etc ]; then if [ -r /conf/${i}/etc/rc.conf ]; then . /etc/defaults/rc.conf ... IMHO, the solution is a bit of klduge :-), and sort of breaks the KISS principle. danny To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message