Skip to contentSkip to conversation

Clarify "Press any key to continue..." message

PATCH In review Colin Watson 4 participants 8 messages Apr 3, 2014 – Jul 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Clarify "Press any key to continue..." message

When grub_wait_after_message says "Press any key to continue...", it really means that it will continue anyway after a short delay, but that you can press a key to skip the delay. Unfortunately, the delay is just long enough that in practice a number of users have time to see it, press a key, and then report a bug saying that their system won't boot without manual intervention, even though it would have booted just fine if they'd left it alone. Rephrase this message to make it clearer what's really happening.

* grub-core/normal/menu.c (grub_wait_after_message): Rephrase message to make it clear that GRUB will continue even if the user does not press a key.

---
 ChangeLog               | 6 ++++++
 grub-core/normal/menu.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
ChangeLog +6 -0
index 6eca73e..53c2aff 100644
@@ -1,3 +1,9 @@
+2014-04-03  Colin Watson  <[email protected]>
+
+	* grub-core/normal/menu.c (grub_wait_after_message): Rephrase
+	message to make it clear that GRUB will continue even if the user
+	does not press a key.
+
 2014-03-31  Thomas Falcon <[email protected]>
 
 	btrfs: fix get_root key comparison failures due to endianness
grub-core/normal/menu.c +3 -1
index b47991a..a6fa93c 100644
@@ -63,7 +63,9 @@ grub_wait_after_message (void)
 {
   grub_uint64_t endtime;
   grub_xputs ("\n");
-  grub_printf_ (N_("Press any key to continue..."));
+  grub_printf_ (N_(
+    "Waiting a moment so that you can read previous messages.\n"
+    "Press any key to skip this delay..."));
   grub_refresh ();
 
   endtime = grub_get_time_ms () + 10000;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 8 lines · Colin Watson

When grub_wait_after_message says "Press any key to continue...", it really means that it will continue anyway after a short delay, but that you can press a key to skip the delay. Unfortunately, the delay is just long enough that in practice a number of users have time to see it, press a key, and then report a bug saying that their system won't boot without manual intervention, even though it would have booted just fine if they'd left it alone. Rephrase this message to make it clearer what's really happening.

I have mixed feelings about changing this message since it is such a well known message. OTOH, I've never really liked it myself.

Maybe a better idea is to do a timeout message

Press any key for menu (boot will continue in 5 seconds) ... Press any key for menu (boot will continue in 4 seconds) ...
...
etc.

?

Quoted 39 lines

* grub-core/normal/menu.c (grub_wait_after_message): Rephrase message to make it clear that GRUB will continue even if the user does not press a key.

---
 ChangeLog               | 6 ++++++
 grub-core/normal/menu.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
ChangeLog +6 -0
index 6eca73e..53c2aff 100644
@@ -1,3 +1,9 @@
+2014-04-03  Colin Watson  <[email protected]>
+
+	* grub-core/normal/menu.c (grub_wait_after_message): Rephrase
+	message to make it clear that GRUB will continue even if the user
+	does not press a key.
+
 2014-03-31  Thomas Falcon <[email protected]>
 
 	btrfs: fix get_root key comparison failures due to endianness
grub-core/normal/menu.c +3 -1
index b47991a..a6fa93c 100644
@@ -63,7 +63,9 @@ grub_wait_after_message (void)
 {
   grub_uint64_t endtime;
   grub_xputs ("\n");
-  grub_printf_ (N_("Press any key to continue..."));
+  grub_printf_ (N_(
+    "Waiting a moment so that you can read previous messages.\n"
+    "Press any key to skip this delay..."));
   grub_refresh ();
 
   endtime = grub_get_time_ms () + 10000;
#2 lore raw
Quoted 10 lines · Prarit Bhargava
Quoted 8 lines · Colin Watson

When grub_wait_after_message says "Press any key to continue...", it really means that it will continue anyway after a short delay, but that you can press a key to skip the delay. Unfortunately, the delay is just long enough that in practice a number of users have time to see it, press a key, and then report a bug saying that their system won't boot without manual intervention, even though it would have booted just fine if they'd left it alone. Rephrase this message to make it clearer what's really happening.

Quoted 2 lines

I have mixed feelings about changing this message since it is such a well known message. OTOH, I've never really liked it myself.

Surely nobody can really be depending on it; I don't see a problem with changing that kind of text, in and of itself.

Quoted 8 lines

Maybe a better idea is to do a timeout message

Press any key for menu (boot will continue in 5 seconds) ... Press any key for menu (boot will continue in 4 seconds) ...
...
etc.

?

It's not necessarily "for menu" - you get this for errors after a menu item has been selected too, and then it's just a delay before booting.

Seems like a lot of effort. The actual delay is 2.5 seconds so a countdown would look jumpy at the end ...

Signature · 1 line
Colin Watson                                       [[email protected]]
#3 lore raw
Quoted 11 lines · Colin Watson
Quoted 10 lines · Prarit Bhargava
Quoted 8 lines · Colin Watson

When grub_wait_after_message says "Press any key to continue...", it really means that it will continue anyway after a short delay, but that you can press a key to skip the delay. Unfortunately, the delay is just long enough that in practice a number of users have time to see it, press a key, and then report a bug saying that their system won't boot without manual intervention, even though it would have booted just fine if they'd left it alone. Rephrase this message to make it clearer what's really happening.

Quoted 5 lines
Quoted 2 lines

I have mixed feelings about changing this message since it is such a well known message. OTOH, I've never really liked it myself.

Surely nobody can really be depending on it; I don't see a problem with changing that kind of text, in and of itself.

Yeah ... but it is one of those things like the NMI dazed and confused message.
Everyone knows about it, everyone agrees it could be better, but no one wants
to change it because so much open documentation references it.

Try googling linux + "Press any key to continue" and you'll see what I mean.

But again, I've never really cared for the message so I'm favour of changing it ;)

Quoted 8 lines
Quoted 8 lines

Maybe a better idea is to do a timeout message

Press any key for menu (boot will continue in 5 seconds) ... Press any key for menu (boot will continue in 4 seconds) ...
...
etc.

Quoted 4 lines
Quoted 1 line

?

It's not necessarily "for menu" - you get this for errors after a menu item has been selected too, and then it's just a delay before booting.

Hmm ... really? After a menu item has been selected? I've never done that before.

Quoted 4 lines

Seems like a lot of effort. The actual delay is 2.5 seconds so a countdown would look jumpy at the end ...

Just do a countdown and change the delay to an even 3 seconds. Who is really going to care about a 1/2 second?

P.

#4 lore raw
Quoted 5 lines · Prarit Bhargava
Quoted 4 lines · Colin Watson
Quoted 2 lines · Prarit Bhargava

I have mixed feelings about changing this message since it is such a well known message. OTOH, I've never really liked it myself.

Quoted 8 lines
Quoted 2 lines

Surely nobody can really be depending on it; I don't see a problem with changing that kind of text, in and of itself.

Yeah ... but it is one of those things like the NMI dazed and confused message.
Everyone knows about it, everyone agrees it could be better, but no one wants
to change it because so much open documentation references it.

Try googling linux + "Press any key to continue" and you'll see what I mean.

Of the first two pages of hits, only two relate to GRUB 2; and given that there's still another instance of "Press any key to continue" in the code, even those might not be relevant.

Anyway, I really don't think this is at all important given that most of those hits are not exactly very informative anyway, and we should not shy away from improving messages just because people have made terrible attempts to explain what's going on with a previous version of the message with an open-ended set of causes.

Quoted 4 lines
Quoted 2 lines

It's not necessarily "for menu" - you get this for errors after a menu item has been selected too, and then it's just a delay before booting.

Hmm ... really? After a menu item has been selected? I've never done that before.

Yes; for instance save_env in a menu item when /boot isn't writeable by GRUB will do it.

Quoted 5 lines
Quoted 2 lines

Seems like a lot of effort. The actual delay is 2.5 seconds so a countdown would look jumpy at the end ...

Just do a countdown and change the delay to an even 3 seconds. Who is really going to care about a 1/2 second?

I don't think a countdown is necessary here, so I'm not going to spend time writing code for it. But of course you're free to do so ...

Signature · 1 line
Colin Watson                                       [[email protected]]
#6 lore raw
Quoted 5 lines · Andrey Borzenkov

В Thu, 3 Apr 2014 17:52:57 +0100
Colin Watson <[email protected]> пишет:

Quoted 1 line

Seems like a lot of effort. The actual delay is 2.5 seconds

May be I misunderstand it, but how 10000ms becomes 2.5 seconds?

Sorry, I was looking at DEFAULT_ENTRY_ERROR_DELAY_MS at the top of that file and didn't notice that grub_wait_after_message actually uses a different delay. (A countdown here still seems to me like code we don't need, though.)

