* grub2: Patch to correct hidden timeout behavior
@ 2013-11-22 20:34 Andreas Cadhalpun
2013-11-22 21:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Cadhalpun @ 2013-11-22 20:34 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]
Hi,
I'm using Debian with grub version 2.00-20.
My /etc/default/grub configuration contains the following lines:
GRUB_TIMEOUT=-1
GRUB_HIDDEN_TIMEOUT=3
Expected behavior: When booting, grub should display a three second
countdown and if no key is pressed, boot the default grub entry, after
the countdown finishes.
Current behavior: When booting, grub displays a three second countdown
and if no key is pressed, the grub menu is shown, after the countdown
finishes.
The problem lies in the 00_header.in script [1], specifically:
if sleep$verbose --interruptible ${1} ; then
set timeout=${2}
fi
This just always sets the countdown to GRUB_TIMEOUT, even if the sleep
is not interrupted. I think it should be something like:
if sleep$verbose --interruptible ${1} ; then
set timeout=0
else
set timeout=${2}
fi
I created a patch to fix this (see attachment). Please include the patch.
Best regards,
Andreas
1: http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub.d/00_header.in
[-- Attachment #2: HIDDEN_TIMEOUT.patch --]
[-- Type: text/x-patch, Size: 384 bytes --]
diff -rup grub2-2.00.orig/util/grub.d/00_header.in grub2-2.00/util/grub.d/00_header.in
--- grub2-2.00.orig/util/grub.d/00_header.in 2013-11-21 19:01:07.000000000 +0100
+++ grub2-2.00/util/grub.d/00_header.in 2013-11-22 19:23:22.208203853 +0100
@@ -315,6 +315,8 @@ EOF
fi
cat << EOF
if sleep$verbose --interruptible ${1} ; then
+ set timeout=0
+else
set timeout=${2}
fi
EOF
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: grub2: Patch to correct hidden timeout behavior
2013-11-22 20:34 grub2: Patch to correct hidden timeout behavior Andreas Cadhalpun
@ 2013-11-22 21:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-22 21:51 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
On 22.11.2013 21:34, Andreas Cadhalpun wrote:
> Hi,
>
> I'm using Debian with grub version 2.00-20.
> My /etc/default/grub configuration contains the following lines:
> GRUB_TIMEOUT=-1
> GRUB_HIDDEN_TIMEOUT=3
>
> Expected behavior: When booting, grub should display a three second
> countdown and if no key is pressed, boot the default grub entry, after
> the countdown finishes.
>
> Current behavior: When booting, grub displays a three second countdown
> and if no key is pressed, the grub menu is shown, after the countdown
> finishes.
>
> The problem lies in the 00_header.in script [1], specifically:
> if sleep$verbose --interruptible ${1} ; then
> set timeout=${2}
> fi
>
AFAIR this behaviour is documented and reason for it are platforms
without keystatus. Just set GRUB_TIMEOUT to 0 to have behaviour that you
want.
> This just always sets the countdown to GRUB_TIMEOUT, even if the sleep
> is not interrupted. I think it should be something like:
>
> if sleep$verbose --interruptible ${1} ; then
> set timeout=0
> else
> set timeout=${2}
> fi
>
> I created a patch to fix this (see attachment). Please include the patch.
>
> Best regards,
> Andreas
>
>
> 1: http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub.d/00_header.in
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-22 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 20:34 grub2: Patch to correct hidden timeout behavior Andreas Cadhalpun
2013-11-22 21:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).