[vox-tech] magic sysreq key
Jonathan Stickel
vox-tech@lists.lugod.org
Tue, 18 Mar 2003 12:54:01 -0800
Thanks Mike, Bill, and Pete for some helpful comments. I actually found
my answer with a google search
(http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/security-sysrq.html).
Here it clearly states that "Writing a 0 into /proc/sys/kernel/sysrq
will disable the magic SysRq key", so my initial guess was correct; my
default RH8 install disabled the magic sysrq keys!
It turns out there is a line in /etc/sysctl.conf which enables or
disables magic sysrq:
kernel.sysrq = [0 or 1]
I now have magic sysrq enabled and have tested it succesfully from
console with ctl-alt-h. Now I am ready the next time Linux freezes on me.
Jonathan
btw Pete: my init level 3 is multiuser mode without X. I had thought
this was generally true, but I guess not from your comments. I now know
that I can get a non-X console by simply pressing ctl-alt-f1, and can
return to X with ctl-alt-f7. That is also useful to know.
Peter Jay Salzman wrote:
> note: subject change
>
>
>
> hi jonathan,
>
> when not latexing or playing games, i'm usually not using X.
>
> runlevels are not meaningful since they mean different things for
> different operating systems. i'm guessing you don't use debian, so i
> don't know what runlevel 3 means.
>
> when doing anything of any importance, like trying to recover gracefully
> from a kernel error, do it in console. don't run X. direct logging by
> the kernel and modules may not be seen from within X. furthermore, X
> can steal the key sequence like it does with ctl-alt-backspace.
>
> i know *quite literally* nothing about KDE or GNOME other than you can
> have cute little icons on your desktop, so i'm not sure of any gotchas
> with kernel logging, magic keystrokes and desktop managers.
>
> so try it in console.
>
> one more question, and i hope this isn't insulting -- can you tell me
> *precisely* the keystrokes you're hitting in excruciating detail?
> something along the lines of:
>
> i press down the alt key. while keeping the alt key pressed down, i
> then press down "print screen". etc
>
> lastly, have you read the part in sysreq.txt about "i press the sequence
> and nothing happens"?
>
> pete
>
>
> begin Jonathan Stickel <jjstickel@netscape.net>
>
>>When I try alt-sysrq-h (to display magic-sysrq help) in KDE, my cpu runs
>>for awhile but nothing seems to happen. I wanted to avoid testing
>>something more drastic, but since you asked, I entered init level 3 and
>>tried a few (alt-sysrq-'h', 's', 'u', and 'b'). Nothing happens at all.
>>
>>Jonathan
>>
>>
>>Peter Jay Salzman wrote:
>>
>>>redirected to vox-tech
>>>
>>>begin Jonathan Stickel <jjstickel@netscape.net>
>>>
>>>
>>>>I was previously unaware of the magic sysreq keys. They do look useful,
>>>>and I read the documentation as you suggest. From what I can tell, it
>>>>is compiled in my kernel (CONFIG_MAGIC_SYSRQ=y), but I am wondering if
>>>>it is disabled with the run-time command: "echo "0" >
>>>>/proc/sys/kernel/sysrq", as suggested by the documentation. In fact, my
>>>>/proc/sys/kernel/sysrq contains the single character "0". Where would I
>>>>find this run time command? Can I just delete it or comment it out?
>>>>Thanks,
>>>>
>>>>Jonathan
>>>
>>>
>>>have you tried to use sysreq and it didn't work?
>>>
>>>pete
>>>
>>>
>>>
>>>>Peter Jay Salzman wrote:
>>>>
>>>>
>>>>>hi doug,
>>>>>
>>>>>check out /usr/src/linux-2.4.20/Documentation/sysrq.txt
>>>>>
>>>>>it's very short. basically, you make the kernel:
>>>>>
>>>>>1. flush buffers ("sync disks")
>>>>>2. remount all partitions as read-only
>>>>>3. reboot
>>>>>
>>>>>print screen == sysrq
>>>>>
>>>>>alt-sysrq-s flush
>>>>>alt-sysrq-u remount partitions as read-only
>>>>>alt-sysrq-b reboot
>>>>>
>>>>>you can actually send TERM and KILL to all processes. this is the kind
>>>>>of thing you should really read about before using. it's short and
>>>>>well written.
>>>>>
>>>>>pete
>>>>>
>>>>>
>>>>>begin R. Douglas Barbieri <doug@dooglio.net>
>>>>>
>>>>>
>>>>>
>>>>>>Okay, so explain to me the magic sysreq keys... :-) I experience lockups
>>>>>>sometimes when I'm trying to start up Win4Lin. It hoses my machine so
>>>>>>badly that Ctrl-Alt-Backspace won't even kill X (and Ctrl-Alt-Fn doesn't
>>>>>>even work. I have to hard restart when that happens).
>>>>>>
>>>>>>On Sat, Mar 15, 2003 at 09:38:11PM -0800, Bill Kendrick wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Today's Linux demo was pretty successful. Mike showed up (a bit late
>>>>>>>;^) )
>>>>>>>with the Demo machine. Before that, I just had the flyers set up, and
>>>>>>>a couple of kids came by, and I gave them Tux Paint CDs. :^)
>>>>>>>
>>>>>>>When the computer showed up, we started getting many more visitors.
>>>>>>>Questions ranged from "I use Linux at work, and the other day it
>>>>>>>/completely/
>>>>>>>locked up!" (Mike explained magic sysreq keys) to "Why would I want
>>>>>>>Linux?"
>>>>>>>(I said "for the good of humanity"; she really digged that answer, and
>>>>>>>stuck around and talked for a long time)
>>>>>>>
>>>>>>>Towards the latter half, Jeff Newmiller came by and set up his laptop,
>>>>>>>so we had one desktop, one laptop, and one PDA (which didn't get too
>>>>>>>much use).
>>>>>>>
>>>>>>>
>>>>>>>We worked on getting Apache configured to show off the LUGOD.org
>>>>>>>website,
>>>>>>>demo'd Tux Paint a lot, and played a little with getting OCR software
>>>>>>>to
>>>>>>>work (in response to someone's complaint about Windows).
>>>>>>>
>>>>>>>
>>>>>>>Henry - we should set one up for April or May!
>>>>>>>
>>>>>>>--
>>>>>>>bill@newbreedsoftware.com
>>>>>>>Hire me!
>>>>>>>http://newbreedsoftware.com/bill/
>>>>>>>http://newbreedsoftware.com/bill/resume/
>>>>>>>_______________________________________________
>>>>>>>vox mailing list
>>>>>>>vox@lists.lugod.org
>>>>>>>http://lists.lugod.org/mailman/listinfo/vox
>>>>>>
>>>>>>--
>>>>>>R. Douglas Barbieri
>>>>>>doug@dooglio.net
>>>>>>http://www.dooglio.net
>>>>>>
>>>>>>GPG Fingerprint : FE6A 6A57 2B95 7594 E534 BFEE 45F1 9E5E F30A 8A27
>>>>>>MIT.edu recv-key: F6368A3D
>>>>>>GPG Public key : http://www.dooglio.net/dooglio.asc
>>>>>
>>>>>
>>>>>
>>>>>
>>>>_______________________________________________
>>>>vox mailing list
>>>>vox@lists.lugod.org
>>>>http://lists.lugod.org/mailman/listinfo/vox
>>>
>>>
>>
>>_______________________________________________
>>vox-tech mailing list
>>vox-tech@lists.lugod.org
>>http://lists.lugod.org/mailman/listinfo/vox-tech
>
>