xref: /freebsd/stand/defaults/loader.conf.5 (revision 2c58a1939390e85d45d0ba68e881f49e45865d7e)
1b6955dfdSWarner Losh.\" Copyright (c) 1999 Daniel C. Sobral
2b6955dfdSWarner Losh.\" All rights reserved.
3b6955dfdSWarner Losh.\"
4b6955dfdSWarner Losh.\" Redistribution and use in source and binary forms, with or without
5b6955dfdSWarner Losh.\" modification, are permitted provided that the following conditions
6b6955dfdSWarner Losh.\" are met:
7b6955dfdSWarner Losh.\" 1. Redistributions of source code must retain the above copyright
8b6955dfdSWarner Losh.\"    notice, this list of conditions and the following disclaimer.
9b6955dfdSWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright
10b6955dfdSWarner Losh.\"    notice, this list of conditions and the following disclaimer in the
11b6955dfdSWarner Losh.\"    documentation and/or other materials provided with the distribution.
12b6955dfdSWarner Losh.\"
13b6955dfdSWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14b6955dfdSWarner Losh.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15b6955dfdSWarner Losh.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16b6955dfdSWarner Losh.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17b6955dfdSWarner Losh.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18b6955dfdSWarner Losh.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19b6955dfdSWarner Losh.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20b6955dfdSWarner Losh.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21b6955dfdSWarner Losh.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22b6955dfdSWarner Losh.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23b6955dfdSWarner Losh.\" SUCH DAMAGE.
24b6955dfdSWarner Losh.\"
25b6955dfdSWarner Losh.\" $FreeBSD$
26c69defc2SEd Maste.Dd March 19, 2018
27b6955dfdSWarner Losh.Dt LOADER.CONF 5
28b6955dfdSWarner Losh.Os
29b6955dfdSWarner Losh.Sh NAME
30b6955dfdSWarner Losh.Nm loader.conf
31b6955dfdSWarner Losh.Nd "system bootstrap configuration information"
32b6955dfdSWarner Losh.Sh DESCRIPTION
33b6955dfdSWarner LoshThe file
34b6955dfdSWarner Losh.Nm
35b6955dfdSWarner Loshcontains descriptive information on bootstrapping the system.
36b6955dfdSWarner LoshThrough
37b6955dfdSWarner Loshit you can specify the kernel to be booted, parameters to be passed to
38b6955dfdSWarner Loshit, and additional modules to be loaded; and generally set all variables
39b6955dfdSWarner Loshdescribed in
40b6955dfdSWarner Losh.Xr loader 8 .
41b6955dfdSWarner Losh.Pp
42b6955dfdSWarner Losh.Sh SYNTAX
43b6955dfdSWarner LoshThough
44b6955dfdSWarner Losh.Nm Ns 's
45b6955dfdSWarner Loshformat was defined explicitly to resemble
46b6955dfdSWarner Losh.Xr rc.conf 5 ,
47b6955dfdSWarner Loshand can be sourced by
48b6955dfdSWarner Losh.Xr sh 1 ,
49b6955dfdSWarner Loshsome settings are treated in a special fashion.
50b6955dfdSWarner LoshAlso, the
51b6955dfdSWarner Loshbehavior of some settings is defined by the setting's suffix;
52b6955dfdSWarner Loshthe prefix identifies which module the setting controls.
53b6955dfdSWarner Losh.Pp
54b6955dfdSWarner LoshThe general parsing rules are:
55b6955dfdSWarner Losh.Bl -bullet
56b6955dfdSWarner Losh.It
57b6955dfdSWarner LoshSpaces and empty lines are ignored.
58b6955dfdSWarner Losh.It
59b6955dfdSWarner LoshA # sign will mark the remainder of the line as a comment.
60b6955dfdSWarner Losh.It
61b6955dfdSWarner LoshOnly one setting can be present on each line.
62b6955dfdSWarner Losh.El
63b6955dfdSWarner Losh.Pp
64b6955dfdSWarner LoshAll settings have the following format:
65b6955dfdSWarner Losh.Pp
66b6955dfdSWarner Losh.Dl variable="value"
67b6955dfdSWarner Losh.Pp
68b6955dfdSWarner LoshUnless it belongs to one of the classes of settings that receive special
69b6955dfdSWarner Loshtreatment, a setting will set the value of a
70b6955dfdSWarner Losh.Xr loader 8
71b6955dfdSWarner Loshenvironment variable.
72b6955dfdSWarner LoshThe settings that receive special
73b6955dfdSWarner Loshtreatment are listed below.
74b6955dfdSWarner LoshSettings beginning with
75b6955dfdSWarner Losh.Qq *
76b6955dfdSWarner Loshbelow define the modules to be loaded and
77b6955dfdSWarner Loshmay have any prefix; the prefix identifies a module.
78b6955dfdSWarner LoshAll such settings sharing a common
79b6955dfdSWarner Loshprefix refer to the same module.
80b6955dfdSWarner Losh.Bl -tag -width Ar
81b6955dfdSWarner Losh.It Ar exec
82b6955dfdSWarner LoshImmediately executes a
83b6955dfdSWarner Losh.Xr loader 8
84b6955dfdSWarner Loshcommand.
85b6955dfdSWarner LoshThis type of setting cannot be processed by programs other
86b6955dfdSWarner Loshthan
87b6955dfdSWarner Losh.Xr loader 8 ,
88b6955dfdSWarner Loshso its use should be avoided.
89b6955dfdSWarner LoshMultiple instances of it will be processed
90b6955dfdSWarner Loshindependently.
91b6955dfdSWarner Losh.It Ar loader_conf_files
92b6955dfdSWarner LoshDefines additional configuration files to be processed right after the
93b6955dfdSWarner Loshpresent file.
94b6955dfdSWarner Losh.It Ar kernel
95b6955dfdSWarner LoshName of the kernel to be loaded.
96b6955dfdSWarner LoshIf no kernel name is set, no additional
97b6955dfdSWarner Loshmodules will be loaded.
98b6955dfdSWarner LoshThe name must be a subdirectory of
99b6955dfdSWarner Losh.Pa /boot
100b6955dfdSWarner Loshthat contains a kernel.
101b6955dfdSWarner Losh.It Ar kernel_options
102b6955dfdSWarner LoshFlags to be passed to the kernel.
103b6955dfdSWarner Losh.It Ar vfs.root.mountfrom
104b6955dfdSWarner LoshSpecify the root partition to mount.
105b6955dfdSWarner LoshFor example:
106b6955dfdSWarner Losh.Pp
107b6955dfdSWarner Losh.Dl vfs.root.mountfrom="ufs:/dev/da0s1a"
108b6955dfdSWarner Losh.Pp
109b6955dfdSWarner Losh.Xr loader 8
110b6955dfdSWarner Loshautomatically calculates the value of this tunable from
111b6955dfdSWarner Losh.Pa /etc/fstab
112b6955dfdSWarner Loshfrom the partition the kernel was loaded from.
113b6955dfdSWarner LoshThe calculated value might be calculated incorrectly when
114b6955dfdSWarner Losh.Pa /etc/fstab
115b6955dfdSWarner Loshis not available during
116b6955dfdSWarner Losh.Xr loader 8
117b6955dfdSWarner Loshstartup (as during diskless booting from NFS), or if a different
118b6955dfdSWarner Loshdevice is desired by the user.
119b6955dfdSWarner LoshThe preferred value can be set in
120b6955dfdSWarner Losh.Pa /loader.conf .
121b6955dfdSWarner Losh.Pp
122b6955dfdSWarner LoshThe value can also be overridden from the
123b6955dfdSWarner Losh.Xr loader 8
124b6955dfdSWarner Loshcommand line.
125b6955dfdSWarner LoshThis is useful for system recovery when
126b6955dfdSWarner Losh.Pa /etc/fstab
127b6955dfdSWarner Loshis damaged, lost, or read from the wrong partition.
128b6955dfdSWarner Losh.It Ar password
129b6955dfdSWarner LoshProtect boot menu with a password without interrupting
130b6955dfdSWarner Losh.Ic autoboot
131b6955dfdSWarner Loshprocess.
132b6955dfdSWarner LoshThe password should be in clear text format.
133b6955dfdSWarner LoshIf a password is set, boot menu will not appear until any key is pressed during
134b6955dfdSWarner Loshcountdown period specified by
135b6955dfdSWarner Losh.Va autoboot_delay
136b6955dfdSWarner Loshvariable or
137b6955dfdSWarner Losh.Ic autoboot
138b6955dfdSWarner Loshprocess fails.
139b6955dfdSWarner LoshIn both cases user should provide specified password to be able to access boot
140b6955dfdSWarner Loshmenu.
141b6955dfdSWarner Losh.It Ar bootlock_password
142b6955dfdSWarner LoshProvides a password to be required by check-password before execution is
143b6955dfdSWarner Loshallowed to continue.
144b6955dfdSWarner LoshThe password should be in clear text format.
145b6955dfdSWarner LoshIf a password is set, the user must provide specified password to boot.
146b6955dfdSWarner Losh.It Ar verbose_loading
147b6955dfdSWarner LoshIf set to
148b6955dfdSWarner Losh.Dq YES ,
149b6955dfdSWarner Loshmodule names will be displayed as they are loaded.
150b6955dfdSWarner Losh.It Ar *_load
151b6955dfdSWarner LoshIf set to
152b6955dfdSWarner Losh.Dq YES ,
153b6955dfdSWarner Loshthat module will be loaded.
154b6955dfdSWarner LoshIf no name is defined (see below), the
155b6955dfdSWarner Loshmodule's name is taken to be the same as the prefix.
156b6955dfdSWarner Losh.It Ar *_name
157b6955dfdSWarner LoshDefines the name of the module.
158b6955dfdSWarner Losh.It Ar *_type
159b6955dfdSWarner LoshDefines the module's type.
160b6955dfdSWarner LoshIf none is given, it defaults to a kld module.
161b6955dfdSWarner Losh.It Ar *_flags
162b6955dfdSWarner LoshFlags and parameters to be passed to the module.
163b6955dfdSWarner Losh.It Ar *_before
164b6955dfdSWarner LoshCommands to be executed before the module is loaded.
165b6955dfdSWarner LoshUse of this setting
166b6955dfdSWarner Loshshould be avoided.
167b6955dfdSWarner Losh.It Ar *_after
168b6955dfdSWarner LoshCommands to be executed after the module is loaded.
169b6955dfdSWarner LoshUse of this setting
170b6955dfdSWarner Loshshould be avoided.
171b6955dfdSWarner Losh.It Ar *_error
172b6955dfdSWarner LoshCommands to be executed if the loading of a module fails.
173b6955dfdSWarner LoshExcept for the
174b6955dfdSWarner Loshspecial value
175b6955dfdSWarner Losh.Dq abort ,
176b6955dfdSWarner Loshwhich aborts the bootstrap process, use of this setting should be avoided.
177b6955dfdSWarner Losh.El
178b6955dfdSWarner Losh.Pp
179b6955dfdSWarner Losh.Em WARNING:
180b6955dfdSWarner Loshdevelopers should never use these suffixes for any kernel environment
181b6955dfdSWarner Loshvariables (tunables) or conflicts will result.
182b6955dfdSWarner Losh.Sh DEFAULT SETTINGS
183b6955dfdSWarner LoshMost of
184b6955dfdSWarner Losh.Nm Ns 's
185b6955dfdSWarner Loshdefault settings can be ignored.
186b6955dfdSWarner LoshThe few of them which are important
187b6955dfdSWarner Loshor useful are:
188b6955dfdSWarner Losh.Bl -tag -width bootfile -offset indent
189b6955dfdSWarner Losh.It Va bitmap_load
190b6955dfdSWarner Losh.Pq Dq NO
191b6955dfdSWarner LoshIf set to
192b6955dfdSWarner Losh.Dq YES ,
193b6955dfdSWarner Losha bitmap will be loaded to be displayed on screen while booting.
194b6955dfdSWarner Losh.It Va bitmap_name
195b6955dfdSWarner Losh.Pq Dq Pa /boot/splash.bmp
196b6955dfdSWarner LoshName of the bitmap to be loaded.
197b6955dfdSWarner LoshAny other name can be used.
198b6955dfdSWarner Losh.It Va comconsole_speed
199b6955dfdSWarner Losh.Dq ( 9600
200b6955dfdSWarner Loshor the value of the
201b6955dfdSWarner Losh.Va BOOT_COMCONSOLE_SPEED
202b6955dfdSWarner Loshvariable when
203b6955dfdSWarner Losh.Xr loader 8
204b6955dfdSWarner Loshwas compiled).
205b6955dfdSWarner LoshSets the speed of the serial console.
206b6955dfdSWarner LoshIf the previous boot loader stage specified that a serial console
207b6955dfdSWarner Loshis in use then the default speed is determined from the current
208b6955dfdSWarner Loshserial port speed setting.
209b6955dfdSWarner Losh.It Va console
210b6955dfdSWarner Losh.Pq Dq vidconsole
211b6955dfdSWarner Losh.Dq comconsole
212b6955dfdSWarner Loshselects serial console,
213b6955dfdSWarner Losh.Dq vidconsole
214b6955dfdSWarner Loshselects the video console,
215b6955dfdSWarner Losh.Dq nullconsole
216b6955dfdSWarner Loshselects a mute console
217b6955dfdSWarner Losh(useful for systems with neither a video console nor a serial port), and
218b6955dfdSWarner Losh.Dq spinconsole
219b6955dfdSWarner Loshselects the video console which prevents any input and hides all output
220b6955dfdSWarner Loshreplacing it with
221b6955dfdSWarner Losh.Dq spinning
222b6955dfdSWarner Loshcharacter (useful for embedded products and such).
223b6955dfdSWarner Losh.It Va kernel
224b6955dfdSWarner Losh.Pq Dq kernel
225b6955dfdSWarner Losh.It Va kernels
226b6955dfdSWarner Losh.Pq Dq kernel kernel.old
227b6955dfdSWarner LoshSpace or comma separated list of kernels to present in the boot menu.
228b6955dfdSWarner Losh.It Va loader_conf_files
229b6955dfdSWarner Losh.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
230b6955dfdSWarner Losh.It Va splash_bmp_load
231b6955dfdSWarner Losh.Pq Dq NO
232b6955dfdSWarner LoshIf set to
233b6955dfdSWarner Losh.Dq YES ,
234b6955dfdSWarner Loshwill load the splash screen module, making it possible to display a bmp image
235b6955dfdSWarner Loshon the screen while booting.
236b6955dfdSWarner Losh.It Va splash_pcx_load
237b6955dfdSWarner Losh.Pq Dq NO
238b6955dfdSWarner LoshIf set to
239b6955dfdSWarner Losh.Dq YES ,
240b6955dfdSWarner Loshwill load the splash screen module, making it possible to display a pcx image
241b6955dfdSWarner Loshon the screen while booting.
242b6955dfdSWarner Losh.It Va vesa_load
243b6955dfdSWarner Losh.Pq Dq NO
244b6955dfdSWarner LoshIf set to
245b6955dfdSWarner Losh.Dq YES ,
246b6955dfdSWarner Loshthe vesa module will be loaded, enabling bitmaps above VGA resolution to
247b6955dfdSWarner Loshbe displayed.
248b6955dfdSWarner Losh.It Va beastie_disable
249b6955dfdSWarner LoshIf set to
250b6955dfdSWarner Losh.Dq YES ,
251b6955dfdSWarner Loshthe beastie boot menu will be skipped.
252b6955dfdSWarner Losh.It Va loader_logo Pq Dq Li orbbw
253b6955dfdSWarner LoshSelects a desired logo in the beastie boot menu.
254b6955dfdSWarner LoshPossible values are:
255b6955dfdSWarner Losh.Dq Li orbbw ,
256b6955dfdSWarner Losh.Dq Li orb ,
257b6955dfdSWarner Losh.Dq Li fbsdbw ,
258b6955dfdSWarner Losh.Dq Li beastiebw ,
259b6955dfdSWarner Losh.Dq Li beastie ,
260b6955dfdSWarner Loshand
261b6955dfdSWarner Losh.Dq Li none .
262b6955dfdSWarner Losh.It Va loader_color
263b6955dfdSWarner LoshIf set to
264b6955dfdSWarner Losh.Dq NO ,
265b6955dfdSWarner Loshthe beastie boot menu will be displayed without ANSI coloring.
266b6955dfdSWarner Losh.It Va entropy_cache_load
267b6955dfdSWarner Losh.Pq Dq YES
268b6955dfdSWarner LoshIf set to
269b6955dfdSWarner Losh.Dq NO ,
270b6955dfdSWarner Loshthe very early
271b6955dfdSWarner Loshboot-time entropy file
272b6955dfdSWarner Loshwill not be loaded.
273b6955dfdSWarner LoshSee the entropy entries in
274b6955dfdSWarner Losh.Xr rc.conf 5 .
275b6955dfdSWarner Losh.It Va entropy_cache_name
276b6955dfdSWarner Losh.Pq Dq /boot/entropy
277b6955dfdSWarner LoshThe name of the very early
278b6955dfdSWarner Loshboot-time entropy cache file.
279b6955dfdSWarner Losh.El
280dec08e67SKyle Evans.Sh OTHER SETTINGS
281dec08e67SKyle EvansOther settings that may be used in
282dec08e67SKyle Evans.Nm
283dec08e67SKyle Evansthat have no default value:
284dec08e67SKyle Evans.Bl -tag -width bootfile -offset indent
285dec08e67SKyle Evans.It Va fdt_overlays
286dec08e67SKyle EvansSpecifies a comma-delimited list of FDT overlays to apply.
287*2c58a193SKyle Evans.Pa /boot/dtb/overlays
288dec08e67SKyle Evansis created by default for overlays to be placed in.
289dec08e67SKyle Evans.It Va kernels_autodetect
290dec08e67SKyle EvansIf set to
291dec08e67SKyle Evans.Dq YES ,
292dec08e67SKyle Evansattempt to auto-detect kernels installed in
293dec08e67SKyle Evans.Pa /boot .
294dec08e67SKyle EvansThis is an option specific to the Lua-based loader.
295dec08e67SKyle EvansIt is not available in the default Forth-based loader.
296dec08e67SKyle Evans.El
297b6955dfdSWarner Losh.Sh FILES
298b6955dfdSWarner Losh.Bl -tag -width /boot/defaults/loader.conf -compact
299b6955dfdSWarner Losh.It Pa /boot/defaults/loader.conf
300b6955dfdSWarner Loshdefault settings -- do not change this file.
301b6955dfdSWarner Losh.It Pa /boot/loader.conf
302b6955dfdSWarner Loshuser defined settings.
303b6955dfdSWarner Losh.It Pa /boot/loader.conf.local
304b6955dfdSWarner Loshmachine-specific settings for sites with a common loader.conf.
305b6955dfdSWarner Losh.El
306b6955dfdSWarner Losh.Sh SEE ALSO
307b6955dfdSWarner Losh.Xr rc.conf 5 ,
308b6955dfdSWarner Losh.Xr boot 8 ,
309b6955dfdSWarner Losh.Xr loader 8 ,
310b6955dfdSWarner Losh.Xr loader.4th 8
311b6955dfdSWarner Losh.Sh HISTORY
312b6955dfdSWarner LoshThe file
313b6955dfdSWarner Losh.Nm
314b6955dfdSWarner Loshfirst appeared in
315b6955dfdSWarner Losh.Fx 3.2 .
316b6955dfdSWarner Losh.Sh AUTHORS
317b6955dfdSWarner LoshThis manual page was written by
318b6955dfdSWarner Losh.An Daniel C. Sobral Aq dcs@FreeBSD.org .
319b6955dfdSWarner Losh.Sh BUGS
320b6955dfdSWarner LoshThe
321b6955dfdSWarner Losh.Xr loader 8
322b6955dfdSWarner Loshstops reading
323b6955dfdSWarner Losh.Nm
324b6955dfdSWarner Loshwhen it encounters a syntax error, so any options which are vital for
325b6955dfdSWarner Loshbooting a particular system (i.e.\&
326b6955dfdSWarner Losh.Dq Va hw.ata.ata_dma Ns "=0" )
327b6955dfdSWarner Loshshould precede any experimental additions to
328b6955dfdSWarner Losh.Nm .
329