Google Plus

Recover from a frozen system with the magic SysRq key| Tips

Written by Mel Kham on . Posted in Linux tutorials

The magic SysRq key is an old tip to be used to recover from a frozen system, it is advised to be used when the system absolutely locks up – freeze, and when using Ctrl+Alt+Backspace does nothing .

What is The magic SysRq key ?

The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low level commands regardless of the system’s state. It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.

 

How to use the magic SysRq to recover from a frozen system ?

 

If you see that using Ctrl+Alt+Backspace does nothing, then is the time to use The magic SysRq key.

1. Hold down the Alt and SysRq (Print Screen) keys.

2. While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB ( Hold [Alt]+[PrtSc] then type [R]>[S]>[E]>[I]>[U]>[B] you need to press each key for 2-3 seconds).

3. Watch your computer reboot magically.


To remember the word REISUB the mnemonic is “Raising Elephants Is So Utterly Boring”, “Reboot Even If System Utterly Broken” or simply remembering the word “BUSIER” . Always remember that you have to press each key for 2-3 seconds.

The magic SysRq to recover is advised to be used for emergencies only, for example when the system absolutely locks up and freeze This is not to be used on potentially still busy machines which are still writing stuff to disk for example or on machines that could still do a proper shutdown if you only were patient enough to wait. This is only for systems which have already died a horrible death.

 

Activate The magic SysRq key in Ubuntu/Debian/CentOS/RHEL/Fedora

  • If you are using Ubuntu,Debian you can not use The magic SysRq key because it is desactivated by default.

If you want to activate it, you have to edit the file /etc/sysctl.conf :

vi /etc/sysctl.conf

and then add this line :

kernel.sysrq = 1

save and close

  • If you are using Fedora /CentOS/ Redhat, edit the file /etc/sysctl.config and change the value of kernel.sysrq to 1
# Controls the System Request debugging functionality of the kernel
# kernel.sysrq = 1 

and is done.

 

References : http://forums.linuxmint.com , http://en.wikipedia.org

{loadposition user9}

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Robin

    I have run into situations where this has been disabled. I have to check to see if it enabled in Fedora now. It wasn’t the last time I tried.

    I think you have to make a change.
    “kernel.sysrq = 1″ in /etc/sysctl.conf

    It could be the same in some other distributions.

    • Zinovsky

      Thanks Robin, i checked ubuntu9.10 and Debian Lenny both kernel.sysrq = 1 is not active in /etc/sysctl.conf , this mean if a person is using Ubuntu, debian, he has to open /etc/sysctl.conf and add this to the file :
      [quote]kernel.sysrq = 1[/quote]

      After this a person will be able to use The magic SysRq key :)

  • http://www.rwdubsreviews.com Lyle

    What happens if you use this when things are not completely locked up? Also glad to know there is a better way then a hard reset. Hard resets make me nervous.

  • Phil

    You forgot the important part – you need to wait a few seconds between each each command to ensure it finishes. Otherwise, it’s not really different than pressing the reset button.

  • http://cellularaccessoriess.com Lucy

    I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
    Lucy

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Pat L

|

I tried it and it works with a regular zip file, but if you password-protect the .zip file it does NOT work.

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .