Feb 10

When Ubuntu Freezes

Scribbled on Tuesday, February 10th, 2009

What to do if your system is not responding and gone into eternal freeze. You might be tempted to press the restart button on the CPU cabinet or will turn off the UPS.

In other Linux distros these magic key combination can be enabled by either of the given below tricks:

1.Execute this command with root privileges

echo 1 > /proc/sys/kernel/sysrq

or permanently enable it

2. Add this line to sysctl.conf (/etc/sysctl.conf)

kernel.sysrq = 1

The easiest trick is to directly communicate with the Kernel via /proc filesystem.

  • Press Alt + SysRq/Prt Scr key and type REISUB

It will safely restart your PC with no loss of data (in most cases). Remember it as Reboot Even If System Utterly Broken.

What if you wanted to shut down the PC

  • Press Alt + SysRq/Prt Scr key and then type REISUO

Explanation:

  • R tries to communicate with Keyboard directly without the need of X window system
  • E tries to end processes by giving them stop/terminate signal (SIGTERM), its a respectful request
  • I this is for SOB processes which don’t listen to the kernel, they are killed (SIGKILL) to free the resource locks, thou shalt die who didn’t heed
  • S to write the cached changes to the filesystem, so that data is proof written to the disk and poses no data loss
  • U now its the time to unmount the filesystems and remount them as read only
  • B restarts the sytem
  • O turn off/Shut down the system

So next time keep this little handy trick to show some mercy to your system and valuable data.


Enjoyed this post? Subscribe to Full Feeds or by Email and receive free daily updates on this Blog.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  1. 1 Trackback(s)

  2. Feb 20, 2009: T » Blog Archive » Arch Linux installation from ground up

Post a Comment

February 2009
M T W T F S S
« Jan   Mar »
 1
2345678
9101112131415
16171819202122
232425262728