Date: Wed, 01 May 2002 20:27:04 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> To: utsl@quic.net Cc: "Andrew P. Lentvorski" <bsder@allcaps.org>, freebsd-fs@freebsd.org Subject: Re: Non-standard root filesystems Message-ID: <200205012027.aa63727@salmon.maths.tcd.ie> In-Reply-To: Your message of "Tue, 30 Apr 2002 20:02:36 EDT." <20020501000236.GB28212@quic.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200205012027.aa63727>