xref: /dflybsd-src/share/man/man5/loader.conf.5 (revision 1b3de706774f60f361105e32c8a74e1cc97e7c5c)
1332f0f1dSSascha Wildner.\" Copyright (c) 1999 Daniel C. Sobral
2332f0f1dSSascha Wildner.\" All rights reserved.
3332f0f1dSSascha Wildner.\"
4332f0f1dSSascha Wildner.\" Redistribution and use in source and binary forms, with or without
5332f0f1dSSascha Wildner.\" modification, are permitted provided that the following conditions
6332f0f1dSSascha Wildner.\" are met:
7332f0f1dSSascha Wildner.\" 1. Redistributions of source code must retain the above copyright
8332f0f1dSSascha Wildner.\"    notice, this list of conditions and the following disclaimer.
9332f0f1dSSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright
10332f0f1dSSascha Wildner.\"    notice, this list of conditions and the following disclaimer in the
11332f0f1dSSascha Wildner.\"    documentation and/or other materials provided with the distribution.
12332f0f1dSSascha Wildner.\"
13332f0f1dSSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14332f0f1dSSascha Wildner.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15332f0f1dSSascha Wildner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16332f0f1dSSascha Wildner.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17332f0f1dSSascha Wildner.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18332f0f1dSSascha Wildner.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19332f0f1dSSascha Wildner.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20332f0f1dSSascha Wildner.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21332f0f1dSSascha Wildner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22332f0f1dSSascha Wildner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23332f0f1dSSascha Wildner.\" SUCH DAMAGE.
24332f0f1dSSascha Wildner.\"
25332f0f1dSSascha Wildner.\" $FreeBSD: src/sys/boot/forth/loader.conf.5,v 1.18 2002/08/27 01:02:56 trhodes Exp $
26b5ef8da1SThomas Nikolajsen.Dd October 6, 2010
27332f0f1dSSascha Wildner.Dt LOADER.CONF 5
28332f0f1dSSascha Wildner.Os
29332f0f1dSSascha Wildner.Sh NAME
30332f0f1dSSascha Wildner.Nm loader.conf
31332f0f1dSSascha Wildner.Nd system bootstrap configuration information
32332f0f1dSSascha Wildner.Sh DESCRIPTION
33332f0f1dSSascha WildnerThe file
34332f0f1dSSascha Wildner.Nm
35332f0f1dSSascha Wildnercontains descriptive information on bootstrapping the system.
36b5ef8da1SThomas NikolajsenThrough it you can specify the kernel to be booted,
37b5ef8da1SThomas Nikolajsenparameters to be passed to it,
38b5ef8da1SThomas Nikolajsenand additional kernel modules to be loaded;
39b5ef8da1SThomas Nikolajsenand generally set all variables described in
40332f0f1dSSascha Wildner.Xr loader 8 .
41332f0f1dSSascha Wildner.Pp
42332f0f1dSSascha WildnerA file
43b5ef8da1SThomas Nikolajsen.Pa dloader.rc
44b5ef8da1SThomas Nikolajsenmust contain the following lines for
45332f0f1dSSascha Wildner.Nm
46332f0f1dSSascha Wildnerto be automatically processed:
47332f0f1dSSascha Wildner.Pp
48b5ef8da1SThomas Nikolajsen.Dl include defaults/loader.conf
49b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf
50b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf.local
51332f0f1dSSascha Wildner.Pp
52332f0f1dSSascha WildnerIf no
53b5ef8da1SThomas Nikolajsen.Pa /boot/dloader.rc
54332f0f1dSSascha Wildnerexists at installworld time, one with the above lines will be installed.
55332f0f1dSSascha Wildner.Sh SYNTAX
56332f0f1dSSascha WildnerThough
57332f0f1dSSascha Wildner.Nm Ns 's
58332f0f1dSSascha Wildnerformat was defined explicitly to resemble
59332f0f1dSSascha Wildner.Xr rc.conf 5 ,
60332f0f1dSSascha Wildnerand can be sourced by
61332f0f1dSSascha Wildner.Xr sh 1 ,
62332f0f1dSSascha Wildnersome settings are treated in a special fashion.
63b5ef8da1SThomas NikolajsenAlso, the behavior of some settings is defined by the setting's suffix;
64332f0f1dSSascha Wildnerthe prefix identifies which module the setting controls.
65332f0f1dSSascha Wildner.Pp
66332f0f1dSSascha WildnerThe general parsing rules are:
67332f0f1dSSascha Wildner.Bl -bullet
68332f0f1dSSascha Wildner.It
69332f0f1dSSascha WildnerSpaces and empty lines are ignored.
70332f0f1dSSascha Wildner.It
71332f0f1dSSascha WildnerA
72332f0f1dSSascha Wildner.Ql #
73332f0f1dSSascha Wildnersign will mark the remainder of the line as a comment.
74332f0f1dSSascha Wildner.It
75332f0f1dSSascha WildnerOnly one setting can be present on each line.
76332f0f1dSSascha Wildner.El
77332f0f1dSSascha Wildner.Pp
78332f0f1dSSascha WildnerAll settings have the following format:
79332f0f1dSSascha Wildner.Pp
80332f0f1dSSascha Wildner.Dl variable="value"
81332f0f1dSSascha Wildner.Pp
82b5ef8da1SThomas NikolajsenThis assigns value to a local variable.
83b5ef8da1SThomas NikolajsenIf variable is in a list of known kernel environment variables or
84b5ef8da1SThomas Nikolajsenis a kernel tunable,
85b5ef8da1SThomas Nikolajsenit is also assigned to the kernel environment variable of the given name.
86b5ef8da1SThomas Nikolajsen.Pp
87b5ef8da1SThomas NikolajsenThe settings that receive special treatment are listed below.
88332f0f1dSSascha WildnerSettings beginning with
89332f0f1dSSascha Wildner.Aq Ar module
90b5ef8da1SThomas Nikolajsenbelow define the kernel modules to be loaded.
91332f0f1dSSascha WildnerAll such settings sharing a common
92332f0f1dSSascha Wildnerprefix refer to the same module.
93b5ef8da1SThomas Nikolajsen.Bl -tag -width indent
94332f0f1dSSascha Wildner.It Ar kernel
95332f0f1dSSascha WildnerName of the kernel to be loaded.
96332f0f1dSSascha WildnerIf no kernel name is set, no additional
97332f0f1dSSascha Wildnermodules will be loaded.
98332f0f1dSSascha Wildner.It Ar kernel_options
99332f0f1dSSascha WildnerFlags to be passed to the kernel (see
100332f0f1dSSascha Wildner.Xr boot 8 ) .
101332f0f1dSSascha Wildner.It Ar verbose_loading
102332f0f1dSSascha WildnerIf set to
103332f0f1dSSascha Wildner.Dq YES ,
104332f0f1dSSascha Wildnermodule names will be displayed as they are loaded.
105332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _load
106332f0f1dSSascha WildnerIf set to
107332f0f1dSSascha Wildner.Dq YES ,
108b5ef8da1SThomas Nikolajsenthat kernel module will be loaded.
109332f0f1dSSascha WildnerIf no
110332f0f1dSSascha Wildner.Ao Ar module Ac Ns Ar _name
111332f0f1dSSascha Wildneris defined (see below), the
112332f0f1dSSascha Wildnermodule's name is taken to be
113332f0f1dSSascha Wildner.Aq Ar module .
114332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _name
115332f0f1dSSascha WildnerDefines the name of the module.
116332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _type
117332f0f1dSSascha WildnerDefines the module's type.
118b5ef8da1SThomas NikolajsenIf none is given, it defaults to a
119b5ef8da1SThomas Nikolajsen.Xr kld 4
120b5ef8da1SThomas Nikolajsenmodule.
121332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _flags
122332f0f1dSSascha WildnerFlags and parameters to be passed to the module.
123332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _before
124332f0f1dSSascha WildnerCommands to be executed before the module is loaded.
125332f0f1dSSascha WildnerUse of this setting
126332f0f1dSSascha Wildnershould be avoided.
127332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _after
128332f0f1dSSascha WildnerCommands to be executed after the module is loaded.
129332f0f1dSSascha WildnerUse of this setting
130332f0f1dSSascha Wildnershould be avoided.
131332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _error
132332f0f1dSSascha WildnerCommands to be executed if the loading of a module fails.
133332f0f1dSSascha WildnerExcept for the
134332f0f1dSSascha Wildnerspecial value
135332f0f1dSSascha Wildner.Dq abort ,
136332f0f1dSSascha Wildnerwhich aborts the bootstrap process, use of this setting should be avoided.
137332f0f1dSSascha Wildner.El
138332f0f1dSSascha Wildner.Sh DEFAULT SETTINGS
139b5ef8da1SThomas NikolajsenSee
140b5ef8da1SThomas Nikolajsen.Pa /boot/defaults/loader.conf
141b5ef8da1SThomas Nikolajsenfor
142332f0f1dSSascha Wildner.Nm Ns 's
143b5ef8da1SThomas Nikolajsendefault settings.
144332f0f1dSSascha WildnerThe few of them which are important
145332f0f1dSSascha Wildneror useful are:
146b5ef8da1SThomas Nikolajsen.Bl -tag -width indent
147332f0f1dSSascha Wildner.It Va bitmap_load
148332f0f1dSSascha Wildner.Pq Dq NO
149332f0f1dSSascha WildnerIf set to
150332f0f1dSSascha Wildner.Dq YES ,
151332f0f1dSSascha Wildnera bitmap will be loaded to be displayed on screen while booting.
152332f0f1dSSascha Wildner.It Va bitmap_name
153332f0f1dSSascha Wildner.Pq Dq splash.bmp
154332f0f1dSSascha WildnerName of the bitmap to be loaded.
155332f0f1dSSascha WildnerAny other name can be used.
156526a18dfSJoe Talbott.It Va boot_verbose
157526a18dfSJoe Talbott.Pq Dq NO
158526a18dfSJoe TalbottSet to
159526a18dfSJoe Talbott.Dq YES
160526a18dfSJoe Talbottto enable verbose booting.
161332f0f1dSSascha Wildner.It Va console
162332f0f1dSSascha Wildner.Pq Dq vidconsole
163332f0f1dSSascha Wildner.Dq comconsole
164332f0f1dSSascha Wildnerselects serial console,
165332f0f1dSSascha Wildner.Dq vidconsole
166332f0f1dSSascha Wildnerselects the video console, and
167332f0f1dSSascha Wildner.Dq nullconsole
168332f0f1dSSascha Wildnerselects a mute console
169332f0f1dSSascha Wildner(useful for systems with neither a video console nor a serial port).
170792c92cbSMatthew Dillon.Pp
171792c92cbSMatthew DillonWhen using a comconsole the kernel defaults to allowing a console on sio0.
172792c92cbSMatthew DillonTo change this to sio1 you must specify
173792c92cbSMatthew Dillon.Va sio0.flags=0
174792c92cbSMatthew Dillonand
175792c92cbSMatthew Dillon.Va sio1.flags=0x10
176792c92cbSMatthew Dillonin addition to setting the console to the comconsole.
177*1b3de706SMatthew DillonYou can also set the baud rate with (for example)
178*1b3de706SMatthew Dillon.Va sio1.baud=115200
179*1b3de706SMatthew Dillonor simply inherit the baud set in the boot code.
180*1b3de706SMatthew DillonNormally these must be set if you want to use a stock kernel in a
181*1b3de706SMatthew DillonIPMI environment.
182792c92cbSMatthew Dillon.Pp
183*1b3de706SMatthew DillonThe boot code uses BIOS calls to read and write the screen but also
184*1b3de706SMatthew Dillonmirrors output to and monitors COM1 @ 9600.
185*1b3de706SMatthew DillonIn an IPMI environment you do not usually have to adjust the boot code
186*1b3de706SMatthew Dillonat all, instead using the IPMI BIOS redirect feature.
187*1b3de706SMatthew DillonIn non-IPMI setups if you want the boot code to be available on
188*1b3de706SMatthew DillonCOM2 at 57600 baud instead of COM1, for example, you must set the variables
189792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_PORT=0x2f8
190792c92cbSMatthew Dillonand
191792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_SPEED=57600
192792c92cbSMatthew Dillonin
193792c92cbSMatthew Dillon.Pa /etc/make.conf
194792c92cbSMatthew Dillonand recompile and install the boot code at
195792c92cbSMatthew Dillon.Pa /usr/src/sys/boot ,
196792c92cbSMatthew Dillonthen install the bootcode to the partition via
197792c92cbSMatthew Dillon.Xr disklabel 8 .
198792c92cbSMatthew Dillon.Pp
199792c92cbSMatthew DillonNote that in comconsole mode the kernel will pick up the baud rate
200792c92cbSMatthew Dillonfrom the boot loader, so no kernel recompile is needed.
201332f0f1dSSascha Wildner.It Va fred_disable
202332f0f1dSSascha Wildner.Pq Dq NO
203332f0f1dSSascha WildnerShows a monochrome version of Fred, the official
204332f0f1dSSascha Wildner.Dx
205332f0f1dSSascha Wildnermascot, when the
206332f0f1dSSascha Wildnerboot menu appears.
207332f0f1dSSascha WildnerTo make his life a bit more colorful, consider setting
208332f0f1dSSascha Wildner.Pa loader_color
209332f0f1dSSascha Wildnerto
210332f0f1dSSascha Wildner.Dq YES .
2118b20437dSJoe Talbott.It Va fred_on_left
2128b20437dSJoe Talbott.Pq Dq NO
2138b20437dSJoe TalbottShows Fred on the left side of the menu rather than the right side.
214332f0f1dSSascha Wildner.It Va kernel
215b5ef8da1SThomas Nikolajsen.Pq Dq kernel .
216332f0f1dSSascha Wildner.It Va loader_color
217332f0f1dSSascha Wildner.Pq Dq NO
218332f0f1dSSascha WildnerIf set to
219332f0f1dSSascha Wildner.Dq YES ,
220332f0f1dSSascha Wildneryou'll meet Fred, the official
221332f0f1dSSascha Wildner.Dx
222332f0f1dSSascha Wildnermascot, in technicolor when the
223332f0f1dSSascha Wildnerboot menu appears (remember to set
224332f0f1dSSascha Wildner.Pa fred_disable
225332f0f1dSSascha Wildnerto
226332f0f1dSSascha Wildner.Dq NO
227332f0f1dSSascha Wildnerfor this to work.)
228332f0f1dSSascha Wildner.It Va splash_bmp_load
229332f0f1dSSascha Wildner.Pq Dq NO
230332f0f1dSSascha WildnerIf set to
231332f0f1dSSascha Wildner.Dq YES ,
232332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a bmp image
233332f0f1dSSascha Wildneron the screen while booting.
234332f0f1dSSascha Wildner.It Va splash_pcx_load
235332f0f1dSSascha Wildner.Pq Dq NO
236332f0f1dSSascha WildnerIf set to
237332f0f1dSSascha Wildner.Dq YES ,
238332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a pcx image
239332f0f1dSSascha Wildneron the screen while booting.
240332f0f1dSSascha Wildner.It Va userconfig_script_load
241332f0f1dSSascha Wildner.Pq Dq NO
242332f0f1dSSascha WildnerIf set to
243332f0f1dSSascha Wildner.Dq YES ,
244332f0f1dSSascha Wildnerwill load the userconfig data.
245332f0f1dSSascha Wildner.It Va vesa_load
246332f0f1dSSascha Wildner.Pq Dq NO
247332f0f1dSSascha WildnerIf set to
248332f0f1dSSascha Wildner.Dq YES ,
249332f0f1dSSascha Wildnerthe vesa module will be loaded, enabling bitmaps above VGA resolution to
250332f0f1dSSascha Wildnerbe displayed.
251332f0f1dSSascha Wildner.El
252792c92cbSMatthew Dillon.Sh IPMI
253792c92cbSMatthew DillonGenerally speaking machines with IPMI capabilities are capable of
254792c92cbSMatthew Dillonredirecting the BIOS POST to a fake serial port controlled by the BMC.
255792c92cbSMatthew DillonIt is then possible to use
256792c92cbSMatthew Dillon.Xr ipmitool 1
257c8e8a2e5SSascha Wildnerfrom
258c8e8a2e5SSascha Wildner.Xr dports 7
259c8e8a2e5SSascha Wildnerto access the console.
260440b845aSSascha Wildner.Dx
261440b845aSSascha Wildnerkernels adjust the video mode in a way that the BMC cannot usually
262792c92cbSMatthew Dillonredirect, so your best bet is to set the boot loader AND the kernel up to
263792c92cbSMatthew Dillonuse a serial port via the
264792c92cbSMatthew Dillon.Va console=comconsole
265792c92cbSMatthew Dillonfeature described above.
266792c92cbSMatthew DillonOften the IPMI controller, called the BMC, is not sitting on COM1 so
267440b845aSSascha Wildner.Dx Ap s
268440b845aSSascha Wildnerdefault console parameters and baud rate will not work.
269332f0f1dSSascha Wildner.Sh FILES
270b5ef8da1SThomas Nikolajsen.Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact
271b5ef8da1SThomas Nikolajsen.It Pa /boot/defaults/dloader.menu
272b5ef8da1SThomas Nikolajsendefault settings for menu setup -- do not change this file.
273332f0f1dSSascha Wildner.It Pa /boot/defaults/loader.conf
274332f0f1dSSascha Wildnerdefault settings -- do not change this file.
275b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.menu
276b5ef8da1SThomas Nikolajsendefines the commands used by
277b5ef8da1SThomas Nikolajsen.Nm loader
278b5ef8da1SThomas Nikolajsento setup menus.
279332f0f1dSSascha Wildner.It Pa /boot/loader.conf
280332f0f1dSSascha Wildneruser defined settings.
281332f0f1dSSascha Wildner.It Pa /boot/loader.conf.local
282332f0f1dSSascha Wildnermachine-specific settings for sites with a common loader.conf.
283b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.rc
284b5ef8da1SThomas Nikolajsencontains the instructions to automatically process.
285332f0f1dSSascha Wildner.El
286332f0f1dSSascha Wildner.Sh SEE ALSO
287332f0f1dSSascha Wildner.Xr boot 8 ,
2889b38070eSSascha Wildner.Xr loader 8
289332f0f1dSSascha Wildner.Sh HISTORY
290332f0f1dSSascha WildnerThe file
291332f0f1dSSascha Wildner.Nm
292332f0f1dSSascha Wildnerfirst appeared in
293332f0f1dSSascha Wildner.Fx 3.2 .
294332f0f1dSSascha Wildner.Sh AUTHORS
295332f0f1dSSascha WildnerThis manual page was written by
296c616d378SFranco Fichtner.An Daniel C. Sobral Aq Mt dcs@FreeBSD.org .
297