PDA

View Full Version : The magic SysRQ key


danieldk
05-11-2006, 06:22 AM
The default Libranet kernel has a very nifty option available, named the "The magic SysRQ key". These are some keys that can be used to restart Linux safely when something bad happens. You can use a magic SysRQ key by pressing <alt> + <sysrq> + <key>. The following keys are available:


Key Function
r Regain control of the keyboard, this is especially handly for X keyboard hangs
k Kill everything on the current terminal
s Sync filesystems &#40;writes away all cached changes&#41;
u Remounts all filesystems read only
b Reboot the system


Especially the last three keys are handy in emergencies. Using "s", "u" and "b" in sequence will write away stuff (preventing data loss), bring the filesystems in a sane state before a reboot, and will finally reboot the system. Add an "r" before doing this sequence when your system locked in X.

This won't always work, but it can save the day on many occasions ;).

autek
05-11-2006, 06:42 AM
Where in the world do you find this stuff. ?????

Ed

bhobjj
05-11-2006, 05:59 PM
Thanks Daniel,
I remember that info.
If you compile a kernel, it is in the "Kernel hacking" section and is turned off by default:
http://kernel.xc.net/html/linux-2.6.14/i386/#Kernel_hacking
The kernel help info:
http://kernel.xc.net/html/linux-2.6.14/i386/MAGIC_SYSRQ


-BoB

drahcir
05-12-2006, 01:37 PM
I remember this this way
Raising
Skinny
Elephants is
Utterly
Boring



Richard

mdevour
05-13-2006, 09:55 PM
Let me confirm:

You have to recompile the kernal to get these? Or is it turned ON in the default Libranet configuration?

The SysRq key is that one near the top of my keyboard labeled as Print Screen/SysRq, right next to Scroll Lock and Pause/Break??? (Three keys I can't remember EVER using for anything!)

Just making sure. :oops:

Mike D.

drahcir
05-14-2006, 09:47 AM
If I remember correctly it is on by default in LN. It is on by default in the stock debian kernels, also in Kubuntu.

richard

jpaulb
05-17-2006, 07:41 PM
I found a few links that maybe of help.
http://snafu.freedom.org/linux2.2/docs/sysrq.txt
http://linuxgazette.net/issue81/vikas.html
Paul