HOWTO: Linux Magic SysRq key (R-E-I-S-U-B: Reboot Even If System Utterly Broken)

| No TrackBacks
If you've ever hacked on a Linux box, you know that there's a slight chance the system might freeze and become entirely unresponsive.  In general, this is extremely rare with Linux but it does happen.  When installing the HPPA port of Debian Linux onto my HP PA-RISC J6000 Workstation, the Debian installer completely froze (as described here in my post to the HPPA Debian community).  BTW, I never got a response back from my attempt to alert the Debian folks of this issue.

Nevertheless, if you need to take control and gracefully restart a completely "frozen" Linux box, you'll be happy to know that there is hope.  Hold down the ALT+SysRq key combination.  While holding down ALT+SysRq, press R-E-I-S-U-B and watch your system reboot gracefully (e.g., no corrupted file systems).  Here's what R-E-I-S-U-B does while you're holding down ALT+SysRq ...

  • R: Switch the keyboard from raw mode to XLATE mode.
  • E: Send the SIGTERM signal to all processes except init.
  • I: Send the SIGKILL signal to all processes except init.
  • S: Sync all mounted file systems (IMPORTANT).
  • U: Remount all mounted file systems in read-only mode.
  • B: Immediately reboot the system, without un-mounting partitions or syncing.

sysrq-key.png

Check out some of the other Linux ALT+SysRq helper functions here.

Enjoy.

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on February 6, 2009 7:00 AM.

HP 8510w Notebook Full Speed Fan BIOS Setting (Fan always on while on AC Power) was the previous entry in this blog.

HOWTO: Turn Apache into an FLV (Flash Video) Streaming Server with PHP (FlowPlayer Out of Memory) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.