1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
.. SPDX-License-Identifier: GPL-2.0+:
.. index::
single: bootmeth (command)
bootmeth command
================
Synopsis
--------
::
bootmeth list [-a] - list selected bootmeths (-a for all)
bootmeth order "[<bm> ...]" - select the order of bootmeths
bootmeth set <bootmeth> <property> <value> - set optional property
Description
-----------
The `bootmeth` command is used to manage bootmeths. It can list them and change
the order in which they are used.
See :doc:`/develop/bootstd/index` for more information.
.. _bootmeth_order:
bootmeth order
~~~~~~~~~~~~~~
Selects which bootmeths to use and the order in which they are invoked. When
scanning bootdevs, each bootmeth is tried in turn to see if it can find a valid
bootflow. You can use this command to adjust the order or even to omit some
boomeths.
The argument is a quoted list of bootmeths to use, by name. If global bootmeths
are included, they must be at the end, otherwise the scanning mechanism will not
work correctly.
bootmeth list
~~~~~~~~~~~~~
This lists the selected bootmeths, or all of them, if the `-a` flag is used.
The format looks like this:
===== === ================== =================================
Order Seq Name Description
===== === ================== =================================
0 0 extlinux Extlinux boot from a block device
1 1 efi EFI boot from an .efi file
2 2 pxe PXE boot from a network device
3 3 sandbox Sandbox boot for testing
glob 4 efi_mgr EFI bootmgr flow
===== === ================== =================================
The fields are as follows:
Order:
The order in which these bootmeths are invoked for each bootdev. If this
shows as a hyphen, then the bootmeth is not in the current ordering. If it
shows as 'glob', then this is a global bootmeth and should be at the end.
Seq:
The sequence number of the bootmeth, i.e. the normal ordering if none is set
Name:
Name of the bootmeth
Description:
A friendly description for the bootmeth
Example
-------
This shows listing bootmeths. All are present and in the normal order::
=> bootmeth list
Order Seq Name Description
----- --- ------------------ ------------------
0 0 distro Extlinux boot from a block device
1 1 efi EFI boot from an .efi file
2 2 pxe PXE boot from a network device
3 3 sandbox Sandbox boot for testing
4 4 efi_mgr EFI bootmgr flow
----- --- ------------------ ------------------
(5 bootmeths)
Now the order is changed, to include only two of them::
=> bootmeth order "sandbox distro"
=> bootmeth list
Order Seq Name Description
----- --- ------------------ ------------------
0 3 sandbox Sandbox boot for testing
1 0 distro Extlinux boot from a block device
----- --- ------------------ ------------------
(2 bootmeths)
The -a flag shows all bootmeths so you can clearly see which ones are used and
which are not::
=> bootmeth list -a
Order Seq Name Description
----- --- ------------------ ------------------
1 0 distro Extlinux boot from a block device
- 1 efi EFI boot from an .efi file
- 2 pxe PXE boot from a network device
0 3 sandbox Sandbox boot for testing
- 4 efi_mgr EFI bootmgr flow
----- --- ------------------ ------------------
(5 bootmeths)
bootmeth set
~~~~~~~~~~~~
Allows setting of bootmeth specific configuration. This allows finer grain
control over the boot process in specific instances.
Supported Configuration Options
-------------------------------
The following configuration options are currently supported:
======== =================== ====== ===============================
Property Supported Bootmeths Values Description
======== =================== ====== ===============================
fallback extlinux 0 | 1 Enable or disable fallback path
======== =================== ====== ===============================
Bootmeth set Example
--------------------
With the bootcount functionality enabled, when the bootlimit is reached, the
`altbootcmd` environment variable lists the command used for booting rather
than `bootcmd`. We can set the fallback configuration to cause the fallback
boot option to be preferred, to revert to a previous known working boot option
after a failed update for example. So if `bootcmd` is set to::
bootflow scan -lb
We would set "altbootcmd" to::
bootmeth set extlinux fallback 1; bootflow scan -lb
|