It build the menu using either a static list of partitions (filtered by name
and/or unit) or by using the BOOTME attribute. Under the hood it use the
PARTITION_INFO protocol if available but fallback to builtin GPT parsing when
missing.
The following tunables are available to tweak the menu:
- partmenu_default What partition to try when the user don't press any key after partmenu_delay seconds. Only value supported: firstbootme.
- partmenu_firstkey The first key to use when building the menu. Default to 0.
- partmenu_maxdelay How many seconds to wait for user input. Default to 10 seconds.
- partmenu_names Name of partitions to include in the menu.
- partmenu_units Unit (i.e., partition number) of partitions to include in the menu.
Note that you can combine partmenu_default=firstbootme with partmenu_names
or partmenu_units to be able to easily change the default boot partition.
With the following in loader.conf:
# Two partitions, defaulting to the first one having the BOOTME attribute partmenu_default=firstbootme partmenu_names=2,7
You can switch default from 2 to 7 as follow:
gpart unset -a bootme -i 2 ada0 gpart set -a bootme -i 7 ada0
Here is an example of menu:
>>> Partitions [1] Boot MAIN [2] Boot BACKUP [i] Display Information Default: firstbootme, MAIN Choose: boot MAIN
This patch follow a discussion in PR#207940.