Rebooting the magic SysRq way


[Cory Wright] shares a tip on how to reboot a system with a failed hard drive remotely. The magic SysRq key is a linux kernel feature that lets you perform a number of interesting operations. If you’re working on a remote system where the disk has failed, you won’t have access to the reboot or shutdown commands. You can issue keystrokes to the magic SysRq device in /proc though, so you can send a hard reboot directly to the kernel with no disk access required.

The Wikipedia entry includes a handy tip on how to properly restart a otherwise frozen machine. It should save you from having to fsck the next time around.

[photo: Joshua Davis]

Comments

  1. hank says:

    I have used this over serial and other consoles, it can be invaluable for a sysadmin. Everyone should learn about the magic of sysrq :-)

  2. ajd4096 says:

    RTFM is not a hack! Stop trying to be a slashdot clone!

  3. freyyr890 says:

    I second the above.

  4. Troy says:

    I used to follow this blog rather regularly, but its taken a turn for the worst. I thought the point was to showcase a different hack/project, not simply to copy lifehacker/slashdot?

  5. octel says:

    how is this 5 year old feature a “hack”?
    according to wikipedia, this feature was introduced to the kernel in march 2003

    http://kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.64/2.5.64-mm7/broken-out/proc-sysrq-trigger.patch

    http://en.wikipedia.org/wiki/Magic_SysRq_key

  6. Bille says:

    I have to say I agree with some of the other posters. I think you should go back to the old receipe, and have a single quality hack every day. And try to avoid software hacks and news at an absolute minimum.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,687 other followers