Re: About /etc/mtab and /proc/mounts

From: Miquel van Smoorenburg (miquels@cistron-office.nl)
Date: Thu Feb 27 2003 - 18:54:13 EST


In article <3E5E91B2.8EACF7D0@daimi.au.dk>,
Kasper Dupont <kasperd@daimi.au.dk> wrote:
>The only case that couldn't be done from userspace is mounting of the
>root. Now some people might say nobody would need that feature, and it
>could be done using initrd and some pivot_root stuff anyway.

Well, the kernel already has a simple rootfs built-in, on top of
which the real root filesystem gets mounted at boot-time.

Also POSIX makes a difference between '/' and '//'. '//' might
point to a different namespace.

So why not mount rootfs on '//', mount the real rootfilesystem
on //root, then chroot to //root (while keeping it possible to
chdir("//") ).

If mkdir and rmdir is added to rootfs, you could even mount //mtab.d
there, or //proc, or //devfs, whatever you want to have available
when the root filesystem is being fscked or not even mounted yet.
Perhaps the kernel should mount all those pseudofilesystems there
by default even.

Apollo/DomainOS had this '//' thing, used for something different
(it was the equivalent of their /net autofs mountpoint) but it
worked quite well and didn't get in the way of normal '/' operation.

Mike.

-- 
Anyone who is capable of getting themselves made President should
on no account be allowed to do the job -- Douglas Adams.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 22:00:46 EST