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.
|