From owner-freebsd-current Thu Apr 25 7: 4:32 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 121BF37B42C; Thu, 25 Apr 2002 07:04:26 -0700 (PDT) Received: by arg1.demon.co.uk (Postfix, from userid 1002) id C72679B30; Thu, 25 Apr 2002 15:04:24 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by arg1.demon.co.uk (Postfix) with ESMTP id C383A5D0C; Thu, 25 Apr 2002 15:04:24 +0100 (BST) Date: Thu, 25 Apr 2002 15:04:24 +0100 (BST) From: Andrew Gordon X-X-Sender: To: "M. Warner Losh" Cc: , , , , Subject: Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting In-Reply-To: <20020424.194518.59061982.imp@village.org> Message-ID: <20020425122309.V44100-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, M. Warner Losh wrote: > In message: <20020423094628.A85404@dragon.nuxi.com> > "David O'Brien" writes: > : On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote: > : > diskless_root_readonly="NO" # Make it "YES" for readonly > : > : good. > > What's wrong with the current root_rw_mount knob? It works just fine. The original complaint was that Danny's patches _assume_ that the root is going to remain R/O and just provide two ways of populating the MFS /etc, rather than allowing for the case where the MFS /etc isn't required at all. (actually, this is just reversing a recent obrien improvement to rc.diskless1 that made the MFS /etc conditional - it's still automatic in -stable and has been for a long while). There isn't a problem with controlling the root mount; diskless_root_readonly is a solution to a non-problem. The real problem is that (in the case where you want it) there is no one good way of constructing the MFS /etc - there are lots of bad ways, various of which have been committed to rc.diskless1 at different times, and still more used privately: 1) Create an MFS mounted on an arbitrary mountpoint, then use mount_null to install it over /etc when it's been populated. This was the original version when the support for read-only root appeared in rc.diskless back in 1999 (3.2-RELEASE). Gave problems because null mounts didn't (still don't?) work very well - mmap() caused panic for example. 2) Copy the files out of /etc into /tmp, then mount the MFS directly on /etc and copy the files back again. This appeared in 2001 (4.3-RELEASE) 3) Avoid the double copy on each boot by requiring the administrator to keep a copy in /conf/default/etc that can be copied directly to an MFS mounted on /etc. This appeared a couple of months later (4.4-RELEASE). 4) Small performance improvement on 3) - use a gzipped CPIO archive if available, rather than copying lots of small files which can be slow over NFS. This has just recently been committed to -stable by Luigi. 5) Danny's solution: Mount the MFS on /conf/etc, then use unionfs mounts to install it over /etc. Does unionfs work any better than mount_null? 6) My solution: Mount a second instance of the root FS on /conf/default then copy as in 3). Avoids maintaining two copies of /etc, but only works on NFS and doesn't solve the performance problem. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message