Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2012 18:22:24 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        <freebsd-arch@freebsd.org>
Cc:        Adrian Chadd <adrian@freebsd.org>, Devin Teske <dteske@freebsd.org>
Subject:   HEADS-UP: Boot Loader Interface Fixes
Message-ID:  <9643EC52-E905-43FB-8B18-5EF052271725@fisglobal.com>

next in thread | raw e-mail | index | archive | help
Hi All,

I'm back with more changes to the boot loader menu.

First, don't panic!

Second, calm down!

Let's go over where we've been so-far so we don't repeat it here.

1. Changing the order of items should be avoided as it "moves the goal post=
s"

Agreed. This is not always avoidable, but should be avoided if possible.

2. Hiding "Single User" mode behind a submenu is bad.

Agreed. It's been suggested, "why can't it be an action item?" I've thought=
 about it and it doesn't seem right to be an action item because it's a set=
ting in loader.conf(5). However, nobody said it can't be both an action ite=
m _and_ a boolean option.

=3D=3D=3D

Now that we've covered those basics, let me explain the current situation:

If you are a proponent of the "goal posts" argument, then you may find your=
self astonished one day to find that the following procedure does not work:

+ Boot to beastie menu
+ Press V to enable verbosity
+ Press Enter to boot

The reason the above may fail and violate POLA is because of the improvemen=
ts made in SVN r241523. Since r241523, adding something like:

	boot_verbose=3D"YES"

to loader.conf(5) will not cause the boot menu to display a default ON-stat=
us for the Verbose boot option. In this case, booting and pressing V will d=
isable verbose boot.

Given that all boot options in the menu are dynamically-initializing and wi=
ll inherit the states of their respective options from loader.conf(5), a ne=
w problem emerges:

	Q. How does one go about restoring the defaults in the event that a system=
 doesn't boot?

Furthermore, the person may not know what the defaults are.

The need arises to have a "Load Defaults" option.

However, the introduction of this new menu item would both crowd the main m=
enu and (unless appended to the end) violate the first rule of not re-order=
ing items (which we just argued that it doesn't matter if you memorize the =
numbers, their initial state may be negated from what the user expects).

The latter arguments of crowded main-menu and that the memorization of numb=
ers is broken right now brings up the good idea of utilizing submenus (reas=
oning that if we have to make a change, best to make a change that can last=
).

=3D=3D=3D

I want to move the boot options into a submenu. This submenu will have all =
the boot options you see today on the main menu.

At the same time, add a "Load Defaults" action item for resetting the vario=
us boot options to their hard-coded defaults (overriding loader.conf(5) inh=
eritance).

=3D=3D=3D

While proposing this, I realize that we need an easy way to get to single-u=
ser mode. So in-addition to be able to access SUM as a boolean option in th=
e "Boot Options" submenu, I propose adding a new "alternate boot" menu item=
 to the main menu.

At the same time, I've recognized the need to have more feedback in the "Bo=
ot" option. For example, it would be nice if setting boot_single=3D"YES" in=
 loader.conf(5) that the first menu item said "Boot Single User [Enter]" --=
 vociferating the default boot action. Meanwhile, the "Alternate Boot" (not=
 actually titled that) gives a quick and easy way of booting Multi-User in =
the case of boot_single=3D"YES" or vice-versa.

=3D=3D=3D

Last, but not least, pictures=85

Here's the proposed new main-menu (with loader_color=3D"YES" in loader.conf=
(5)):

https://twitter.com/devinteske/status/267082532976218113

and here's the submenu for the Boot Options:

https://twitter.com/devinteske/status/267083020400488449

--=20
Devin

P.S. http://bikeshed.org


=3D=3D=3D

Make the following interface changes to my beastie boot menu:
+ Move boot options to a submenu
+ Add a new "Boot Single" menu item=20
+ Make "Boot" item and new "Boot Single" item reverse when boot_single is s=
et
+ Add new "Load Defaults" item (in new "Boot Options" submenu) for overridd=
ing
  loader.conf(5) provided values with system defaults.

PR:
Submitted by:
Reviewed by:    adrian (co-mentor) [pending your review]
Approved by:    adrian (co-mentor) [pending your approval]
Obtained from:
MFC after:
Security:
--This line, and those below, will be ignored--
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    forth/menu-commands.4th
M    forth/menu.rc


_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
 that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9643EC52-E905-43FB-8B18-5EF052271725>