xref: /trueos/sys/boot/forth/loader.conf.5 (revision 7a1ab70b9590c4c122be3d913b579be45424f95a)
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 27, 2014
27.Dt LOADER.CONF 5
28.Os
29.Sh NAME
30.Nm loader.conf
31.Nd "system bootstrap configuration information"
32.Sh DESCRIPTION
33The file
34.Nm
35contains descriptive information on bootstrapping the system.
36Through
37it you can specify the kernel to be booted, parameters to be passed to
38it, and additional modules to be loaded; and generally set all variables
39described in
40.Xr loader 8 .
41.Pp
42The file
43.Pa /boot/loader.rc
44must contain the following two lines for
45.Nm
46to be automatically processed:
47.Pp
48.Dl include /boot/loader.4th
49.Dl start
50.Pp
51If no
52.Pa /boot/loader.rc
53exists at installworld time, one with the above lines will be installed.
54.Sh SYNTAX
55Though
56.Nm Ns 's
57format was defined explicitly to resemble
58.Xr rc.conf 5 ,
59and can be sourced by
60.Xr sh 1 ,
61some settings are treated in a special fashion.
62Also, the
63behavior of some settings is defined by the setting's suffix;
64the prefix identifies which module the setting controls.
65.Pp
66The general parsing rules are:
67.Bl -bullet
68.It
69Spaces and empty lines are ignored.
70.It
71A # sign will mark the remainder of the line as a comment.
72.It
73Only one setting can be present on each line.
74.El
75.Pp
76All settings have the following format:
77.Pp
78.Dl variable="value"
79.Pp
80Unless it belongs to one of the classes of settings that receive special
81treatment, a setting will set the value of a
82.Xr loader 8
83environment variable.
84The settings that receive special
85treatment are listed below.
86Settings beginning with
87.Qq *
88below define the modules to be loaded and
89may have any prefix; the prefix identifies a module.
90All such settings sharing a common
91prefix refer to the same module.
92.Bl -tag -width Ar
93.It Ar exec
94Immediately executes a
95.Xr loader 8
96command.
97This type of setting cannot be processed by programs other
98than
99.Xr loader 8 ,
100so its use should be avoided.
101Multiple instances of it will be processed
102independently.
103.It Ar loader_conf_files
104Defines additional configuration files to be processed right after the
105present file.
106.It Ar kernel
107Name of the kernel to be loaded.
108If no kernel name is set, no additional
109modules will be loaded.
110The name must be a subdirectory of
111.Pa /boot
112that contains a kernel.
113.It Ar kernel_options
114Flags to be passed to the kernel.
115.It Ar password
116Protect boot menu with a password without interrupting
117.Ic autoboot
118process.
119The password should be in clear text format.
120If a password is set, boot menu will not appear until any key is pressed during
121countdown period specified by
122.Va autoboot_delay
123variable or
124.Ic autoboot
125process fails.
126In both cases user should provide specified password to be able to access boot
127menu.
128.It Ar bootlock_password
129Provides a password to be required by check-password before execution is
130allowed to continue.
131The password should be in clear text format.
132If a password is set, the user must provide specified password to boot.
133.It Ar verbose_loading
134If set to
135.Dq YES ,
136module names will be displayed as they are loaded.
137.It Ar *_load
138If set to
139.Dq YES ,
140that module will be loaded.
141If no name is defined (see below), the
142module's name is taken to be the same as the prefix.
143.It Ar *_name
144Defines the name of the module.
145.It Ar *_type
146Defines the module's type.
147If none is given, it defaults to a kld module.
148.It Ar *_flags
149Flags and parameters to be passed to the module.
150.It Ar *_before
151Commands to be executed before the module is loaded.
152Use of this setting
153should be avoided.
154.It Ar *_after
155Commands to be executed after the module is loaded.
156Use of this setting
157should be avoided.
158.It Ar *_error
159Commands to be executed if the loading of a module fails.
160Except for the
161special value
162.Dq abort ,
163which aborts the bootstrap process, use of this setting should be avoided.
164.El
165.Pp
166.Em WARNING:
167developers should never use these suffixes for any kernel environment
168variables (tunables) or conflicts will result.
169.Sh DEFAULT SETTINGS
170Most of
171.Nm Ns 's
172default settings can be ignored.
173The few of them which are important
174or useful are:
175.Bl -tag -width bootfile -offset indent
176.It Va bitmap_load
177.Pq Dq NO
178If set to
179.Dq YES ,
180a bitmap will be loaded to be displayed on screen while booting.
181.It Va bitmap_name
182.Pq Dq Pa /boot/splash.bmp
183Name of the bitmap to be loaded.
184Any other name can be used.
185.It Va comconsole_speed
186.Dq ( 9600
187or the value of the
188.Va BOOT_COMCONSOLE_SPEED
189variable when
190.Xr loader 8
191was compiled).
192Sets the speed of the serial console.
193If the previous boot loader stage specified that a serial console
194is in use then the default speed is determined from the current
195serial port speed setting.
196.It Va console
197.Pq Dq vidconsole
198.Dq comconsole
199selects serial console,
200.Dq vidconsole
201selects the video console,
202.Dq nullconsole
203selects a mute console
204(useful for systems with neither a video console nor a serial port), and
205.Dq spinconsole
206selects the video console which prevents any input and hides all output
207replacing it with
208.Dq spinning
209character (useful for embedded products and such).
210.It Va kernel
211.Pq Dq kernel
212.It Va kernels
213.Pq Dq kernel kernel.old
214Space or comma separated list of kernels to present in the boot menu.
215.It Va loader_conf_files
216.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
217.It Va splash_bmp_load
218.Pq Dq NO
219If set to
220.Dq YES ,
221will load the splash screen module, making it possible to display a bmp image
222on the screen while booting.
223.It Va splash_pcx_load
224.Pq Dq NO
225If set to
226.Dq YES ,
227will load the splash screen module, making it possible to display a pcx image
228on the screen while booting.
229.It Va vesa_load
230.Pq Dq NO
231If set to
232.Dq YES ,
233the vesa module will be loaded, enabling bitmaps above VGA resolution to
234be displayed.
235.It Va beastie_disable
236If set to
237.Dq YES ,
238the beastie boot menu will be skipped.
239The beastie boot menu is always skipped if booting UEFI or running non-x86
240hardware.
241.It Va loader_logo Pq Dq Li orbbw
242Selects a desired logo in the beastie boot menu.
243Possible values are:
244.Dq Li orbbw ,
245.Dq Li orb ,
246.Dq Li fbsdbw ,
247.Dq Li beastiebw ,
248.Dq Li beastie ,
249and
250.Dq Li none .
251.It Va loader_color
252If set to
253.Dq NO ,
254the beastie boot menu will be displayed without ANSI coloring.
255.El
256.Sh FILES
257.Bl -tag -width /boot/defaults/loader.conf -compact
258.It Pa /boot/defaults/loader.conf
259default settings -- do not change this file.
260.It Pa /boot/loader.4th
261defines the commands used by loader to read and process
262.Nm .
263.It Pa /boot/loader.conf
264user defined settings.
265.It Pa /boot/loader.conf.local
266machine-specific settings for sites with a common loader.conf.
267.It Pa /boot/loader.rc
268contains the instructions to automatically process
269.Nm .
270.El
271.Sh SEE ALSO
272.Xr boot 8 ,
273.Xr loader 8 ,
274.Xr loader.4th 8
275.Sh HISTORY
276The file
277.Nm
278first appeared in
279.Fx 3.2 .
280.Sh AUTHORS
281This manual page was written by
282.An Daniel C. Sobral Aq dcs@FreeBSD.org .
283.Sh BUGS
284The
285.Xr loader 8
286stops reading
287.Nm
288when it encounters a syntax error, so any options which are vital for
289booting a particular system (i.e.\&
290.Dq Va hw.ata.ata_dma Ns "=0" )
291should precede any experimental additions to
292.Nm .
293