What is rootfs# and what can you do with it?
Rootfs
is a special instance of ramfs
(or tmpfs
, if that's enabled), which is
always present in 2.6 systems
. You can't unmount rootfs.
At kernel initialization time, there is an absolutely minimal filesystem registered, called rootfs
. The code that implements this filesystem can be found in fs/ramfs/inode.c
, which also happens to contain the code for the ramfs
filesystem. rootfs is basically identical to ramfs
, except for the specification of the MS_NOUSER
flag. This is interpreted by the routine graft_tree
in fs/namespace.c
, and I think it prevents userland processes doing their own mounts of rootfs
.
The routine init_mount_tree
(found in fs/namespace.c) is called at system startup time to mount an instance of rootfs, and make it the root namespace of the current process (remember that, under Linux, different processes can have different filesystem namespaces).
It contains all applications, settings, devices, data and more. Without the root file system, your Linux system can not run.
See: https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt