|
Instant Shutdown / Reboot |
|
|
|
After the long and dispiriting post about browser I decided to also post something short and fun for which you can see the results immediately.
We'll learn 2 things in one shot:
- how-to fastest reboot/shutdown possible
- what's the mysterious SysRq key
Rebooting this way is not recommended because hard drives will not be unmounted and will not sync. The safest way to do it I can think of is from NimbleX or another LiveCD.
Instant Reboot
Alt + SysRq + b
Instant Shutdown
Alt + SysRq + o
Next we'll see a picture to help you locate the SysRq key on your keyboard.

What is this key?
System request (abbreviated SysRq) is a key on keyboards for PCs that has no standard use. This key can be traced back to the operator interrupt key used on IBM 3270-type console keyboards of the IBM System/370 mainframe computer, which was used to cause the operating system such as VM/370 or MVS to allow the console to give input to the operating system.
In Linux, the kernel can be configured to provide functions for system debugging and crash recovery. This use is known as the "Magic SysRq key".
The key combination consists of Alt + SysRq + another key, which controls the command issued.
Which are the other letter that can be used and what do they do?
r - Switch the keyboard from raw mode, used by X11, to XLATE mode
e - Send the SIGTERM signal to all processes except init (PID 1)
i - Send the SIGKILL signal to all processes, including init
s - Sync all mounted filesystems
u - Remount all mounted filesystems in read-only mode
b - Immediately reboot, without unmounting or syncing
Using the keys described so far you can perform a safe reboot. Read the first letters from bottom to top.
It's BUSIER spelled backwards :)
All you have to do for a safe Reboot is Alt+SysRq+r+e+i+s+u+b
It stands for Raw (take control of keyboard back from X), tErminate (send SIGTERM to all processes, allowing them to terminate gracefully), kIll (send SIGKILL to all processes, forcing them to terminate immediately), Sync (flush data to disk), Unmount (remount all filesystems read-only) and reBoot. These keystrokes should be entered a few seconds apart. This should prevent a fsck being required on reboot; it also gives some programs a chance to save emergency backups of unsaved work.
For the fans of the command line the same result can be obtained by echoing the respective letter in procfs.
Instant Reboot
echo b > /proc/sysrq-trigger
Instant Shutdown
echo o > /proc/sysrq-trigger
Disabling SysRq is done by a simple "echo 0 > /proc/sysrq-trigger"
I bet most of you didn't know that you can reboot your computer instantly without taking the hands of the keyboard. I bet most of you also didn't know what is the SysRq key from most keyboards (near F12).
If you want to read more click HERE. Quote this article on your site | Views: 4331 | Print | E-mail
|