Tux

...making Linux just a little more fun!

[2 cent tips] Better reboot using magic SysRq

Mulyadi Santosa [mulyadi.santosa at gmail.com]


Tue, 27 Apr 2010 07:26:47 +0700

What is a better way to reboot your system in case it hangs? I mean rather than three finger salute or kicking the power switch? :)

Let's assume you have enable the magic SysRq before. Make sure this feature is compiled in the kernel (CONFIG_MAGIC_SYSRQ) and you enable it (echo 1 > /proc/sys/kernel/sysrq). Then when the disaster strike, you can try pressing these key combos in the following order: 1. Alt-SyRq-s (sync the buffer with the disk) 2. Alt-SysRq-u (remount all filesystem as read-only) 3. Alt-SysRq-e (kill all tasks, except init) 4. Alt-SysRq-b (finally, reboot system)

If your keyboard doesn't have SysRq, use PrintScreen instead. The way I do it is like this: press alt, hold, press sysrq, hold, then press s (or other key), then release them all. You might also try, press alt, hold, press sysrq, release it, press s or other key, release all.

In most cases, the above sequence could reboot your system better. But if not, just fall back to the "traditional" one :)

Reference: sysrq.txt in Documentation directory inside kernel source code's tree.

-- 
regards,
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com


Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Tue, 27 Apr 2010 06:37:00 +0530

Hello,

On Tue, 27 Apr 2010, Mulyadi Santosa wrote:

> I do it is like this: press alt, hold, press sysrq, hold, then press s
> (or other key), then release them all. You might also try, press alt,
^^^

> hold, press sysrq, release it, press s or other key, release all.

That should be "alt".

Kapil. --


Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]


Tue, 27 Apr 2010 06:39:05 +0530

Hello,

On Tue, 27 Apr 2010, Kapil Hari Paranjape wrote:

> On Tue, 27 Apr 2010, Mulyadi Santosa wrote:
> > I do it is like this: press alt, hold, press sysrq, hold, then press s
> > (or other key), then release them all. You might also try, press alt,
>                                     ^^^
> > hold, press sysrq, release it, press s or other key, release all.
> 
> That should be "alt".

I misread. You were right the first time.

Kapil. --


Top    Back


Mulyadi Santosa [mulyadi.santosa at gmail.com]


Tue, 27 Apr 2010 11:30:53 +0700

On Tue, Apr 27, 2010 at 08:09, Kapil Hari Paranjape <kapil at imsc.res.in> wrote:

> I misread. You were right the first time.

It's okay, corrections are always welcome :) Makes me more aware. I almost sent reply regarding this, but luckily you clear this matter first. So thanks :)

-- 
regards,
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com


Top    Back


Danila Bespalov [danila.bespalov at gmail.com]


Tue, 27 Apr 2010 19:38:31 +1100

Alt+SysRq+K is handy also, if you want to kill freezed SVGAlib application.


Top    Back