[LINUX] Help with GRUB2: no countdown after unsuccessful shutdown
#1
Hi All,

I like to know if anyone know how to force GRUB2 to ignore if the last boot sequence wasn't ok, or, at least, if is possible make it always show a countdown in the menu.

The actual version of GRUB2 in karmic, after an unsuccessful shutdown (lets say, a power fail or press power button while starting up to force a premature shutdown) GRUB2 will show the menu without a countdown. It will stay like that until the enter key is pressed.

This shouldn't be a problem IF I have a keyboard connect to my computer… Since I only run XBMC, I only have a remote control connect, and the control only works after the driver is loaded. So, when the computer is stuck at GRUB2 menu, I need to connect a keyboard just to press enter.

If this happens when my wife or kids are using the unit is a bigger problem yet!

I've try to force the GRUB to away show the menu, by commenting the line "GRUB_HIDDEN_TIMEOUT=0". In fact, now GRUB2 always display the menu, but there isn't a countdown when the last boot wasn't finished (so, display the menu doesn't help anything).

Thanks in advance,
FireMan.
Reply
#2
There's some other setting for the timer when a previous boot failed. Default is -1 to disable, which is very sane. See /etc/default/grub or similar, this has nothing to do with XBMC.
Reply
#3
I noticed this today as well. Maybe this link will be helpful, but I'm not sure which option it is:
http://ubuntuforums.org/showthread.php?t=1195275
Reply
#4
Thanks for the replies.
I can't found any option referring to a timer if a previous boot failed in /etc/default/grub. All listed options in that file are:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=" "
#GRUB_TERMINAL=console
#GRUB_GFXMODE=640x480
#GRUB_DISABLE_LINUX_UUID=true
#GRUB_DISABLE_LINUX_RECOVERY="true"

Cheers,
FireMan.
Reply
#5
I found the solution. Like althekiller said, there is an option that -1 value is default, but is in /etc/grub.d/00_header:

Code:
if [ \${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi

What is need is just change the 1st timeout from -1 to a value you like and run 'sudo update-grub2'.
The value 0 will bypass the menu and any value >=1 is the time of countdown after a unsuccessful boot.

Cheers.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Help with GRUB2: no countdown after unsuccessful shutdown0