Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been dropped to a [rootfs /]# prompt many times when booting my distro failed. Usually I found I couldn't fix the problem with the limited commands available, so I would use any spare Live CD I had laying around.

But what is the rootfs prompt? Why does it have limited commands available? And can I use it to boot my system after the problem has been fixed?

share|improve this question
up vote 8 down vote accepted

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.

enter image description here

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.


share|improve this answer
That was a good answer explaining the rootfs file system, and explains the limited commands available, but there is nothing about the prompt itself and what you can do with it. – Wolfizen Jun 5 '13 at 19:05
@wolfo9999: I updated my answer to explain better. – zekk Jun 5 '13 at 20:10
You sure did :) great answer now that I can visualize it. +50 when I can award it. Says I have to wait 17 hours. Although that's enough time for someone else to make a better answer if they can. – Wolfizen Jun 5 '13 at 20:26
@TiagoƇ. Really great answer that helped me a lot too! May I ask where this great graphic explanation is from? A source link would be nice ;) – erch Dec 3 '13 at 22:13
@chirp look in… =] – zekk Dec 3 '13 at 22:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .