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