1 |
On Tue, Mar 31, 2015 at 1:57 AM, Fernando Rodriguez |
2 |
<frodriguez.developer@×××××××.com> wrote: |
3 |
|
4 |
|
5 |
> On Linux now there's the Magic SysRq Key feature for that. If enabled (I think |
6 |
> it is by default, may be wrong) you can use ctrl-alt-sysrq plus one these keys |
7 |
> even if your kernel panics or freezes in most cases (ctrl may only be needed |
8 |
> from xorg): |
9 |
> |
10 |
> r - to get the keyboard back so you can switch to VT if xorg freezes |
11 |
> e - to terminate all processes gracefully (SIGTERM) except pid 1 |
12 |
> i - to terminate all processes forcefully (SIGKILL) except pid 1 |
13 |
> s - to sync all filesystems |
14 |
> u - to unmount them and remount readonly |
15 |
> b - to reboot |
16 |
|
17 |
You have to set "MAGIC_SYSRQ" to "y" for it to be enabled. |
18 |
|
19 |
You can set the "capabilities" of sysrq either via |
20 |
'MAGIC_SYSRQ_DEFAULT_ENABLE" or via sysctl. Debian uses the former (to |
21 |
set it to 438) and Ubuntu and Fedora use the latter (to set it to 176 |
22 |
and 16 respectively). "16" is systemd upstream's default whereby you |
23 |
can only sync filesystems. It's the kind of value that can be the |
24 |
source of a lot of arguing... |
25 |
|
26 |
|
27 |
> Easy to remember as "Reboot Even If System Utterly Broken" |
28 |
|
29 |
I remember it as the reverse of "busier". |