[SeaBIOS] [PATCH] Skip boot menu and timeout with only one boot device

Paul Menzel posted 1 patch 3 weeks ago
Failed in applying to current master (apply log)
src/boot.c | 6 ++++++
1 file changed, 6 insertions(+)

[SeaBIOS] [PATCH] Skip boot menu and timeout with only one boot device

Posted by Paul Menzel 3 weeks ago
From: Matt DeVillier <matt.devillier@gmail.com>
Date: Fri, 13 Jun 2014 17:20:23 -0500

Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
Upstream from https://github.com/MrChromebox/SeaBIOS/

  src/boot.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/src/boot.c b/src/boot.c
index afeb36a..ace3fa5 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -670,6 +670,12 @@ interactive_bootmenu(void)
      if (! CONFIG_BOOTMENU || !romfile_loadint("etc/show-boot-menu", 1))
          return;

+    // skip menu if only one boot device and no TPM
+    if ((NULL == BootList.first->next) && !tpm_can_show_menu()) {
+       printf("\n");
+       return;
+    }
+
      while (get_keystroke(0) >= 0)
          ;

-- 
2.25.1
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org

[SeaBIOS] Re: [PATCH] Skip boot menu and timeout with only one boot device

Posted by Kevin O'Connor 2 weeks ago
On Mon, Mar 16, 2020 at 10:32:41AM +0100, Paul Menzel wrote:
> From: Matt DeVillier <matt.devillier@gmail.com>
> Date: Fri, 13 Jun 2014 17:20:23 -0500
> 
> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> Upstream from https://github.com/MrChromebox/SeaBIOS/

I don't think this is a good change to make.  In the event a user is
intending to have multiple boot devices, but only one happens to be
present due to a failure of some kind then the machine may incorrectly
boot into the wrong device.  This would make troubleshooting worse.
If the user does not want the bootmenu then I think it would be best
for the user to explicitly configure the machine to not present a boot
menu.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org

[SeaBIOS] Re: [PATCH] Skip boot menu and timeout with only one boot device

Posted by Gerd Hoffmann 3 weeks ago
On Mon, Mar 16, 2020 at 10:32:41AM +0100, Paul Menzel wrote:
> From: Matt DeVillier <matt.devillier@gmail.com>
> Date: Fri, 13 Jun 2014 17:20:23 -0500
> 
> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> Upstream from https://github.com/MrChromebox/SeaBIOS/
> 
>  src/boot.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/boot.c b/src/boot.c
> index afeb36a..ace3fa5 100644
> --- a/src/boot.c
> +++ b/src/boot.c
> @@ -670,6 +670,12 @@ interactive_bootmenu(void)
>      if (! CONFIG_BOOTMENU || !romfile_loadint("etc/show-boot-menu", 1))
>          return;
> 
> +    // skip menu if only one boot device and no TPM
> +    if ((NULL == BootList.first->next) && !tpm_can_show_menu()) {
> +       printf("\n");
> +       return;
> +    }

Looks reasonable.

cheers,
  Gerd
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org