From owner-freebsd-fs Wed May 1 12:27:11 2002 Delivered-To: freebsd-fs@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 25E8737B419 for ; Wed, 1 May 2002 12:27:06 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 1 May 2002 20:27:05 +0100 (BST) To: utsl@quic.net Cc: "Andrew P. Lentvorski" , freebsd-fs@freebsd.org Subject: Re: Non-standard root filesystems In-Reply-To: Your message of "Tue, 30 Apr 2002 20:02:36 EDT." <20020501000236.GB28212@quic.net> Date: Wed, 01 May 2002 20:27:04 +0100 From: Ian Dowse Message-ID: <200205012027.aa63727@salmon.maths.tcd.ie> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <20020501000236.GB28212@quic.net>, utsl@quic.net writes: >On Tue, Apr 30, 2002 at 03:58:09PM -0700, Andrew P. Lentvorski wrote: >> utsl@quic.net wrote: >> > Linux has a syscall (pivot_root) to swap the root with another mounted >> > filesystem. It is occasionally quite useful, and I've been wondering >> > about implementing it (or something similar) on FreeBSD. >> That sounds like a fine idea. What are the issues with doing that? > >I've been taking a look, and I think it is probably beyond my skill. :( >From what I can see the following would be necessary: I presume you know that FreeBSD already allows you to mount another filesystem directly over /? Do you actually need to remove the original root filesystem, or is it just for cosmetic reasons that you would like it to disappear from the mountlist? One think I have thought about before, but never actually tried implementing, is to permit the root filesystem to be forcibly unmounted so long as there is another filesystem mounted directly above it to become the new root (you obviously have to specify the root filesystem by device name). That might be relatively easy to do, and it doesn't require a new system call. There are a few problems though: I think init(8) would need to have a signal that causes it to re-exec itself, since otherwise it could get killed if any of the executable needed to be paged in. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message