xref: /illumos-gate/usr/src/man/man5/loader.conf.5 (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1*bbf21555SRichard Lowe.\" Copyright (c) 1999 Daniel C. Sobral
2*bbf21555SRichard Lowe.\" All rights reserved.
3*bbf21555SRichard Lowe.\"
4*bbf21555SRichard Lowe.\" Redistribution and use in source and binary forms, with or without
5*bbf21555SRichard Lowe.\" modification, are permitted provided that the following conditions
6*bbf21555SRichard Lowe.\" are met:
7*bbf21555SRichard Lowe.\" 1. Redistributions of source code must retain the above copyright
8*bbf21555SRichard Lowe.\"    notice, this list of conditions and the following disclaimer.
9*bbf21555SRichard Lowe.\" 2. Redistributions in binary form must reproduce the above copyright
10*bbf21555SRichard Lowe.\"    notice, this list of conditions and the following disclaimer in the
11*bbf21555SRichard Lowe.\"    documentation and/or other materials provided with the distribution.
12*bbf21555SRichard Lowe.\"
13*bbf21555SRichard Lowe.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*bbf21555SRichard Lowe.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*bbf21555SRichard Lowe.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*bbf21555SRichard Lowe.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*bbf21555SRichard Lowe.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*bbf21555SRichard Lowe.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*bbf21555SRichard Lowe.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*bbf21555SRichard Lowe.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*bbf21555SRichard Lowe.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*bbf21555SRichard Lowe.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*bbf21555SRichard Lowe.\" SUCH DAMAGE.
24*bbf21555SRichard Lowe.\"
25*bbf21555SRichard Lowe.Dd Nov 26, 2017
26*bbf21555SRichard Lowe.Dt LOADER.CONF 5
27*bbf21555SRichard Lowe.Os
28*bbf21555SRichard Lowe.Sh NAME
29*bbf21555SRichard Lowe.Nm loader.conf
30*bbf21555SRichard Lowe.Nd "system bootstrap configuration information"
31*bbf21555SRichard Lowe.Sh SYNOPSIS
32*bbf21555SRichard Lowe.Nm /boot/loader.conf
33*bbf21555SRichard Lowe.Sh DESCRIPTION
34*bbf21555SRichard LoweThe file
35*bbf21555SRichard Lowe.Nm
36*bbf21555SRichard Lowecontains descriptive information on bootstrapping the system.
37*bbf21555SRichard LoweThrough
38*bbf21555SRichard Loweit you can specify the kernel to be booted, parameters to be passed to
39*bbf21555SRichard Loweit, and additional modules to be loaded; and generally set all variables
40*bbf21555SRichard Lowedescribed in
41*bbf21555SRichard Lowe.Xr loader 7 .
42*bbf21555SRichard Lowe.Pp
43*bbf21555SRichard LoweLoader implements set of builtin commands and functions and script
44*bbf21555SRichard Loweinterpreter as standalone binary program.
45*bbf21555SRichard LoweWhen starting, the loader will read the file
46*bbf21555SRichard Lowe.Pa /boot/loader.rc
47*bbf21555SRichard Loweas initialization and startup script, to include other support files
48*bbf21555SRichard Loweand to read the configuration, describing current boot environment.
49*bbf21555SRichard LoweAll loader scripts and configuration files are located in the
50*bbf21555SRichard Lowe.Pa /boot
51*bbf21555SRichard Lowedirectory tree.
52*bbf21555SRichard Lowe.Pp
53*bbf21555SRichard LoweThe file
54*bbf21555SRichard Lowe.Pa /boot/loader.rc
55*bbf21555SRichard Lowemust contain the following two lines for
56*bbf21555SRichard Lowe.Nm
57*bbf21555SRichard Loweto be automatically processed:
58*bbf21555SRichard Lowe.Pp
59*bbf21555SRichard Lowe.Dl include /boot/forth/loader.4th
60*bbf21555SRichard Lowe.Dl start
61*bbf21555SRichard Lowe.Pp
62*bbf21555SRichard LoweThe default
63*bbf21555SRichard Lowe.Pa /boot/loader.rc
64*bbf21555SRichard Loweis provided by the operating system and may be replaced on operating
65*bbf21555SRichard Lowesystem update.
66*bbf21555SRichard LoweThe local updates are advised to be added into the
67*bbf21555SRichard Lowe.Pa /boot/loader.rc.local
68*bbf21555SRichard Lowe.Pp
69*bbf21555SRichard LoweThe configuration variables are read from the following files:
70*bbf21555SRichard Lowe.Bl -tag -width Ar
71*bbf21555SRichard Lowe.It Ar /boot/solaris/bootenv.rc
72*bbf21555SRichard LoweManaged by the
73*bbf21555SRichard Lowe.Xr eeprom 8
74*bbf21555SRichard Lowecommand.
75*bbf21555SRichard Lowe.It Ar /boot/defaults/loader.conf
76*bbf21555SRichard LoweLoader defaults provided by the operating system.
77*bbf21555SRichard Lowe.It Ar /boot/loader.conf
78*bbf21555SRichard LoweSystem specific loader configuration.
79*bbf21555SRichard LoweMay be provided by the operating system.
80*bbf21555SRichard Lowe.It Ar /boot/loader.conf.local
81*bbf21555SRichard LoweUser editable loader configuration.
82*bbf21555SRichard Lowe.It Ar /boot/conf.d/*
83*bbf21555SRichard LoweUser editable loader configuration snippets.
84*bbf21555SRichard LoweThe files are processed in lexicographical order.
85*bbf21555SRichard LoweThe configuration snippets mechanism is not available in case of TFTP boot as
86*bbf21555SRichard LoweTFTP does not provide the directory list.
87*bbf21555SRichard Lowe.It Ar /boot/transient.conf
88*bbf21555SRichard LoweConfiguration file for transient boot.
89*bbf21555SRichard LoweThis file is created by the
90*bbf21555SRichard Lowe.Xr reboot 8
91*bbf21555SRichard Lowecommand and is automatically removed when system is reaching the multi-user
92*bbf21555SRichard Lowerun level.
93*bbf21555SRichard Lowe.El
94*bbf21555SRichard Lowe.Pp
95*bbf21555SRichard LoweThe configuration is processed in the order listed above.
96*bbf21555SRichard Lowe.Ss SYNTAX
97*bbf21555SRichard LoweThe general parsing rules are:
98*bbf21555SRichard Lowe.Bl -bullet
99*bbf21555SRichard Lowe.It
100*bbf21555SRichard LoweSpaces and empty lines are ignored.
101*bbf21555SRichard Lowe.It
102*bbf21555SRichard LoweA # sign will mark the remainder of the line as a comment.
103*bbf21555SRichard Lowe.It
104*bbf21555SRichard LoweOnly one setting can be present on each line.
105*bbf21555SRichard Lowe.El
106*bbf21555SRichard Lowe.Pp
107*bbf21555SRichard LoweAll settings have the following format:
108*bbf21555SRichard Lowe.Pp
109*bbf21555SRichard Lowe.Dl variable="value"
110*bbf21555SRichard Lowe.Pp
111*bbf21555SRichard LoweUnless it belongs to one of the classes of settings that receive special
112*bbf21555SRichard Lowetreatment, a setting will set the value of a
113*bbf21555SRichard Lowe.Xr loader 7
114*bbf21555SRichard Loweenvironment variable.
115*bbf21555SRichard LoweThe settings that receive special
116*bbf21555SRichard Lowetreatment are listed below.
117*bbf21555SRichard LoweSettings beginning with
118*bbf21555SRichard Lowe.Qq *
119*bbf21555SRichard Lowebelow define the modules to be loaded and
120*bbf21555SRichard Lowemay have any prefix; the prefix identifies a module.
121*bbf21555SRichard LoweAll such settings sharing a common
122*bbf21555SRichard Loweprefix refer to the same module.
123*bbf21555SRichard Lowe.Bl -tag -width Ar
124*bbf21555SRichard Lowe.It Ar exec
125*bbf21555SRichard LoweImmediately executes a
126*bbf21555SRichard Lowe.Xr loader 7
127*bbf21555SRichard Lowecommand.
128*bbf21555SRichard LoweThis type of setting cannot be processed by programs other
129*bbf21555SRichard Lowethan
130*bbf21555SRichard Lowe.Xr loader 7 ,
131*bbf21555SRichard Loweso its use should be avoided.
132*bbf21555SRichard LoweMultiple instances of it will be processed
133*bbf21555SRichard Loweindependently.
134*bbf21555SRichard Lowe.It Ar loader_conf_files
135*bbf21555SRichard LoweDefines additional configuration files to be processed right after the
136*bbf21555SRichard Lowepresent file.
137*bbf21555SRichard Lowe.It Ar kernel
138*bbf21555SRichard LoweName of the kernel to be loaded.
139*bbf21555SRichard LoweIf no kernel name is set, no additional
140*bbf21555SRichard Lowemodules will be loaded.
141*bbf21555SRichard Lowe.It Ar boot-args
142*bbf21555SRichard LoweFlags to be passed to the kernel.
143*bbf21555SRichard Lowe.It Ar password
144*bbf21555SRichard LoweProtect boot menu with a password without interrupting
145*bbf21555SRichard Lowe.Ic autoboot
146*bbf21555SRichard Loweprocess.
147*bbf21555SRichard LoweThe password should be in clear text format.
148*bbf21555SRichard LoweIf a password is set, boot menu will not appear until any key is pressed during
149*bbf21555SRichard Lowecountdown period specified by
150*bbf21555SRichard Lowe.Va autoboot_delay
151*bbf21555SRichard Lowevariable or
152*bbf21555SRichard Lowe.Ic autoboot
153*bbf21555SRichard Loweprocess fails.
154*bbf21555SRichard LoweIn both cases user should provide specified password to be able to access boot
155*bbf21555SRichard Lowemenu.
156*bbf21555SRichard Lowe.It Ar bootlock_password
157*bbf21555SRichard LoweProvides a password to be required by check-password before execution is
158*bbf21555SRichard Loweallowed to continue.
159*bbf21555SRichard LoweThe password should be in clear text format.
160*bbf21555SRichard LoweIf a password is set, the user must provide specified password to boot.
161*bbf21555SRichard Lowe.It Ar verbose_loading
162*bbf21555SRichard LoweIf set to
163*bbf21555SRichard Lowe.Dq YES ,
164*bbf21555SRichard Lowemodule names will be displayed as they are loaded.
165*bbf21555SRichard Lowe.It Ar *_load
166*bbf21555SRichard LoweIf set to
167*bbf21555SRichard Lowe.Dq YES ,
168*bbf21555SRichard Lowethat module will be loaded.
169*bbf21555SRichard LoweIf no name is defined (see below), the
170*bbf21555SRichard Lowemodule's name is taken to be the same as the prefix.
171*bbf21555SRichard Lowe.It Ar *_name
172*bbf21555SRichard LoweDefines the name of the module.
173*bbf21555SRichard Lowe.It Ar *_type
174*bbf21555SRichard LoweDefines the module's type.
175*bbf21555SRichard LoweIf none is given, it defaults to a kld module.
176*bbf21555SRichard Lowe.It Ar *_flags
177*bbf21555SRichard LoweFlags and parameters to be passed to the module.
178*bbf21555SRichard Lowe.It Ar *_before
179*bbf21555SRichard LoweCommands to be executed before the module is loaded.
180*bbf21555SRichard LoweUse of this setting
181*bbf21555SRichard Loweshould be avoided.
182*bbf21555SRichard Lowe.It Ar *_after
183*bbf21555SRichard LoweCommands to be executed after the module is loaded.
184*bbf21555SRichard LoweUse of this setting
185*bbf21555SRichard Loweshould be avoided.
186*bbf21555SRichard Lowe.It Ar *_error
187*bbf21555SRichard LoweCommands to be executed if the loading of a module fails.
188*bbf21555SRichard LoweExcept for the
189*bbf21555SRichard Lowespecial value
190*bbf21555SRichard Lowe.Dq abort ,
191*bbf21555SRichard Lowewhich aborts the bootstrap process, use of this setting should be avoided.
192*bbf21555SRichard Lowe.El
193*bbf21555SRichard Lowe.Ss DEFAULT SETTINGS
194*bbf21555SRichard LoweMost of
195*bbf21555SRichard Lowe.Nm Ns 's
196*bbf21555SRichard Lowedefault settings can be ignored.
197*bbf21555SRichard LoweThe few of them which are important
198*bbf21555SRichard Loweor useful are:
199*bbf21555SRichard Lowe.Bl -tag -width bootfile -offset indent
200*bbf21555SRichard Lowe.It Va console
201*bbf21555SRichard Lowe.Pq Dq text
202*bbf21555SRichard Lowe.Dq ttya
203*bbf21555SRichard Lowe-
204*bbf21555SRichard Lowe.Dq ttyd
205*bbf21555SRichard Loweselects serial console,
206*bbf21555SRichard Lowe.Dq text
207*bbf21555SRichard Loweselects the video console,
208*bbf21555SRichard Lowe.Dq nullconsole
209*bbf21555SRichard Loweselects a mute console
210*bbf21555SRichard Lowe(useful for systems with neither a video console nor a serial port), and
211*bbf21555SRichard Lowe.Dq spinconsole
212*bbf21555SRichard Loweselects the video console which prevents any input and hides all output
213*bbf21555SRichard Lowereplacing it with
214*bbf21555SRichard Lowe.Dq spinning
215*bbf21555SRichard Lowecharacter (useful for embedded products and such).
216*bbf21555SRichard Lowe.It Va kernel
217*bbf21555SRichard Lowe.Pq Dq i86pc/kernel/${ISADIR}
218*bbf21555SRichard Lowe.Ar /platform
219*bbf21555SRichard Lowesub-directory containing kernel
220*bbf21555SRichard Lowe.It Va loader_conf_files
221*bbf21555SRichard Lowe.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
222*bbf21555SRichard Lowe.It Va beastie_disable
223*bbf21555SRichard LoweIf set to
224*bbf21555SRichard Lowe.Dq YES ,
225*bbf21555SRichard Lowethe beastie boot menu will be skipped.
226*bbf21555SRichard LoweThe beastie boot menu is always skipped if running non-x86 hardware.
227*bbf21555SRichard Lowe.It Va loader_logo Pq Dq Li illumos
228*bbf21555SRichard LoweSelects a desired logo in the beastie boot menu.
229*bbf21555SRichard LowePossible values depend on distribution;
230*bbf21555SRichard Lowe.Dq Li none
231*bbf21555SRichard Lowewill disable the logo.
232*bbf21555SRichard Lowe.It Va loader_color
233*bbf21555SRichard LoweIf set to
234*bbf21555SRichard Lowe.Dq NO ,
235*bbf21555SRichard Lowethe beastie boot menu will be displayed without ANSI coloring.
236*bbf21555SRichard Lowe.El
237*bbf21555SRichard Lowe.Sh SEE ALSO
238*bbf21555SRichard Lowe.Xr loader 7 ,
239*bbf21555SRichard Lowe.Xr loader.4th 7 ,
240*bbf21555SRichard Lowe.Xr boot 8 ,
241*bbf21555SRichard Lowe.Xr eeprom 8
242*bbf21555SRichard Lowe.Sh NOTES
243*bbf21555SRichard LoweThe
244*bbf21555SRichard Lowe.Xr loader 7
245*bbf21555SRichard Lowestops reading
246*bbf21555SRichard Lowe.Nm
247*bbf21555SRichard Lowewhen it encounters a syntax error, so any options which are vital for
248*bbf21555SRichard Lowebooting a particular system should precede any experimental additions to
249*bbf21555SRichard Lowe.Nm .
250