Merge branch 'vendor/GDTOA'
[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 .\" $DragonFly: src/sys/boot/forth/loader.conf.5,v 1.13 2008/09/15 21:23:44 thomas Exp $
27 .Dd October 6, 2010
28 .Dt LOADER.CONF 5
29 .Os
30 .Sh NAME
31 .Nm loader.conf
32 .Nd system bootstrap configuration information
33 .Sh DESCRIPTION
34 The file
35 .Nm
36 contains descriptive information on bootstrapping the system.
37 Through it you can specify the kernel to be booted,
38 parameters to be passed to it,
39 and additional kernel modules to be loaded;
40 and generally set all variables described in
41 .Xr loader 8 .
42 .Pp
43 A file
44 .Pa dloader.rc
45 must contain the following lines for
46 .Nm
47 to be automatically processed:
48 .Pp
49 .Dl include defaults/loader.conf
50 .Dl optinclude loader.conf
51 .Dl optinclude loader.conf.local
52 .Pp
53 If no
54 .Pa /boot/dloader.rc
55 exists at installworld time, one with the above lines will be installed.
56 .Sh SYNTAX
57 Though
58 .Nm Ns 's
59 format was defined explicitly to resemble
60 .Xr rc.conf 5 ,
61 and can be sourced by
62 .Xr sh 1 ,
63 some settings are treated in a special fashion.
64 Also, the behavior of some settings is defined by the setting's suffix;
65 the prefix identifies which module the setting controls.
66 .Pp
67 The general parsing rules are:
68 .Bl -bullet
69 .It
70 Spaces and empty lines are ignored.
71 .It
72 A
73 .Ql #
74 sign will mark the remainder of the line as a comment.
75 .It
76 Only one setting can be present on each line.
77 .El
78 .Pp
79 All settings have the following format:
80 .Pp
81 .Dl variable="value"
82 .Pp
83 This assigns value to a local variable.
84 If variable is in a list of known kernel environment variables or
85 is a kernel tunable,
86 it is also assigned to the kernel environment variable of the given name.
87 .Pp
88 The settings that receive special treatment are listed below.
89 Settings beginning with
90 .Aq Ar module
91 below define the kernel modules to be loaded.
92 All such settings sharing a common
93 prefix refer to the same module.
94 .Bl -tag -width indent
95 .It Ar kernel
96 Name of the kernel to be loaded.
97 If no kernel name is set, no additional
98 modules will be loaded.
99 .It Ar kernel_options
100 Flags to be passed to the kernel (see
101 .Xr boot 8 ) .
102 .It Ar verbose_loading
103 If set to
104 .Dq YES ,
105 module names will be displayed as they are loaded.
106 .It Ao Ar module Ac Ns Ar _load
107 If set to
108 .Dq YES ,
109 that kernel module will be loaded.
110 If no
111 .Ao Ar module Ac Ns Ar _name
112 is defined (see below), the
113 module's name is taken to be
114 .Aq Ar module .
115 .It Ao Ar module Ac Ns Ar _name
116 Defines the name of the module.
117 .It Ao Ar module Ac Ns Ar _type
118 Defines the module's type.
119 If none is given, it defaults to a
120 .Xr kld 4
121 module.
122 .It Ao Ar module Ac Ns Ar _flags
123 Flags and parameters to be passed to the module.
124 .It Ao Ar module Ac Ns Ar _before
125 Commands to be executed before the module is loaded.
126 Use of this setting
127 should be avoided.
128 .It Ao Ar module Ac Ns Ar _after
129 Commands to be executed after the module is loaded.
130 Use of this setting
131 should be avoided.
132 .It Ao Ar module Ac Ns Ar _error
133 Commands to be executed if the loading of a module fails.
134 Except for the
135 special value
136 .Dq abort ,
137 which aborts the bootstrap process, use of this setting should be avoided.
138 .El
139 .Sh DEFAULT SETTINGS
140 See
141 .Pa /boot/defaults/loader.conf
142 for
143 .Nm Ns 's
144 default settings.
145 The few of them which are important
146 or useful are:
147 .Bl -tag -width indent
148 .It Va bitmap_load
149 .Pq Dq NO
150 If set to
151 .Dq YES ,
152 a bitmap will be loaded to be displayed on screen while booting.
153 .It Va bitmap_name
154 .Pq Dq splash.bmp
155 Name of the bitmap to be loaded.
156 Any other name can be used.
157 .It Va boot_verbose
158 .Pq Dq NO 
159 Set to
160 .Dq YES
161 to enable verbose booting.
162 .It Va console
163 .Pq Dq vidconsole
164 .Dq comconsole
165 selects serial console,
166 .Dq vidconsole
167 selects the video console, and
168 .Dq nullconsole
169 selects a mute console
170 (useful for systems with neither a video console nor a serial port).
171 .It Va fred_disable
172 .Pq Dq NO
173 Shows a monochrome version of Fred, the official
174 .Dx
175 mascot, when the
176 boot menu appears.
177 To make his life a bit more colorful, consider setting
178 .Pa loader_color
179 to
180 .Dq YES .
181 .It Va fred_on_left
182 .Pq Dq NO
183 Shows Fred on the left side of the menu rather than the right side.
184 .It Va kernel
185 .Pq Dq kernel .
186 .It Va loader_color
187 .Pq Dq NO
188 If set to
189 .Dq YES ,
190 you'll meet Fred, the official
191 .Dx
192 mascot, in technicolor when the
193 boot menu appears (remember to set
194 .Pa fred_disable
195 to
196 .Dq NO
197 for this to work.)
198 .It Va splash_bmp_load
199 .Pq Dq NO
200 If set to
201 .Dq YES ,
202 will load the splash screen module, making it possible to display a bmp image
203 on the screen while booting.
204 .It Va splash_pcx_load
205 .Pq Dq NO
206 If set to
207 .Dq YES ,
208 will load the splash screen module, making it possible to display a pcx image
209 on the screen while booting.
210 .It Va userconfig_script_load
211 .Pq Dq NO
212 If set to
213 .Dq YES ,
214 will load the userconfig data.
215 .It Va vesa_load
216 .Pq Dq NO
217 If set to
218 .Dq YES ,
219 the vesa module will be loaded, enabling bitmaps above VGA resolution to
220 be displayed.
221 .El
222 .Sh FILES
223 .Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact
224 .It Pa /boot/defaults/dloader.menu
225 default settings for menu setup -- do not change this file.
226 .It Pa /boot/defaults/loader.conf
227 default settings -- do not change this file.
228 .It Pa /boot/dloader.menu
229 defines the commands used by
230 .Nm loader
231 to setup menus.
232 .It Pa /boot/loader.conf
233 user defined settings.
234 .It Pa /boot/loader.conf.local
235 machine-specific settings for sites with a common loader.conf.
236 .It Pa /boot/dloader.rc
237 contains the instructions to automatically process.
238 .El
239 .Sh SEE ALSO
240 .Xr boot 8 ,
241 .Xr loader 8
242 .Sh HISTORY
243 The file
244 .Nm
245 first appeared in
246 .Fx 3.2 .
247 .Sh AUTHORS
248 This manual page was written by
249 .An Daniel C. Sobral Aq dcs@FreeBSD.org .