From owner-freebsd-questions@FreeBSD.ORG Thu Dec 11 17:41:37 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B057016A4CE for ; Thu, 11 Dec 2003 17:41:37 -0800 (PST) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 2391943D09 for ; Thu, 11 Dec 2003 17:41:36 -0800 (PST) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 12 Dec 2003 01:41:33 +0000 (GMT) To: Dan Strick In-Reply-To: Your message of "Thu, 11 Dec 2003 11:55:22 PST." <200312111955.hBBJtM9b000916@mist.nodomain> Date: Fri, 12 Dec 2003 01:41:33 +0000 From: Ian Dowse Message-ID: <200312120141.aa02009@salmon.maths.tcd.ie> cc: questions@freebsd.org cc: dlavigne6@sympatico.ca Subject: Re: umounting / X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 01:41:37 -0000 In message <200312111955.hBBJtM9b000916@mist.nodomain>, Dan Strick writes: >You can't unmount the root file system. Even the mere notion makes >me feel a little queasy. There is an explicit test in the kernel that stops you from unmounting the root file system, I guess as an anti foot shooting measure. If you disable that test then forcibly unmounting / works fine, but normally init will promptly die because the vnode containing its executable has disappeared. The only case I've come across where the ability to unmount / would be useful is for some kind of rescue or install CD that starts off as the root filesystem but wants to switch over to the real root fs allowing the CD to be removed. I've got this to work before by changing init so that it re-execs itself upon receipt of a special signal. Then you can mount the new root directly over /, send the signal to init, and finally forcibly unmount the underlying /. There are some necessary bits for this that are only in 5.x, such as the ability to unmount by filesystem ID rather than by path. Ian