umounting /

Dan Strick strick at
Thu Dec 11 11:55:39 PST 2003

On Thu, 11 Dec 2003, dlavigne6 at 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 at

More information about the freebsd-questions mailing list