Magic SysRq key isn't -- what am I doing wrong?

Magic SysRq key isn't -- what am I doing wrong?

Post by Kaelin Colclasur » Sun, 24 Jun 2001 08:06:47



I have compiled a 2.4.2 kernel with the Magic SysRq key enabled, but I
don't seem to get any response to it from either the VGA console or
the serial port. I have read Documentation/sysrq.txt and can't
understand what I'm missing here...

I assume I should be attaching a NULL modem cable to the serial port,
correct? I am doing this, and using C-Kermit to send a break signal
followed by e.g. `t', but nothing comes back. :-(

Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
prompt, or from a text-mode shell, doesn't do squat. The machine is
not hung or anything -- it is otherwise working fine.

Note that it's the serial support I am most interested in having
working...

-- Kaelin

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Kaelin Colclasur » Sun, 24 Jun 2001 08:52:27



> I have compiled a 2.4.2 kernel with the Magic SysRq key enabled, but I
> don't seem to get any response to it from either the VGA console or
> the serial port. I have read Documentation/sysrq.txt and can't
> understand what I'm missing here...

> I assume I should be attaching a NULL modem cable to the serial port,
> correct? I am doing this, and using C-Kermit to send a break signal
> followed by e.g. `t', but nothing comes back. :-(

> Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
> prompt, or from a text-mode shell, doesn't do squat. The machine is
> not hung or anything -- it is otherwise working fine.

> Note that it's the serial support I am most interested in having
> working...

> -- Kaelin

On a further note, when I try `showkey -s' as suggested, I get the
following output:

0xe0 0x2a 0xe0 0x37
0xe0 0xb7 0xe0 0xaa

That is, pressing the SysRq key generates the first sequence, and
releasing it the second. If I try to then use `setkeycodes' as
directed, it (apparently) does not handle keys with sequences more
than two bytes long...

Anyway, this is somewhat academic, as it's the serial port that I
really want to get working. But I would like to figure this out.
I would use this on all my Linux boxes if I could actually get it
to work!

-- Kaelin

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Robert Redelmeie » Sun, 24 Jun 2001 10:12:19



> I have compiled a 2.4.2 kernel with the Magic SysRq key enabled, but I
> don't seem to get any response to it from either the VGA console or
> the serial port. I have read Documentation/sysrq.txt and can't
> understand what I'm missing here...

You also need to `echo "1"` to some /proc file IIRC.

