Bug 50219 - grub serial configuration doesn't appear to work
grub serial configuration doesn't appear to work
Product: Red Hat Linux
Classification: Retired
Component: grub (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2001-07-28 11:14 EDT by Pekka Savola
Modified: 2015-01-07 18:49 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-11 16:19:27 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 Pekka Savola 2001-07-28 11:14:46 EDT
on i386, serial configuration, as read from the damned info page, doesn't
appear to work:

# grub

grub> serial --unit=0 --speed=38400
Error 30: invalid argument
[actually, no serial xxx command appears to work]

And some cause seg fault:

grub> terminal serial
Segmentation fault
Comment 1 Glen Foster 2001-07-30 15:44:05 EDT
This defect is considered SHOULD-FIX for Fairfax
Comment 2 Pekka Savola 2001-08-02 07:29:48 EDT
Raising severity as there appear to be problems with actually using serial
console too.

I ran these commands when booting with grub, with terminal connected.

Setting speed worked fine.

'terminal serial' didn't cause any apparent problems.

HOWEVER, on serial there were messages:

Press any key to continue.                                                     
Press any key to continue.                                                     

If you didn't press any key on the serial console, it would boot using normal
console.  If you did
press a key on the serial console, it would STILL boot using normal console.

Comment 3 Jeremy Katz 2001-08-02 19:10:11 EDT
If you're running the 'serial --unit=0 --speed=38400' only gives an error when
you're running the grub shell from a booted system, you also need to specify a

Will look into the other things...
Comment 4 Jeremy Katz 2001-08-02 20:18:03 EDT
Segfault should be fixed in the next grub package I build (should be grub-0.90-8).  

When you were trying to boot with serial console, did you pass the proper
options to the kernel to tell it to use the serial console?
Comment 5 Pekka Savola 2001-08-03 03:22:49 EDT
Hmm. --device isn't mentioned in the info page at least.  Appears like a rather
redundant option as you should be able to get the same information based on

No, I didn't pass the options.  When doing so, it worked (well, difficult to say
whether it worked, as console=primary, serial=secondary kernel console) and both
are copied the messages.

Other issues:
 1) I can't figure how to configure grub from serial, ie. if you need to do
'linux single' or something.  Serial only gets active after 'serial' command is
run but then it's too late already.

 2) if specified 'terminal serial console' or the like, it waits for you to hit
any key forever.  There should be a timeout and one (e.g. the latter) be chosen
if nothing is done.

 What I'd like to get working is:
 * every system has secondary serial, primary console
 * some have primary serial, secondary console
 * if you plug in a serial cable and run minicom and reboot a computer, you will
be able to see
"grub" menu, and are able to specify kernel options etc.
 * most importantly, you should be able to override secondary/primary console

But this appears to be rather awkward to do with grub, so I guess I might stick
to lilo for now...
Comment 6 Jeremy Katz 2001-08-13 18:20:32 EDT
You should be able to have the serial directive in /boot/grub/grub.conf and have
it work (at least, afaict).  The timeout should also then still apply.  

Out of curiosity, what does the lilo.conf you have that works like you want
things to work look like?
Comment 7 Pekka Savola 2001-08-14 01:34:42 EDT

serial = 0,38400n8
append = "console=ttyS0,38400 console=tty0"


(note: "message" must not be set as it breaks secondary serial console

Now you can override console= setting from command-line, either from console or
Comment 8 Pekka Savola 2001-09-11 06:19:34 EDT
(Fairfax final)

I think you can work around problem 1) by putting 'terminal serial' to grub.conf
any "title" definitions.

However, the outstanding issues appear to be:

 1) there's no way to timeout "press any key" in "terminal serial console"
 2) there is no "append" command, that is, kernel parameters that should affect
all kernels (at least I couldn't find it)
Comment 9 Jeremy Katz 2002-04-10 14:30:17 EDT
From the grub list -- you should be able to make serial be the default without
the "Press any key" message by adding '--timeout=0' to the terminal line.

And global append lines are directly the opposite of the way grub works;
luckily, grubby is careful to preserve all arguments when adding new kernel stanza.
Comment 10 Patrick C. F. Ernzer 2002-05-04 23:14:49 EDT
while the following does not show the "press any key" line

serial --unit=0 --speed=9600
terminal serial --timeout=10

the default kernel was booted without showing the menu, not really what I
expected, is my expectation of seing the grub menu misled?

(using grub-0.92-1 from rawhide)
Comment 11 Patrick C. F. Ernzer 2002-05-04 23:25:30 EDT
agh, sorry about previous comment. should have checked info page first, order

serial --unit=0 --speed=9600
terminal --timeout=10 serial

works as expected
Comment 12 Pekka Savola 2002-06-05 08:35:29 EDT
I retested this on RHL73.

The grub configuration was basically:
serial --unit=0 --speed=38400
terminal --timeout=5 console serial
title ...
   kernel /vmlinuz-2.4.18-4 ro root=/dev/hda2 console=ttyS0 38400 console=tty0

I noticed the following problems:

1) if you hit enter at 'press any key' from console, the grub boot menu will
appear on VGA display, *not* on console.  The keys pressed show on grub VGA
display.  So you'd have to operate blind there..

2) terminal --timeout=5 serial console (or console serial, and then press enter
from console) shows
the boot menu in text mode.  However, there are a few ANSI control characters in
the screen (some glitches?)
Comment 13 Jeremy Katz 2002-08-11 16:19:22 EDT
I think that things are all getting configured correctly and working properly
with the current Milan trees including setting up the grub.conf properly for
serial operation if you do a serial install -- at least, it works nicely for me :)
Comment 14 Pekka Savola 2002-08-14 03:57:36 EDT
I retested this with limbo2 (grub 0.92) and I can verify that everything seems
to be working properly; closing.

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