Bug 250490

Summary: grub refuses to display menu on serial console
Product: Red Hat Enterprise Linux 5 Reporter: Steve Bonneville <sbonnevi>
Component: grubAssignee: Václav Pavlín <vpavlin>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: jan.kratochvil, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-19 14:33:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 156836    
Bug Blocks:    

Description Steve Bonneville 2007-08-01 21:29:14 UTC
+++ This bug was initially created as a clone of Bug #156836 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107
Firefox/1.0 StumbleUpon/1.9995

Description of problem:
On a system with a serial console, grub should print a menu on that console when
a user presses a key at the grub 'press any key' menu.  Instead, it loads the
default kernel without further user input.  If you attach a monitor/keyboard to
the system and press the key there when prompted, grub displays the graphical menu.

This worked in previous versions of grub but recently has stopped working.  Thus
if we don't have a video card and keyboard on a system, we can't select
different boot options.

Version-Release number of selected component (if applicable):
grub-0.93-7.0-1

How reproducible:
Always

Steps to Reproduce:
1. Power up system with serial console attached
2. Wait for 'press any key' message from grub on serial console, then press any
key on the serial console.

  

Actual Results:  grub stops printing 'press any key' messages and boots the
default kernel.

Expected Results:  grub should have displayed a menu on the serial console.

Additional info:

grub.conf:

serial --unit=0 --speed=9600
terminal --timeout=10 serial console
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.10-0.ti.4.fc1)
        kernel /vmlinuz-2.6.10-0.ti.4.fc1 ro root=LABEL=/ acpi=on selinux=0
vdso=0 exec-shield=0 console=tty0 console=ttyS0,9600
        initrd /initrd-2.6.10-0.ti.4.fc1.img
title Fedora Core (2.6.10-0.ti1.fc1)
        kernel /vmlinuz-2.6.10-0.ti1.fc1 ro root=LABEL=/ acpi=on selinux=0
vdso=0 exec-shield=0 console=tty0 console=ttyS0,9600
        initrd /initrd-2.6.10-0.ti1.fc1.img
title Memtest86+ (1.55.1)
        kernel /memtest86+-1.55.1

-- Additional comment from phil on 2005-06-13 11:24 EST --
Ok we've found out what the problem is here and I believe it is a bug in a
Fedora patch to grub.  The fix is to rework the patch, but at the very least
this should be documented.

I changed the release to FC3 as we have tested this on FC3 with the .95.3 grub
and verified the problem is still there.

This failure is due to an interaction between splashimage and the serial
console.  If you put a splashimage in grub.conf, this has the side effect of
turning off the menu on the serial port.  I believe the problem is this in Patch200:

stage2/builtins.c:907:
     /* FIXME: should we be explicitly switching the terminal as a
     * side effect here? */
     terminal_func("graphics", flags);

So first the docs should be changed to say that IF you put a splashimage in
grub.conf, the menu will no longer work on the serial console.  Secondly, the
Fedora changes to grub should be re-worked to not disable the menu on the serial
console in this manner.

We have worked around this for now by removing the splashimage from our grub.conf.

-- Additional comment from web-bugzilla.redhat.com on
2005-09-09 20:29 EST --
Bug incl. this working workaround is still valid for: FC4 x86_64 grub-0.95-13
Please update someone "Version" field to: fc4


-- Additional comment from mattdm on 2006-07-10 19:13 EST --
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


-- Additional comment from web-bugzilla.redhat.com on
2006-07-10 19:48 EST --
Regarding Fedora Legacy - it is still valid for fc4:
(In reply to comment #2)
> Bug incl. this working workaround is still valid for: FC4 x86_64 grub-0.95-13
> Please update someone "Version" field to: fc4


-- Additional comment from mattdm on 2006-07-11 11:38 EST --
Moving to FC4 as per comment #4. However, note that FC4 is scheduled to move to
Legacy support in several weeks, so this will be repeated at that point. I'm
sorry for the trouble, but can you re-check this on FC5 or newer? Thanks!

-- Additional comment from web-bugzilla.redhat.com on
2006-07-11 12:58 EST --
Confirming the bug still exists in FC5 grub (there is no "update" for FC5 grub),
incl. the applicable suggested "splashimage" workaround.


-- Additional comment from mattdm on 2006-07-11 13:03 EST --
Thanks very much. I'm moving this to FC5 because realistically it's unlikely the
FC4 version will be updated at this point.

Comment 1 Vladimir Serbinenko 2012-08-01 18:16:26 UTC
This may sound stupid but which key do you press when you're prompted? It's known that some buggy terminals send newline twice if enter is pressed. Try pressing an alphanumeric key.

Comment 2 Steve Bonneville 2012-08-01 18:26:23 UTC
Heh.  This was five years ago (today!) that we cloned this into RHEL.  Hardware would have been remote connections from RHEL client boxes to Cyclades TS-800 terminal server boxes connected to the serial ports on the actual RHEL servers, as I recall.  Think we probably tried a number of different keys as the "any" key; space and enter both seem like reasonable things to have tried.

Comment 3 Steve Bonneville 2012-08-01 18:27:49 UTC
Further note that we cloned this because we were reproducing it on our hardware on RHEL, it started life as a Fedora Core bug.

Comment 4 Václav Pavlín 2013-01-14 13:50:16 UTC
Hi, 

Could you somehow determine if this is still an issue - I cannot reproduce it with virtual machine and rhel5.9.

Regards

Vaclav

Comment 5 Václav Pavlín 2013-03-19 14:33:46 UTC
Due to current lack of response closing as wontfix.