Bug 42280 - Serial console and single user mode don't cooperate
Serial console and single user mode don't cooperate
Status: CLOSED DUPLICATE of bug 45284
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-05-25 10:51 EDT by Chris Adams
Modified: 2007-04-18 12:33 EDT (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Chris Adams 2001-05-25 10:51:54 EDT
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 10:54:21 EDT
Is input accepted from a local terminal, or just not at all from anywhere?
Comment 2 Chris Adams 2001-05-25 11:03:43 EDT
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 11:06:47 EDT
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 11:11:16 EDT
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 11:13:41 EDT
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 12:30:54 EDT
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 15:42:24 EDT
OK, I reproduced it on ia64 with 2.4.3-7 as well.
Comment 8 Alan Cox 2001-06-01 16:22:06 EDT
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 16:43:26 EDT
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 14:49:19 EDT

*** 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.