Server Fault is a question and answer site for system and network administrators. 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 was recently asked the following question:

How could you reboot the linux server if your root filesystem is not mounted and you cannot mount it (it is lost) and you do not have any binary - you have only root shell.

It has something to do with /proc I assume, but maybe it is not possible at all. Could anyone provide some guidance on what I should do in that situation?

share|improve this question
up vote 3 down vote accepted

If you don't have the root file system, and as it was specified in the question, you don't neither have binary, I think that echo will not work, so the only solution is a hardware keyboard interrupt using indeed as said it @Pazi the SysRQ Magic Keys.

To do so, you should do: Alt+Print Screen / SysRq+some key

Here, it would be: Alt+Print Screen / SysRq+b (where b will immediately reboot the system, without unmounting or syncing filesystems).

For additional magic keys and what they do, see Wikipedia: Magic SysRq key. Also note that non-QWERTY layouts may use other physical keys.

share|improve this answer
echo will work, as it's also a shell builtin (I know for bash and dash). Try it by moving the echo binary out of the /bin folder. – Patrik Karisch Sep 10 '13 at 8:44
this is expected to be a builtin binary but in some case of some distribution, is not (exotic distribution I know), so it could be usefull to also now that keyboard interrupt do the trick. – Dr I Sep 10 '13 at 9:31
Indeed, both ways are the way to go :) – Patrik Karisch Sep 10 '13 at 9:42
Yep, you're right ;-) – Dr I Sep 10 '13 at 10:22
I did not know anything about these magic keys, thanks. – John Sep 10 '13 at 11:32

You can reboot with magic sysrq key:

echo b > /proc/sysrq-trigger

For more information read wiki or kernel documentation.

echo is also a shell built-in command (known in bash and dash for me) and used if /bin/echo is not available.

share|improve this answer
Regarding your last sentence, I believe that echo (at least in bash and dash, at least on all GNU/Linux systems I've encountered) is used over /bin/echo even if the latter exists. You have to provide an explicit path to use the external binary. (This is especially important with dash, since its builtin echo doesn't support many of the arguments - but that's not relevant here). – Bob Sep 10 '13 at 11:15
@Bob: Well, the trouble with echo is that there are many variations. There are two basic flavors, one taking options (-n, -e`) and one taking special characters and than each variant may have or not have individual features. – Jan Hudec Sep 10 '13 at 11:23
Thank you! Interesting. – John Sep 10 '13 at 11:31
Ok, my try which echo was used was with which. If the binary exists, which outputs the binary, if not not. – Patrik Karisch Sep 10 '13 at 12:24
@Pazi Use type to also list shell builtins. The -a option will show all matches. – Bob Sep 11 '13 at 2:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.