Signature · 1 line
Colin Watson                                       [[email protected]]
#7 lore raw
In reply to Colin Watson

Go ahead

Quoted 47 lines · Colin Watson

When grub_wait_after_message says "Press any key to continue...", it really means that it will continue anyway after a short delay, but that you can press a key to skip the delay. Unfortunately, the delay is just long enough that in practice a number of users have time to see it, press a key, and then report a bug saying that their system won't boot without manual intervention, even though it would have booted just fine if they'd left it alone. Rephrase this message to make it clearer what's really happening.

* grub-core/normal/menu.c (grub_wait_after_message): Rephrase message to make it clear that GRUB will continue even if the user does not press a key.

---
 ChangeLog               | 6 ++++++
 grub-core/normal/menu.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
ChangeLog +6 -0
index 6eca73e..53c2aff 100644
@@ -1,3 +1,9 @@
+2014-04-03  Colin Watson  <[email protected]>
+
+	* grub-core/normal/menu.c (grub_wait_after_message): Rephrase
+	message to make it clear that GRUB will continue even if the user
+	does not press a key.
+
 2014-03-31  Thomas Falcon <[email protected]>
 
 	btrfs: fix get_root key comparison failures due to endianness
grub-core/normal/menu.c +3 -1
index b47991a..a6fa93c 100644
@@ -63,7 +63,9 @@ grub_wait_after_message (void)
 {
   grub_uint64_t endtime;
   grub_xputs ("\n");
-  grub_printf_ (N_("Press any key to continue..."));
+  grub_printf_ (N_(
+    "Waiting a moment so that you can read previous messages.\n"
+    "Press any key to skip this delay..."));
   grub_refresh ();
 
   endtime = grub_get_time_ms () + 10000;