Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2002 09:19:32 +0300
From:      Danny Braniss <danny@cs.huji.ac.il>
To:        obrien@FreeBSD.ORG
Cc:        Robert Watson <rwatson@FreeBSD.ORG>, Terry Lambert <tlambert2@mindspring.com>, Freebsd Current <current@FreeBSD.ORG>
Subject:   Re: diskless booting 
Message-ID:  <E170G7o-0002Dy-00@cs.huji.ac.il>
In-Reply-To: Message from "David O'Brien" <obrien@FreeBSD.ORG>  of "Tue, 23 Apr 2002 10:40:40 PDT." <20020423104040.A2524@dragon.nuxi.com> 

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E170G7o-0002Dy-00>