From owner-freebsd-questions@FreeBSD.ORG Thu Dec 11 11:55:39 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 CF46316A4CE for ; Thu, 11 Dec 2003 11:55:39 -0800 (PST) Received: from smtp.covadmail.net (mx05.covadmail.net [63.65.120.65]) by mx1.FreeBSD.org (Postfix) with SMTP id 5144743D1D for ; Thu, 11 Dec 2003 11:55:38 -0800 (PST) (envelope-from strick@covad.net) Received: (covad.net 21909 invoked from network); 11 Dec 2003 19:55:32 -0000 Received: from unknown (HELO mist.nodomain) (67.101.98.248) by sun-qmail16 with SMTP; 11 Dec 2003 19:55:32 -0000 Received: from mist.nodomain (localhost [127.0.0.1]) by mist.nodomain (8.12.9p2/8.12.9) with ESMTP id hBBJtMAw000917; Thu, 11 Dec 2003 11:55:22 -0800 (PST) (envelope-from dan@mist.nodomain) Received: (from dan@localhost) by mist.nodomain (8.12.9p2/8.12.9/Submit) id hBBJtM9b000916; Thu, 11 Dec 2003 11:55:22 -0800 (PST) (envelope-from dan) Date: Thu, 11 Dec 2003 11:55:22 -0800 (PST) From: Dan Strick Message-Id: <200312111955.hBBJtM9b000916@mist.nodomain> To: dlavigne6@sympatico.ca cc: questions@freebsd.org cc: dan@mist.nodomain 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: Thu, 11 Dec 2003 19:55:39 -0000 On Thu, 11 Dec 2003, dlavigne6@sympatico.ca wrote: >>> > Is this the only way to unmount the root filesystem: > > umount -a > > When I try "umount /", I get this error: > > umount: unmount of / failed: Invalid argument > > The manpage doesn't give any hints on why that argument is invalid... >>> >From the unmount(2) man page: ... The unmount() function may fail with one of the following errors: ... [EINVAL] The requested directory is not in the mount table. Without reading kernel source I can only speculate that the man page is correct and the root file system is not in the kernel mount table. This is plausible if not actually expected since the root file system is not actually mounted on anything. Even if it were in the kernel mount table, you couldn't unmount it because it would always be busy. If there were any other mounted file systems, at least one of them would have to be mounted on the root and that would make the root busy. If there were no other mounted file systems, then the current working directory of every active process (including the one issuing the unmount() system call) would have to be somewhere in the root and that would make the root busy. You can't unmount the root file system. Even the mere notion makes me feel a little queasy. I have to give you big points for originality. :-) (Why did you *want* to unmount the root? To fsck it or dump it?) Dan Strick strick@covad.net