Quote:> I assume I should be attaching a NULL modem cable to the serial port,
> correct? I am doing this, and using C-Kermit to send a break signal
> followed by e.g. `t', but nothing comes back. :-(

> Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
> prompt, or from a text-mode shell, doesn't do squat. The machine is
> not hung or anything -- it is otherwise working fine.

> Note that it's the serial support I am most interested in having
> working...

Can't help here.

-- Robert

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Kasper Dupon » Mon, 25 Jun 2001 04:10:08


[...]
Quote:> Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
> prompt, or from a text-mode shell, doesn't do squat. The machine is
> not hung or anything -- it is otherwise working fine.

[...]

Perhaps you release the SysRq key before pressing T.
The SysRq key must be down when you press T.

--
Kasper Dupont

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Kaelin Colclasur » Mon, 25 Jun 2001 04:27:03




> > I have compiled a 2.4.2 kernel with the Magic SysRq key enabled, but I
> > don't seem to get any response to it from either the VGA console or
> > the serial port. I have read Documentation/sysrq.txt and can't
> > understand what I'm missing here...

> You also need to `echo "1"` to some /proc file IIRC.

Aha! `/proc/sys/kernel/sysrq' to be exact. Funny that's not mentioned
in the documentation. And this would also seem to make it impossible
to use this for trying to debug a device driver that's* the
system at boot... :-(

Quote:> > I assume I should be attaching a NULL modem cable to the serial port,
> > correct? I am doing this, and using C-Kermit to send a break signal
> > followed by e.g. `t', but nothing comes back. :-(

> > Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
> > prompt, or from a text-mode shell, doesn't do squat. The machine is
> > not hung or anything -- it is otherwise working fine.

> > Note that it's the serial support I am most interested in having
> > working...

> Can't help here.

Hmmm, well maybe this is the same problem. I'll try it out as soon as
I'm back at the office. Thanks!

-- Kaelin

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Pete Zaitc » Mon, 25 Jun 2001 13:29:09


Quote:> > Likewise, trying Alt-SysRq-t (or whatever) from the text-mode login
> > prompt, or from a text-mode shell, doesn't do squat. The machine is
> > not hung or anything -- it is otherwise working fine.
> [...]

> Perhaps you release the SysRq key before pressing T.
> The SysRq key must be down when you press T.

Another thing to consider - distributions may block SysRq by default.
At least Red Hat ships that way, you must comment a line in
/etc/sysctl.conf

-- Pete

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Robert Redelmeie » Tue, 26 Jun 2001 01:43:46





> > > I have compiled a 2.4.2 kernel with the Magic SysRq key enabled, but I
> > > don't seem to get any response to it from either the VGA console or
> > > the serial port. I have read Documentation/sysrq.txt and can't
> > > understand what I'm missing here...
> > You also need to `echo "1"` to some /proc file IIRC.

> Aha! `/proc/sys/kernel/sysrq' to be exact. Funny that's not mentioned
> in the documentation. And this would also seem to make it impossible
> to use this for trying to debug a device driver that's* the
> system at boot... :-(

Ah well, no one ever said debugging device drivers was easy!

Some ideas:

1)  Load your driver as a module, not static inside the kernel.
    This normally permits many more edit/compile/debug cycles
    per reboot that the static approach.  A hung driver doesn't
    necessary hang the system, and you can try again (renamed).

2)  If it must be static, make _sure_ the root (and other fs's)
    are mounted ro when your driver gets loaded.  That way, a
    hung driver & power cycle doesn't result in a fsck on reboot.
    AFAIK, this is usually the case since the rootfs doesn't
    get mounted rw until init & /etc/rc.d/* scripts run.

3)  Put _lots_ of printk()s in your driver for debugging.  That
    way you at least know what's getting done before it hangs.

Good luck,
-- Robert

 
 
 

Magic SysRq key isn't -- what am I doing wrong?

Post by Kasper Dupon » Fri, 29 Jun 2001 01:19:35



[...]

> 1)  Load your driver as a module, not static inside the kernel.
>     This normally permits many more edit/compile/debug cycles
>     per reboot that the static approach.  A hung driver doesn't
>     necessary hang the system, and you can try again (renamed).

Use monte to load a new kernel instead of a cold start.
This is good if you are debuging code that cannot be
build as module. And in some cases even if parts of the
system are down it might be posible to get another
kernel runing without rebooting.

[...]

--
Kasper Dupont

 
 
 

1. What am I doing wrong with 'chat'?

Shouldn't my modem respond when I type

  chat -V "" ATZ OK

The ATZ is echoed to the screen but the command then times out instead
of getting an OK.

/dev/modem is set up OK and minicom works fine.
ppp-on, which uses chat, also works fine.
I'm running as root and have tried a number of machines.

The really crazy thing is that I have a script here incorporating chat
commands that I think I used successfully to access a BBS some time
ago. Any suggestions to save my sanity gratefully received.

Graham Crowder

2. Netscape Woes

3. Magic SysRq Key

4. remote-boot with DHCP und incom-bootprom

5. Magic sysrq key

6. How do rename a file with a datestamp?

7. Can't find /dev/nst0....What am I doing wrong?

8. A question... re: Gentoo

9. What am I doing wrong here (UNIX-domain sockets don't work)?

10. USYNC_PROCESS - what's am I doing wrong

11. setenvif doesn't seem to work properly - what am I doing wrong ?

12. Apache's <Location...> Directive - What am I doing wrong?

13. Burning CD's what am I doing wrong?