Bug 42280 - Serial console and single user mode don't cooperate
Summary: Serial console and single user mode don't cooperate
Status: CLOSED DUPLICATE of bug 45284
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-25 14:51 UTC by Chris Adams
Modified: 2007-04-18 16:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-06-01 20:43:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2001:085 normal SHIPPED_LIVE New SysVinit package to fix hangs on serial console 2001-06-21 04:00:00 UTC

Description Chris Adams 2001-05-25 14:51:54 UTC
I am booting with a serial console (here is the line from aboot.conf:

0:1/vmlinuz root=/dev/sda3 console=ttyS0

If I try to shutdown to single user mode ("shutdown now"), I get the shell
prompt, but it doesn't take input from the serial console.

If I try to boot up in single user mode (by specifying "single" or
"emergency" on the boot command line), the same thing happens.  All the
output appears okay (up to the point of a password or shell prompt), but
input doesn't work.  It just sits there (my characters are not echoed back).

Comment 1 Bill Nottingham 2001-05-25 14:54:21 UTC
Is input accepted from a local terminal, or just not at all from anywhere?

Comment 2 Chris Adams 2001-05-25 15:03:43 UTC
I'm not sure I understand your question.  When I shutdown to single user mode
with a serial console, the only place input should be accepted from is the console.

I have a null modem between my desktop computer (x86 7.1 running minicom) and
the Alpha that is having this problem.  When the Alpha is booted up, I can log
in via the serial port just fine (I added an agetty line for ttyS0 to
/etc/inittab and ttyS0 to /etc/securetty).  If I then log in as root everything
works until I try to run "shutdown now".  The Alpha goes through the normal
shutdown process and then starts the single user mode shell.  I get the prompt
on the terminal, but I cannot enter anything (my input is ignored).

I just tried this on an x86 Red Hat 7.1 system here, and it works just fine, so
this is somehow specific to the Alpha.

Comment 3 Bill Nottingham 2001-05-25 15:06:47 UTC
What I meant was that, in the case where you have output to the serial console
but no input, if you plug in a keyboard, does that work? (It shouldn't, but
it would be good to know if it does...)

Comment 4 Chris Adams 2001-05-25 15:11:16 UTC
Ah, I understand, sorry.

No, that does not work either.  However, the reboot keystroke (I change it from
CTRL-ALT-DEL to CTRL-ALT-BS) _does_ work.  Interesting.

I'm changing this to SysVinit instead of initscripts, since I now realize that
the init program itself is in charge of this, not the init scripts.

Comment 5 Bill Nottingham 2001-05-25 15:13:41 UTC
Can you try it on a Red Hat x86 system, *with the same kernel version* that's
on the alpha?

Comment 6 Chris Adams 2001-05-25 16:30:54 UTC
I just compiled the 2.4.3-7 kernel on my x86 system, and the same thing _does_
happen (single user mode with serial console is broken).  I see that both
drivers/char/console.c and drivers/char/serial.c had changes.

Comment 7 Bill Nottingham 2001-05-25 19:42:24 UTC
OK, I reproduced it on ia64 with 2.4.3-7 as well.

Comment 8 Alan Cox 2001-06-01 20:22:06 UTC
Bill, dump the stty -a settings of that port at the point it starts the shell. I
suspect your terminal settings are wrong

Comment 9 Bill Nottingham 2001-06-01 20:43:26 UTC
it says:

speed 115200 baud; line = 0;
kill = ^X;
-brkint ixany -imaxbel
-iexten -echoe -echok echoprt

(This is in /etc/init.d/single. I *think* this is pointed at /dev/console
(aka, the serial port) at the time.)

Comment 10 Bill Nottingham 2001-06-21 18:49:19 UTC

*** This bug has been marked as a duplicate of 45284 ***

Note You need to log in before you can comment on or make changes to this bug.