bugGNU GRUB - Bugs: bug #29250, GRUB_HIDDEN_TIMEOUT may cause...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29250: GRUB_HIDDEN_TIMEOUT may cause double timeout count

Submitter:  Mario Vazquez <mariovazq>
Submitted:  Thu 18 Mar 2010 07:38:37 AM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Wont Fix Privacy:  Public
Assigned to:  None Originator Name:  Mario Vazquez
Open/Closed:  Closed Release:  1.98
Release:  Reproducibility:  Every Time
Planned Release:  None

Sat 12 Jun 2010 12:25:20 PM UTC, comment #2: 

keystatus (shift pressed on boot) may be misdetected if BIOS puts garbage to BDA. To avoid system stalling for user input we have that code. If you want to have the behaviour you want just set GRUB_TIMEOUT to -1.

Vladimir Serbinenko <phcoder>
Group administrator
Thu 18 Mar 2010 07:41:58 AM UTC, comment #1: 

Forgot to tell, patch applies clean to trunk r2263

Mario Vazquez <mariovazq>
Thu 18 Mar 2010 07:38:37 AM UTC, original submission:  

Currently in grub 1.98 if a user enables the GRUB_HIDDEN_TIMEOUT entry in /etc/default/grub. The following code will be executed from /etc/grub.d/00_header.

if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
  set timeout=${GRUB_TIMEOUT}
fi

The problem with that code is that hidding the menu enables both the timeout entry in the if line, and the one inside the if.  Even if the user removes or comments the GRUB_TIMEOUT entry, that entry is defined in 00_header.  That means that GRUB_TIMEOUT will have the value of 5, even if the user comments it.

Since the definition of GRUB_TIMEOUT cannot be removed from 00_header without causing other issues, my recommendation is to set that line to 0.

if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
  set timeout=0
fi

Included is a patch that do that.

How to reproduce the error:
 1. Enable the hidden timeout entry to any value in /etc/default/grub.
 2. Reboot
 3. Either wait for the hidden counter to finish, or interrupt it, and you will get your menu with another counter.  The second counter is from GRUB_TIMEOUT entry.

Note: my tests apparently using ESC key to cancel, the second counter is not displayed.  But with other keys like Return, it is visible.

Mario Vazquez <mariovazq>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19971:  hidden-timeout-fix.patch added by mariovazq (406B - text/x-patch - GRUB_TIMEOUT removal patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by mariovazq (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-12 phcoder StatusNone Wont Fix
        Open/ClosedOpen Closed
    2010-03-18 mariovazq Attached File- Added hidden-timeout-fix.patch, #19971

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code