Magic Keys

Last update on March 24, 2009 09:38 PM by green day
Published by jad05

Magic Keys







When the system freezes

Introduction


Sometimes the system freezes and not responding at all to any solicitation (keyboard / mouse), and the only solution that comes to mind (probably reflex Windowsien) is to press the Reset button.

But as we shall see, there is a series of combination of keys that allow (most of the time) to adopt our system with minimal risk and to limit, restrict the loss of data. This is called the "Magic Keys"

Prerequisites


Of course to implement these magic combinations, then the option is compiled into the kernel. So check this condition.
Open a terminal and type the following command:

grep "CONFIG_MAGIC_SYSRQ" /boot/config-$(uname -r)


The output should look like:

CONFIG_MAGIC_SYSRQ=y


Y’ means ‘Yes
But that's not all. If in a distribution like Mandriva the option is enabled by default, this is not the case for all others. We must therefore check that the option is enabled. To do this, type in a terminal:

cat /proc/sys/kernel/sysrq


which will the value: "1".
Otherwise (the return value of "0"), do the following to activate it (as root):

echo "1" > /proc/sys/kernel/sysrq


You can also use the sysctl command instead of echo

sysctl -w kernel.sysrq="1"


There is however a drawback.
The change made with echo or sysctl will be lost when you restart the system.
For the configuration to be permanent you must edit the file / etc / sysctl.conf or by using a text editor and add the line kernel.sysrq = 1 or using the command
echo 'kernel.sysrq=1' >> /etc/sysctl.conf

Before that


When the system freezes (we assume we are in an X session), and before implementing the use of magic keys, if your keyboard is still active, first try:
Kill the X server using the key combination "CTRL + ALT + BACKSPACE"
Switch to another console "CTRL + ALT + Fn (n = 1-6)
  • Try to kill the X server (as root):
  • kill -15 $ (pidof X)
  • kill -9 $ (pidof X)

If there is a local network, try connecting with "ssh" from another machine and resume the hand on your workstation.


If all these attempts have failed, then it is time to use the "Magic Keys".

The Magic Keys


The Magic Keys (SysReq or keys) require the use of a combination of three keys at once.
The "alt" (to the left of the spacebar, not to be confused with the "ALT Gr"), the "SysRq (System Request), this key is nothing but the key known and designated by "Print Screen System" (top right of the keys F1 through F12), and finally a third button from the following letters:

R: Raw activates the keyboard mode "raw" (raw). Try to access to your keyboard.
E: term SIGTERM. Sends a termination signal to all processes except init.
I : kill SIGKILL. Sends a signal to end all processes except init.
S: Sync synchronization disk. Try to write all unsaved data.
U: umount all file systems in read-only mode. Prevents a file system check on reboot
B: reboot Reboot the system. Cleaner than pressing "reset".
O: Out off the system.
L: kill SIGKILL. Sends an end signal to all processes, including init.
K: Key Sends a signal to end all processes on the current virtual console.
P: Print Displays the contents of the registers and flags (flags) in the console.
M: Memory Displays memory contents in the console.
T: Task List contents of the tasks running and information about them.
0-9: Number Sets the level of the console log.
H: Help Displays a help on the codes keys.

It should be understood that the use of the Magic Keys is a sequence, these keys should be used in a specific order:

Raw, tErm, kIll, Sync, Umount, reBoot (REISUB)
Passage of the keyboard in "raw"
Raw
Syncing disks
term
Sends a stop signal to the process
kill
Mounting filesystems read-only
Sync
Sends a termination signal to process
Umount
Reboot the system
reBoot


Note: This is a mnemonic phrase to remember the order of the sequence (in English): "Raising Elephants Is So Utterly Boring"
Best answers for « Magic Keys » in :
Download Magical Jelly Bean Keyfinder Show The Magical Jelly Bean Keyfinder is an open source tool which allows you to restore product keys (cd key) used for the Windows installation. It allows you to print or to save keys for safekeeping. The program works on most Microsoft products :...
Keys to a successful change management policy Show Keys to success Trust is a key element for the success of a project. If employees see the project as a threat, they will put more effort into into maintaining their control or they may also become less active instead failing to work towards the...
Free alternative to Partition Magic ShowFree alternative to Partition Magic Today there are several freeware/free equivalent to partition your disk, providing same outstanding performances as Partition magic. Here is a selection of the best partitioning software( free...
[Windows]Sticky Keys ShowSticky Keys The sticky keys are an accessibility feature provided by Windows. The functionality of the Sticky Keys allows for people who have difficulty pressing multiple keys (eg CTRL + ALT + DEL), to use the SHIFT, CTRL and ALT with a...
NAVIPROMO / MAGIC.CONTROL / INSTANT ACCESS / EGDACCESS INFECTION ShowNAVIPROMO / MAGIC.CONTROL / INSTANT ACCESS / EGDACCESS INFECTIONS Preliminary method Ad-Aware 2009 Spybot Search & Destroy 1.6 Navilog1 Option 1 : Search Option 2: Automatic disinfection Malwarebytes’ Anti-Malware What to do...
Download Parted Magic LiveCD ShowParted Magic LiveCD is a program of partition of hard disk, of CD or of key USB. But under no circumstances, it is a means of maintenance of CD. The program allows to optimize nearly 45 Mb, it uses the processor of Gparted and Parted to take in hand...
Download Magic ISO ShowMagicISO is a creation/edition/extraction software of ISO images supporting a large number of ISO image format. It allows to create ISO images. It is also capable of converting ISO images into BIN format and vice versa. In addition, it allows to...
Download Virtual Magnifying Glass ShowVirtual Magnifying Glass is a free and free magnifier for Windows system and Linux. Very easy-to-use, she is entirely customizable. When lens is active, abbreviation on keyboards are available: The following keyboard shortcuts are available when...
Session keys ShowAdvantages of a session key Asymmetric algorithms (which come into play in public-key cryptosystems) make it possible to eliminate problems related to key sharing via a secure channel. However, they remain much less effective (in terms of...
The Magistr virus ShowIntroduction to the Magistr virus The Magistr virus (code name W32/Magistr.b@MM, I-Worm.Magistr.b.poly or PE_MAGISTR.B) is a polymorphic worm (a worm whose shape, or more precisely signature, is constantly changing) which spreads using email. It is...