]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/defaults/loader.conf.5
MFC lualoader read-conf support: r360420-r360423, r360425, r360427, r360486,
[FreeBSD/FreeBSD.git] / stand / defaults / loader.conf.5
1 .\" Copyright (c) 1999 Daniel C. Sobral
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .Dd April 29, 2020
27 .Dt LOADER.CONF 5
28 .Os
29 .Sh NAME
30 .Nm loader.conf
31 .Nd "system bootstrap configuration information"
32 .Sh DESCRIPTION
33 The file
34 .Nm
35 contains descriptive information on bootstrapping the system.
36 Through
37 it you can specify the kernel to be booted, parameters to be passed to
38 it, and additional modules to be loaded; and generally set all variables
39 described in
40 .Xr loader 8 .
41 .Pp
42 .Sh SYNTAX
43 Though
44 .Nm Ns 's
45 format was defined explicitly to resemble
46 .Xr rc.conf 5 ,
47 and can be sourced by
48 .Xr sh 1 ,
49 some settings are treated in a special fashion.
50 Also, the
51 behavior of some settings is defined by the setting's suffix;
52 the prefix identifies which module the setting controls.
53 .Pp
54 The general parsing rules are:
55 .Bl -bullet
56 .It
57 Spaces and empty lines are ignored.
58 .It
59 A # sign will mark the remainder of the line as a comment.
60 .It
61 Only one setting can be present on each line.
62 .El
63 .Pp
64 All settings have the following format:
65 .Pp
66 .Dl variable="value"
67 .Pp
68 Unless it belongs to one of the classes of settings that receive special
69 treatment, a setting will set the value of a
70 .Xr loader 8
71 environment variable.
72 The settings that receive special
73 treatment are listed below.
74 Settings beginning with
75 .Qq *
76 below define the modules to be loaded and
77 may have any prefix; the prefix identifies a module.
78 All such settings sharing a common
79 prefix refer to the same module.
80 .Bl -tag -width Ar
81 .It Ar exec
82 Immediately executes a
83 .Xr loader 8
84 command.
85 This type of setting cannot be processed by programs other
86 than
87 .Xr loader 8 ,
88 so its use should be avoided.
89 Multiple instances of it will be processed
90 independently.
91 .It Ar loader_conf_files
92 Defines additional configuration files to be processed right after the
93 present file.
94 .Ar loader_conf_files
95 should be treated as write-only.
96 One cannot depend on any value remaining in the loader environment or carried
97 over into the kernel environment.
98 .It Ar kernel
99 Name of the kernel to be loaded.
100 If no kernel name is set, no additional
101 modules will be loaded.
102 The name must be a subdirectory of
103 .Pa /boot
104 that contains a kernel.
105 .It Ar kernel_options
106 Flags to be passed to the kernel.
107 .It Ar vfs.root.mountfrom
108 Specify the root partition to mount.
109 For example:
110 .Pp
111 .Dl vfs.root.mountfrom="ufs:/dev/da0s1a"
112 .Pp
113 .Xr loader 8
114 automatically calculates the value of this tunable from
115 .Pa /etc/fstab
116 from the partition the kernel was loaded from.
117 The calculated value might be calculated incorrectly when
118 .Pa /etc/fstab
119 is not available during
120 .Xr loader 8
121 startup (as during diskless booting from NFS), or if a different
122 device is desired by the user.
123 The preferred value can be set in
124 .Pa /loader.conf .
125 .Pp
126 The value can also be overridden from the
127 .Xr loader 8
128 command line.
129 This is useful for system recovery when
130 .Pa /etc/fstab
131 is damaged, lost, or read from the wrong partition.
132 .It Ar password
133 Protect boot menu with a password without interrupting
134 .Ic autoboot
135 process.
136 The password should be in clear text format.
137 If a password is set, boot menu will not appear until any key is pressed during
138 countdown period specified by
139 .Va autoboot_delay
140 variable or
141 .Ic autoboot
142 process fails.
143 In both cases user should provide specified password to be able to access boot
144 menu.
145 .It Ar bootlock_password
146 Provides a password to be required by check-password before execution is
147 allowed to continue.
148 The password should be in clear text format.
149 If a password is set, the user must provide specified password to boot.
150 .It Ar verbose_loading
151 If set to
152 .Dq YES ,
153 module names will be displayed as they are loaded.
154 .It Ar module_blacklist
155 Blacklist of modules.
156 Modules specified in the blacklist may not be loaded automatically with a
157 .Ar *_load
158 directive, but they may be loaded directly at the
159 .Xr loader 8
160 prompt.
161 Blacklisted modules may still be loaded indirectly as dependencies of other
162 modules.
163 .It Ar *_load
164 If set to
165 .Dq YES ,
166 that module will be loaded.
167 If no name is defined (see below), the
168 module's name is taken to be the same as the prefix.
169 .It Ar *_name
170 Defines the name of the module.
171 .It Ar *_type
172 Defines the module's type.
173 If none is given, it defaults to a kld module.
174 .It Ar *_flags
175 Flags and parameters to be passed to the module.
176 .It Ar *_before
177 Commands to be executed before the module is loaded.
178 Use of this setting
179 should be avoided.
180 .It Ar *_after
181 Commands to be executed after the module is loaded.
182 Use of this setting
183 should be avoided.
184 .It Ar *_error
185 Commands to be executed if the loading of a module fails.
186 Except for the
187 special value
188 .Dq abort ,
189 which aborts the bootstrap process, use of this setting should be avoided.
190 .El
191 .Pp
192 .Em WARNING:
193 developers should never use these suffixes for any kernel environment
194 variables (tunables) or conflicts will result.
195 .Sh DEFAULT SETTINGS
196 Most of
197 .Nm Ns 's
198 default settings can be ignored.
199 The few of them which are important
200 or useful are:
201 .Bl -tag -width bootfile -offset indent
202 .It Va bitmap_load
203 .Pq Dq NO
204 If set to
205 .Dq YES ,
206 a bitmap will be loaded to be displayed on screen while booting.
207 .It Va bitmap_name
208 .Pq Dq Pa /boot/splash.bmp
209 Name of the bitmap to be loaded.
210 Any other name can be used.
211 .It Va comconsole_speed
212 .Dq ( 9600
213 or the value of the
214 .Va BOOT_COMCONSOLE_SPEED
215 variable when
216 .Xr loader 8
217 was compiled).
218 Sets the speed of the serial console.
219 If the previous boot loader stage specified that a serial console
220 is in use then the default speed is determined from the current
221 serial port speed setting.
222 .It Va console
223 .Pq Dq vidconsole
224 .Dq comconsole
225 selects serial console,
226 .Dq vidconsole
227 selects the video console,
228 .Dq nullconsole
229 selects a mute console
230 (useful for systems with neither a video console nor a serial port), and
231 .Dq spinconsole
232 selects the video console which prevents any input and hides all output
233 replacing it with
234 .Dq spinning
235 character (useful for embedded products and such).
236 .It Va efi_max_resolution
237 Specify the maximum desired resolution for the EFI console.
238 The following values are accepted:
239 .Bl -column "WidthxHeight"
240 .It Sy Value Ta Sy Resolution
241 .It 480p Ta 640x480
242 .It 720p Ta 1280x720
243 .It 1080p Ta 1920x1080
244 .It 2160p Ta 3840x2160
245 .It 4k Ta 3840x2160
246 .It 5k Ta 5120x2880
247 .It Va Width Ns x Ns Va Height Ta Va Width Ns x Ns Va Height
248 .El
249 .It Va kernel
250 .Pq Dq kernel
251 .It Va kernels
252 .Pq Dq kernel kernel.old
253 Space or comma separated list of kernels to present in the boot menu.
254 .It Va loader_conf_files
255 .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
256 .It Va splash_bmp_load
257 .Pq Dq NO
258 If set to
259 .Dq YES ,
260 will load the splash screen module, making it possible to display a bmp image
261 on the screen while booting.
262 .It Va splash_pcx_load
263 .Pq Dq NO
264 If set to
265 .Dq YES ,
266 will load the splash screen module, making it possible to display a pcx image
267 on the screen while booting.
268 .It Va vesa_load
269 .Pq Dq NO
270 If set to
271 .Dq YES ,
272 the vesa module will be loaded, enabling bitmaps above VGA resolution to
273 be displayed.
274 .It Va beastie_disable
275 If set to
276 .Dq YES ,
277 the beastie boot menu will be skipped.
278 .It Va loader_logo Pq Dq Li orbbw
279 Selects a desired logo in the beastie boot menu.
280 Possible values are:
281 .Dq Li orbbw ,
282 .Dq Li orb ,
283 .Dq Li fbsdbw ,
284 .Dq Li beastiebw ,
285 .Dq Li beastie ,
286 and
287 .Dq Li none .
288 .It Va loader_color
289 If set to
290 .Dq NO ,
291 the beastie boot menu will be displayed without ANSI coloring.
292 .It Va entropy_cache_load
293 .Pq Dq YES
294 If set to
295 .Dq NO ,
296 the very early
297 boot-time entropy file
298 will not be loaded.
299 See the entropy entries in
300 .Xr rc.conf 5 .
301 .It Va entropy_cache_name
302 .Pq Dq /boot/entropy
303 The name of the very early
304 boot-time entropy cache file.
305 .It Va cpu_microcode_load
306 .Pq Dq NO
307 If set to
308 .Dq YES ,
309 the microcode update file specified by
310 .Va cpu_microcode_name
311 will be loaded and applied very early during boot.
312 This provides functionality similar to
313 .Xr cpucontrol 8
314 but ensures that CPU features enabled by microcode updates can be
315 used by the kernel.
316 The update will be re-applied automatically when resuming from an
317 ACPI sleep state.
318 If the update file contains updates for multiple processor models,
319 the kernel will search for and extract a matching update.
320 Currently this setting is supported only on Intel
321 .Dv i386
322 and
323 .Dv amd64
324 processors.
325 It has no effect on other processor types.
326 .It Va cpu_microcode_name
327 A path to a microcode update file.
328 .El
329 .Sh OTHER SETTINGS
330 Other settings that may be used in
331 .Nm
332 that have no default value:
333 .Bl -tag -width bootfile -offset indent
334 .It Va fdt_overlays
335 Specifies a comma-delimited list of FDT overlays to apply.
336 .Pa /boot/dtb/overlays
337 is created by default for overlays to be placed in.
338 .It Va kernels_autodetect
339 If set to
340 .Dq YES ,
341 attempt to auto-detect kernels installed in
342 .Pa /boot .
343 This is an option specific to the Lua-based loader.
344 It is not available in the default Forth-based loader.
345 .El
346 .Sh FILES
347 .Bl -tag -width /boot/defaults/loader.conf -compact
348 .It Pa /boot/defaults/loader.conf
349 default settings -- do not change this file.
350 .It Pa /boot/loader.conf
351 user defined settings.
352 .It Pa /boot/loader.conf.local
353 machine-specific settings for sites with a common loader.conf.
354 .El
355 .Sh SEE ALSO
356 .Xr rc.conf 5 ,
357 .Xr boot 8 ,
358 .Xr cpucontrol 8 ,
359 .Xr loader 8 ,
360 .Xr loader.4th 8
361 .Sh HISTORY
362 The file
363 .Nm
364 first appeared in
365 .Fx 3.2 .
366 .Sh AUTHORS
367 This manual page was written by
368 .An Daniel C. Sobral Aq dcs@FreeBSD.org .
369 .Sh BUGS
370 The
371 .Xr loader 8
372 stops reading
373 .Nm
374 when it encounters a syntax error, so any options which are vital for
375 booting a particular system (i.e.\&
376 .Dq Va hw.ata.ata_dma Ns "=0" )
377 should precede any experimental additions to
378 .Nm .