Bug 50219 - grub serial configuration doesn't appear to work
Summary: grub serial configuration doesn't appear to work
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grub   
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Jay Turner
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-28 15:14 UTC by Pekka Savola
Modified: 2015-01-07 23:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-11 20:19:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Pekka Savola 2001-07-28 15:14:46 UTC
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 19:44:05 UTC
This defect is considered SHOULD-FIX for Fairfax

Comment 2 Pekka Savola 2001-08-02 11:29:48 UTC
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 23:10:11 UTC
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-03 00:18:03 UTC
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 07:22:49 UTC
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 22:20:32 UTC
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 05:34:42 UTC

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 10:19:34 UTC
(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 18:30:17 UTC
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-05 03:14:49 UTC
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-05 03:25:30 UTC
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 12:35:29 UTC
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 20:19:22 UTC
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 07:57:36 UTC
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.