xref: /dflybsd-src/share/man/man5/loader.conf.5 (revision c616d3786462c4bbb32602d276dfb62c4d97ef77)
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.
177792c92cbSMatthew Dillon.Pp
178792c92cbSMatthew DillonIf you want the boot code to be available on COM2 at 57600 baud instead
179792c92cbSMatthew Dillonof COM1, for example, you must set the variables
180792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_PORT=0x2f8
181792c92cbSMatthew Dillonand
182792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_SPEED=57600
183792c92cbSMatthew Dillonin
184792c92cbSMatthew Dillon.Pa /etc/make.conf
185792c92cbSMatthew Dillonand recompile and install the boot code at
186792c92cbSMatthew Dillon.Pa /usr/src/sys/boot ,
187792c92cbSMatthew Dillonthen install the bootcode to the partition via
188792c92cbSMatthew Dillon.Xr disklabel 8 .
189792c92cbSMatthew Dillon.Pp
190792c92cbSMatthew DillonNote that in comconsole mode the kernel will pick up the baud rate
191792c92cbSMatthew Dillonfrom the boot loader, so no kernel recompile is needed.
192332f0f1dSSascha Wildner.It Va fred_disable
193332f0f1dSSascha Wildner.Pq Dq NO
194332f0f1dSSascha WildnerShows a monochrome version of Fred, the official
195332f0f1dSSascha Wildner.Dx
196332f0f1dSSascha Wildnermascot, when the
197332f0f1dSSascha Wildnerboot menu appears.
198332f0f1dSSascha WildnerTo make his life a bit more colorful, consider setting
199332f0f1dSSascha Wildner.Pa loader_color
200332f0f1dSSascha Wildnerto
201332f0f1dSSascha Wildner.Dq YES .
2028b20437dSJoe Talbott.It Va fred_on_left
2038b20437dSJoe Talbott.Pq Dq NO
2048b20437dSJoe TalbottShows Fred on the left side of the menu rather than the right side.
205332f0f1dSSascha Wildner.It Va kernel
206b5ef8da1SThomas Nikolajsen.Pq Dq kernel .
207332f0f1dSSascha Wildner.It Va loader_color
208332f0f1dSSascha Wildner.Pq Dq NO
209332f0f1dSSascha WildnerIf set to
210332f0f1dSSascha Wildner.Dq YES ,
211332f0f1dSSascha Wildneryou'll meet Fred, the official
212332f0f1dSSascha Wildner.Dx
213332f0f1dSSascha Wildnermascot, in technicolor when the
214332f0f1dSSascha Wildnerboot menu appears (remember to set
215332f0f1dSSascha Wildner.Pa fred_disable
216332f0f1dSSascha Wildnerto
217332f0f1dSSascha Wildner.Dq NO
218332f0f1dSSascha Wildnerfor this to work.)
219332f0f1dSSascha Wildner.It Va splash_bmp_load
220332f0f1dSSascha Wildner.Pq Dq NO
221332f0f1dSSascha WildnerIf set to
222332f0f1dSSascha Wildner.Dq YES ,
223332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a bmp image
224332f0f1dSSascha Wildneron the screen while booting.
225332f0f1dSSascha Wildner.It Va splash_pcx_load
226332f0f1dSSascha Wildner.Pq Dq NO
227332f0f1dSSascha WildnerIf set to
228332f0f1dSSascha Wildner.Dq YES ,
229332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a pcx image
230332f0f1dSSascha Wildneron the screen while booting.
231332f0f1dSSascha Wildner.It Va userconfig_script_load
232332f0f1dSSascha Wildner.Pq Dq NO
233332f0f1dSSascha WildnerIf set to
234332f0f1dSSascha Wildner.Dq YES ,
235332f0f1dSSascha Wildnerwill load the userconfig data.
236332f0f1dSSascha Wildner.It Va vesa_load
237332f0f1dSSascha Wildner.Pq Dq NO
238332f0f1dSSascha WildnerIf set to
239332f0f1dSSascha Wildner.Dq YES ,
240332f0f1dSSascha Wildnerthe vesa module will be loaded, enabling bitmaps above VGA resolution to
241332f0f1dSSascha Wildnerbe displayed.
242332f0f1dSSascha Wildner.El
243792c92cbSMatthew Dillon.Sh IPMI
244792c92cbSMatthew DillonGenerally speaking machines with IPMI capabilities are capable of
245792c92cbSMatthew Dillonredirecting the BIOS POST to a fake serial port controlled by the BMC.
246792c92cbSMatthew DillonIt is then possible to use
247792c92cbSMatthew Dillon.Xr ipmitool 1
248c8e8a2e5SSascha Wildnerfrom
249c8e8a2e5SSascha Wildner.Xr dports 7
250c8e8a2e5SSascha Wildnerto access the console.
251440b845aSSascha Wildner.Dx
252440b845aSSascha Wildnerkernels adjust the video mode in a way that the BMC cannot usually
253792c92cbSMatthew Dillonredirect, so your best bet is to set the boot loader AND the kernel up to
254792c92cbSMatthew Dillonuse a serial port via the
255792c92cbSMatthew Dillon.Va console=comconsole
256792c92cbSMatthew Dillonfeature described above.
257792c92cbSMatthew DillonOften the IPMI controller, called the BMC, is not sitting on COM1 so
258440b845aSSascha Wildner.Dx Ap s
259440b845aSSascha Wildnerdefault console parameters and baud rate will not work.
260332f0f1dSSascha Wildner.Sh FILES
261b5ef8da1SThomas Nikolajsen.Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact
262b5ef8da1SThomas Nikolajsen.It Pa /boot/defaults/dloader.menu
263b5ef8da1SThomas Nikolajsendefault settings for menu setup -- do not change this file.
264332f0f1dSSascha Wildner.It Pa /boot/defaults/loader.conf
265332f0f1dSSascha Wildnerdefault settings -- do not change this file.
266b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.menu
267b5ef8da1SThomas Nikolajsendefines the commands used by
268b5ef8da1SThomas Nikolajsen.Nm loader
269b5ef8da1SThomas Nikolajsento setup menus.
270332f0f1dSSascha Wildner.It Pa /boot/loader.conf
271332f0f1dSSascha Wildneruser defined settings.
272332f0f1dSSascha Wildner.It Pa /boot/loader.conf.local
273332f0f1dSSascha Wildnermachine-specific settings for sites with a common loader.conf.
274b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.rc
275b5ef8da1SThomas Nikolajsencontains the instructions to automatically process.
276332f0f1dSSascha Wildner.El
277332f0f1dSSascha Wildner.Sh SEE ALSO
278332f0f1dSSascha Wildner.Xr boot 8 ,
2799b38070eSSascha Wildner.Xr loader 8
280332f0f1dSSascha Wildner.Sh HISTORY
281332f0f1dSSascha WildnerThe file
282332f0f1dSSascha Wildner.Nm
283332f0f1dSSascha Wildnerfirst appeared in
284332f0f1dSSascha Wildner.Fx 3.2 .
285332f0f1dSSascha Wildner.Sh AUTHORS
286332f0f1dSSascha WildnerThis manual page was written by
287*c616d378SFranco Fichtner.An Daniel C. Sobral Aq Mt dcs@FreeBSD.org .
288