Date: Thu, 25 Apr 2002 15:04:24 +0100 (BST) From: Andrew Gordon <arg-bsd@arg1.demon.co.uk> To: "M. Warner Losh" <imp@village.org> Cc: <obrien@FreeBSD.ORG>, <rwatson@FreeBSD.ORG>, <tlambert2@mindspring.com>, <danny@cs.huji.ac.il>, <current@FreeBSD.ORG> Subject: Re: FreeBSD 5.0 Developer Preview #1 Now Available / diskless booting Message-ID: <20020425122309.V44100-100000@server.arg.sj.co.uk> In-Reply-To: <20020424.194518.59061982.imp@village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 24 Apr 2002, M. Warner Losh wrote: > In message: <20020423094628.A85404@dragon.nuxi.com> > "David O'Brien" <obrien@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020425122309.V44100-100000>