from Hacker News

GNU/Linux: Emergency Restart

by nicolasbrailo on 5/18/10, 2:02 PM with 9 comments

  • by code_duck on 5/18/10, 3:05 PM

    This can be handy, no doubt. I have a monitor that flips out blinking if you knock the cord, which my cat has seen fit to do a couple of times.

    Don't forget the mnemonic - Raising Elephants Is So Utterly Boring.

    There are a couple of variations:

    REISUO will shutdown rather than reboot.

    Some prefer RSEIUB, syncing earlier in the process - aka Rasing Skinny Elephants Is Unusually Bland. You may wish to throw another Sync in there to make RSEISUB.

  • by johnswamps on 5/18/10, 4:15 PM

    It's usually worth trying to ssh into the machine when X locks up (if you don't want to just reboot). Depending on what caused the problem, this will often still work even when it's unresponsive locally.
  • by cnvogel on 5/18/10, 6:01 PM

    Further information about how and what to trigger things with the Magic-Sysrq-Key is documented in $KERNEL/Documentation/sysrq.txt, which you can access for example in Linus' GIT tree at...

    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6...

    One very useful function, for example, is to force a hard reboot when ssh'ed into a server:

    echo b >/proc/sysrq-trigger

  • by yigit on 5/18/10, 3:43 PM

    most easy way of remembering is : BUSIER, only backwards.
  • by bcl on 5/18/10, 5:26 PM

    IIRC the kernel needs to be compiled with the magic sysreq keys enabled, so if this doesn't work for you you will likely need to rebuild your kernel. Or grow a couple extra digits.