- Package:
- grub-common
- Source:
- grub2
- Description:
- GRand Unified Bootloader (common files)
- Submitter:
- Mario Vazquez
- Date:
- 2014-10-18 23:24:08 UTC
- Severity:
- normal
If the user enables GRUB_HIDDEN_TIMEOUT in /etc/deault/grub, the following code section is generated in /boot/grub.cfg: set locale_dir=/boot/grub/locale set lang=en insmod gettext if sleep --verbose --interruptible 3 ; then set timeout=3 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ###set menu_color_normal=cyan/blue set menu_color_highlight=white/blue ### END /etc/grub.d/05_debian_theme ### This code generated brings the following issues:1. No message to warn user how to get back to the menu, only a number countdown is shown onscreen.2. If the user press a key to show the grub menu, it again resume another counter with the same duration.3. Most important, since the code is inserted prior to the theme, the countdown is displayed on a black screen even if the user has a working wallpaper for grub. Included are 2 patches that fix the 3 issues explained. The first patch only removes the timeout code from 00_header, and the second one introduces a new 07_timeout which handles the timeout code, after the theme/color script. The only shortcoming with my patches is that the Countdown message is hardcoded in English, probably will need translations or some extra code for other locales.
First, I'm the one that submitted the bug. But using another account since hotmail screw my report format. Have done some additional testing about this issue. I'm gonna explain it and the patches on separate reports to make them cleaner.
The first issue is that the current /etc/default/grub config file lacks a GRUB_HIDDEN_TIMEOUT entry. Without that entry the scripts failed to include proper code that hides the boot menu when desired. Since this is optional, the entry should be included commented, like this: @@ -7,6 +7,9 @@ GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="" +# Uncomment to enable Hidden Menu +#GRUB_HIDDEN_TIMEOUT=5 + # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console The patch included adds the entry commented as specified previously. Again without this entry, current or suggested scripts will fail to generate the hidden menu when desired.
Second issue is that currently (2010-01-31) the timeout code is generated by the /etc/grub.d/00_header script. This location works fine for text only mode menu, but if a user enables a graphic mode and selects a background, it will fail on certain occasions. * gfx mode + background + grub timeout = works * gfx mode + background + grub hidden timeout = fail With the current implementation, the user will only see a black screen, with a countdown, and no message to return to the menu. If the user manages to press the right key in time (Esc), then the user will be able to see the menu and the wallpaper chosen. I guess that the desired implementation should be to display the wallpaper in both silent, and normal menu configurations, and providing a notice to the user in silent mode. Included are 2 patches to deal with this. One removes the timeout code from 00_header, while the other creates a new script called 07_timeout. The second patch includes the code removed from 00_header, plus an additional line that gives the user an instruction of how to display additional "Boot Options". Since scripts are executed in order, it will be called just after the 05_debian_theme script. A important note, my 07_timeout.patch provides an English only message to the user, it may need translation, or another implementation for localization.
While I kept the same code that I removed from 00_header in
07_timeout, I notice the following lines:
if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
fi
For what I understand of the code, looks like if you interrupt the
hidden timeout, you will then get the normal menu timeout. While I
didn't get that dual countdown behavior, I think a more sane set
timeout=0 would be better.
Those issues mentioned are still in grub-common-1.98~20100128-1
Due to changes in grub-1.98, most of these patches need to be redone. While they can still be applied, the upstream changes gave me a better idea to implement them. Have a copy of some of them at: http://aur.archlinux.org/packages.php?ID=35469 I will post them later today or early tomorrow;
As I said in my previous post, due to some changes upstream which included GRUB_THEME entries in 00_header.in, I decided to redo the patches. The issue resolved with the patches is the same. That current implementation of the debian grub package put the entries in a place that when using hidden timeout mode, it will cause some erratic behavior as explained before. The new implementations mimicks the new GRUB_THEME entries, and place the background code entries just above it in 00_header.in, and add the entry to grub-mkconfig.in, allowing the tool to recognize the entry and be able to use it. Applying these patches, and adding the entries to /etc/defa
My appoligies, I sent the mail incomplete the first time. As I said in my previous post, due to some changes upstream which included GRUB_THEME entries in 00_header.in, I decided to redo the patches. The issue resolved with the patches are the same. That current implementation of the debian grub package put the entries in a place that when using hidden timeout mode, it will cause some erratic behavior as explained before. The new implementations mimicks the new GRUB_THEME entries, and place the background code entries just above them in 00_header.in. Also adds an entry to grub-mkconfig.in, allowing the tool to recognize the background variable and be able to use it. Applying these patches, and defining the background entry in /etc/default/grub there will be no need for a 05_debian_theme file, and it will be able to be modified as othe grub entries in the default config. There are 3 patches included. background-image-in-mkconfig.patch -> adds background entries with its dependency (loads required module) http://savannah.gnu.org/bugs/?29252 hidden-timeout-fix.patch -> fix the double timeout issue using hidden timeout entry http://savannah.gnu.org/bugs/?29250 menucolors-in-mkconfig.patch -> adds menu color entries to 00_header.in and grub-mkconfig.in https://savannah.gnu.org/bugs/?29258