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

Paul Menzel posted 1 patch 28 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 28 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 27 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 Kevin O'Connor 23 weeks ago
On Tue, Mar 17, 2020 at 08:27:59PM -0400, Kevin O'Connor wrote:
> 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.

Any further comments on this?

If not, I'm inclined to revert this change.

Thanks,
-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 Matt DeVillier 23 weeks ago
On Sun, Apr 19, 2020 at 10:40 AM Kevin O'Connor <kevin@koconnor.net> wrote:

> On Tue, Mar 17, 2020 at 08:27:59PM -0400, Kevin O'Connor wrote:
> > 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.
>
> Any further comments on this?
>
> If not, I'm inclined to revert this change.
>

instead of reverting, I'd say just make it conditional on a runtime config
flag, maybe /etc/boot-menu-skip or similar?


>
> Thanks,
> -Kevin
> _______________________________________________
> SeaBIOS mailing list -- seabios@seabios.org
> To unsubscribe send an email to seabios-leave@seabios.org
>
_______________________________________________
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 23 weeks ago
> > > 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.
> >
> > Any further comments on this?
> >
> > If not, I'm inclined to revert this change.
> >
> 
> instead of reverting, I'd say just make it conditional on a runtime config
> flag, maybe /etc/boot-menu-skip or similar?

We have a config option for the time seabios waits for the boot menu
keypress, so skipping the boot menu (unconditionally) can be configured
already.

The automatic in this patch (only offer the boot menu in case there is
something to choose, i.e. for example after plugging in a bootable usb
key) is a nifty idea, but I can see the trouble-shooting problems this
can bring (as outlined above).  So, no objections to revert this from
my side.

take care,
  Gerd
_______________________________________________
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 Paul Menzel 23 weeks ago
Dear Gerd, Kevin, and Matt,


Am 21.04.20 um 14:22 schrieb Gerd Hoffmann:
>>>> 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.
>>>
>>> Any further comments on this?
>>>
>>> If not, I'm inclined to revert this change.
>>>
>>
>> instead of reverting, I'd say just make it conditional on a runtime config
>> flag, maybe /etc/boot-menu-skip or similar?
> 
> We have a config option for the time seabios waits for the boot menu
> keypress, so skipping the boot menu (unconditionally) can be configured
> already.
> 
> The automatic in this patch (only offer the boot menu in case there is
> something to choose, i.e. for example after plugging in a bootable usb
> key) is a nifty idea, but I can see the trouble-shooting problems this
> can bring (as outlined above).  So, no objections to revert this from
> my side.

What do you think of extending the existing runtime configuration option 
`show-boot-menu`?

> | show-boot-menu      | Controls the display of the boot menu. Set to 0 to disable the boot menu.

0: disable
1: show unconditionally
2: show if more than one device is present


Kind regards,

Paul
_______________________________________________
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 28 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