Merge branch 'vendor/OPENSSL'
[dragonfly.git] / share / man / man5 / 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: src/sys/boot/forth/loader.conf.5,v 1.18 2002/08/27 01:02:56 trhodes Exp $
26 .Dd October 6, 2010
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 it you can specify the kernel to be booted,
37 parameters to be passed to it,
38 and additional kernel modules to be loaded;
39 and generally set all variables described in
40 .Xr loader 8 .
41 .Pp
42 A file
43 .Pa dloader.rc
44 must contain the following lines for
45 .Nm
46 to be automatically processed:
47 .Pp
48 .Dl include defaults/loader.conf
49 .Dl optinclude loader.conf
50 .Dl optinclude loader.conf.local
51 .Pp
52 If no
53 .Pa /boot/dloader.rc
54 exists at installworld time, one with the above lines will be installed.
55 .Sh SYNTAX
56 Though
57 .Nm Ns 's
58 format was defined explicitly to resemble
59 .Xr rc.conf 5 ,
60 and can be sourced by
61 .Xr sh 1 ,
62 some settings are treated in a special fashion.
63 Also, the 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
72 .Ql #
73 sign will mark the remainder of the line as a comment.
74 .It
75 Only one setting can be present on each line.
76 .El
77 .Pp
78 All settings have the following format:
79 .Pp
80 .Dl variable="value"
81 .Pp
82 This assigns value to a local variable.
83 If variable is in a list of known kernel environment variables or
84 is a kernel tunable,
85 it is also assigned to the kernel environment variable of the given name.
86 .Pp
87 The settings that receive special treatment are listed below.
88 Settings beginning with
89 .Aq Ar module
90 below define the kernel modules to be loaded.
91 All such settings sharing a common
92 prefix refer to the same module.
93 .Bl -tag -width indent
94 .It Ar kernel
95 Name of the kernel to be loaded.
96 If no kernel name is set, no additional
97 modules will be loaded.
98 .It Ar kernel_options
99 Flags to be passed to the kernel (see
100 .Xr boot 8 ) .
101 .It Ar verbose_loading
102 If set to
103 .Dq YES ,
104 module names will be displayed as they are loaded.
105 .It Ao Ar module Ac Ns Ar _load
106 If set to
107 .Dq YES ,
108 that kernel module will be loaded.
109 If no
110 .Ao Ar module Ac Ns Ar _name
111 is defined (see below), the
112 module's name is taken to be
113 .Aq Ar module .
114 .It Ao Ar module Ac Ns Ar _name
115 Defines the name of the module.
116 .It Ao Ar module Ac Ns Ar _type
117 Defines the module's type.
118 If none is given, it defaults to a
119 .Xr kld 4
120 module.
121 .It Ao Ar module Ac Ns Ar _flags
122 Flags and parameters to be passed to the module.
123 .It Ao Ar module Ac Ns Ar _before
124 Commands to be executed before the module is loaded.
125 Use of this setting
126 should be avoided.
127 .It Ao Ar module Ac Ns Ar _after
128 Commands to be executed after the module is loaded.
129 Use of this setting
130 should be avoided.
131 .It Ao Ar module Ac Ns Ar _error
132 Commands to be executed if the loading of a module fails.
133 Except for the
134 special value
135 .Dq abort ,
136 which aborts the bootstrap process, use of this setting should be avoided.
137 .El
138 .Sh DEFAULT SETTINGS
139 See
140 .Pa /boot/defaults/loader.conf
141 for
142 .Nm Ns 's
143 default settings.
144 The few of them which are important
145 or useful are:
146 .Bl -tag -width indent
147 .It Va bitmap_load
148 .Pq Dq NO
149 If set to
150 .Dq YES ,
151 a bitmap will be loaded to be displayed on screen while booting.
152 .It Va bitmap_name
153 .Pq Dq splash.bmp
154 Name of the bitmap to be loaded.
155 Any other name can be used.
156 .It Va boot_verbose
157 .Pq Dq NO
158 Set to
159 .Dq YES
160 to enable verbose booting.
161 .It Va console
162 .Pq Dq vidconsole
163 .Dq comconsole
164 selects serial console,
165 .Dq vidconsole
166 selects the video console, and
167 .Dq nullconsole
168 selects a mute console
169 (useful for systems with neither a video console nor a serial port).
170 .Pp
171 When using a comconsole the kernel defaults to allowing a console on sio0.
172 To change this to sio1 you must specify
173 .Va sio0.flags=0
174 and
175 .Va sio1.flags=0x10
176 in addition to setting the console to the comconsole.
177 .Pp
178 If you want the boot code to be available on COM2 at 57600 baud instead
179 of COM1, for example, you must set the variables
180 .Va BOOT_COMCONSOLE_PORT=0x2f8
181 and
182 .Va BOOT_COMCONSOLE_SPEED=57600
183 in
184 .Pa /etc/make.conf
185 and recompile and install the boot code at
186 .Pa /usr/src/sys/boot ,
187 then install the bootcode to the partition via
188 .Xr disklabel 8 .
189 .Pp
190 Note that in comconsole mode the kernel will pick up the baud rate
191 from the boot loader, so no kernel recompile is needed.
192 .It Va fred_disable
193 .Pq Dq NO
194 Shows a monochrome version of Fred, the official
195 .Dx
196 mascot, when the
197 boot menu appears.
198 To make his life a bit more colorful, consider setting
199 .Pa loader_color
200 to
201 .Dq YES .
202 .It Va fred_on_left
203 .Pq Dq NO
204 Shows Fred on the left side of the menu rather than the right side.
205 .It Va kernel
206 .Pq Dq kernel .
207 .It Va loader_color
208 .Pq Dq NO
209 If set to
210 .Dq YES ,
211 you'll meet Fred, the official
212 .Dx
213 mascot, in technicolor when the
214 boot menu appears (remember to set
215 .Pa fred_disable
216 to
217 .Dq NO
218 for this to work.)
219 .It Va splash_bmp_load
220 .Pq Dq NO
221 If set to
222 .Dq YES ,
223 will load the splash screen module, making it possible to display a bmp image
224 on the screen while booting.
225 .It Va splash_pcx_load
226 .Pq Dq NO
227 If set to
228 .Dq YES ,
229 will load the splash screen module, making it possible to display a pcx image
230 on the screen while booting.
231 .It Va userconfig_script_load
232 .Pq Dq NO
233 If set to
234 .Dq YES ,
235 will load the userconfig data.
236 .It Va vesa_load
237 .Pq Dq NO
238 If set to
239 .Dq YES ,
240 the vesa module will be loaded, enabling bitmaps above VGA resolution to
241 be displayed.
242 .El
243 .Sh IPMI
244 Generally speaking machines with IPMI capabilities are capable of
245 redirecting the BIOS POST to a fake serial port controlled by the BMC.
246 It is then possible to use
247 .Xr ipmitool 1
248 from pkgsrc to access the console.
249 .Dx
250 kernels adjust the video mode in a way that the BMC cannot usually
251 redirect, so your best bet is to set the boot loader AND the kernel up to
252 use a serial port via the
253 .Va console=comconsole
254 feature described above.
255 Often the IPMI controller, called the BMC, is not sitting on COM1 so
256 .Dx Ap s
257 default console parameters and baud rate will not work.
258 .Sh FILES
259 .Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact
260 .It Pa /boot/defaults/dloader.menu
261 default settings for menu setup -- do not change this file.
262 .It Pa /boot/defaults/loader.conf
263 default settings -- do not change this file.
264 .It Pa /boot/dloader.menu
265 defines the commands used by
266 .Nm loader
267 to setup menus.
268 .It Pa /boot/loader.conf
269 user defined settings.
270 .It Pa /boot/loader.conf.local
271 machine-specific settings for sites with a common loader.conf.
272 .It Pa /boot/dloader.rc
273 contains the instructions to automatically process.
274 .El
275 .Sh SEE ALSO
276 .Xr boot 8 ,
277 .Xr loader 8
278 .Sh HISTORY
279 The file
280 .Nm
281 first appeared in
282 .Fx 3.2 .
283 .Sh AUTHORS
284 This manual page was written by
285 .An Daniel C. Sobral Aq dcs@FreeBSD.org .