Bug 760841 - grub2 does not correctly handle GRUB_HIDDEN_TIMEOUT
Summary: grub2 does not correctly handle GRUB_HIDDEN_TIMEOUT
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-07 05:11 UTC by Joseph D. Wagner
Modified: 2012-06-02 14:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-02 14:50:18 UTC
Type: ---


Attachments (Terms of Use)

Description Joseph D. Wagner 2011-12-07 05:11:49 UTC
Description of problem:
If you set GRUB_HIDDEN_TIMEOUT in /etc/default/grub, grub2-mkconfig produces code which looks like this:

if sleep --interruptible <GRUB_HIDDEN_TIMEOUT> ; then
  set timeout=<GRUB_TIMEOUT>
fi

Actual results:
This codes waits <GRUB_HIDDEN_TIMEOUT> seconds for a key to be pressed, after which it drops the user to the regular boot menu with a <GRUB_TIMEOUT> second timeout.

Expected results:
Documentation says:
Wait this many seconds for a key to be pressed before displaying the menu. **If no key is pressed during that time, boot immediately.**

Version-Release number of selected component (if applicable):
grub2-1.99-12.fc16.x86_64
grubby-8.3-1.fc16.x86_64

How reproducible:
Always

Additional info:
Instead, the code produced should look more like this:

if sleep --interruptible <GRUB_HIDDEN_TIMEOUT> ; then
  set timeout=0
else
  set timeout=<GRUB_TIMEOUT>
fi

Comment 1 Mads Kiilerich 2012-04-16 22:36:26 UTC
Yes, this seems a bit odd, but if you also set GRUB_TIMEOUT=0 then it seems to work just fine.

Comment 2 Joseph D. Wagner 2012-04-16 23:07:52 UTC
There's nothing in doc to indicate these values are interdependent.

Also doc says "Set to '0' to boot immediately without displaying the menu."  Hence, I can't see how this is designed to be the correct action.

I believe this behavior is unintended, and not by design.

Comment 3 Vladimir Serbinenko 2012-06-02 14:48:06 UTC
The documentation was updated upstream. It was also discussed there and it was decided that while this behaviour was slightly unintuitive, it's not bad enough to justify breaking compatibility.


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