xref: /titanic_51/usr/src/man/man4/loader.conf.4 (revision ba11c5b535a8958668f939901bdcacb3ee8b7570)
1*ba11c5b5SToomas Soome.\" Copyright (c) 1999 Daniel C. Sobral
2*ba11c5b5SToomas Soome.\" All rights reserved.
3*ba11c5b5SToomas Soome.\"
4*ba11c5b5SToomas Soome.\" Redistribution and use in source and binary forms, with or without
5*ba11c5b5SToomas Soome.\" modification, are permitted provided that the following conditions
6*ba11c5b5SToomas Soome.\" are met:
7*ba11c5b5SToomas Soome.\" 1. Redistributions of source code must retain the above copyright
8*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer.
9*ba11c5b5SToomas Soome.\" 2. Redistributions in binary form must reproduce the above copyright
10*ba11c5b5SToomas Soome.\"    notice, this list of conditions and the following disclaimer in the
11*ba11c5b5SToomas Soome.\"    documentation and/or other materials provided with the distribution.
12*ba11c5b5SToomas Soome.\"
13*ba11c5b5SToomas Soome.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*ba11c5b5SToomas Soome.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*ba11c5b5SToomas Soome.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*ba11c5b5SToomas Soome.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*ba11c5b5SToomas Soome.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*ba11c5b5SToomas Soome.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*ba11c5b5SToomas Soome.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*ba11c5b5SToomas Soome.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*ba11c5b5SToomas Soome.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*ba11c5b5SToomas Soome.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*ba11c5b5SToomas Soome.\" SUCH DAMAGE.
24*ba11c5b5SToomas Soome.\"
25*ba11c5b5SToomas Soome.Dd Apr 20, 2016
26*ba11c5b5SToomas Soome.Dt LOADER.CONF 4
27*ba11c5b5SToomas Soome.Os
28*ba11c5b5SToomas Soome.Sh NAME
29*ba11c5b5SToomas Soome.Nm loader.conf
30*ba11c5b5SToomas Soome.Nd "system bootstrap configuration information"
31*ba11c5b5SToomas Soome.Sh SYNOPSIS
32*ba11c5b5SToomas Soome.Nm /boot/loader.conf
33*ba11c5b5SToomas Soome.Sh DESCRIPTION
34*ba11c5b5SToomas SoomeThe file
35*ba11c5b5SToomas Soome.Nm
36*ba11c5b5SToomas Soomecontains descriptive information on bootstrapping the system.
37*ba11c5b5SToomas SoomeThrough
38*ba11c5b5SToomas Soomeit you can specify the kernel to be booted, parameters to be passed to
39*ba11c5b5SToomas Soomeit, and additional modules to be loaded; and generally set all variables
40*ba11c5b5SToomas Soomedescribed in
41*ba11c5b5SToomas Soome.Xr loader 5 .
42*ba11c5b5SToomas Soome.Pp
43*ba11c5b5SToomas SoomeLoader implements set of builtin commands and functions and script
44*ba11c5b5SToomas Soomeinterpreter as standalone binary program. When starting, the loader will
45*ba11c5b5SToomas Soomeread the file
46*ba11c5b5SToomas Soome.Pa /boot/loader.rc
47*ba11c5b5SToomas Soomeas initialization and startup script, to include other support files
48*ba11c5b5SToomas Soomeand to read the configuration, describing current boot environment.
49*ba11c5b5SToomas SoomeAll loader scripts and configuration files are located in the
50*ba11c5b5SToomas Soome.Pa /boot
51*ba11c5b5SToomas Soomedirectory tree.
52*ba11c5b5SToomas Soome.Pp
53*ba11c5b5SToomas SoomeThe file
54*ba11c5b5SToomas Soome.Pa /boot/loader.rc
55*ba11c5b5SToomas Soomemust contain the following two lines for
56*ba11c5b5SToomas Soome.Nm
57*ba11c5b5SToomas Soometo be automatically processed:
58*ba11c5b5SToomas Soome.Pp
59*ba11c5b5SToomas Soome.Dl include /boot/forth/loader.4th
60*ba11c5b5SToomas Soome.Dl start
61*ba11c5b5SToomas Soome.Pp
62*ba11c5b5SToomas SoomeThe default
63*ba11c5b5SToomas Soome.Pa /boot/loader.rc
64*ba11c5b5SToomas Soomeis provided by the operating system and may be replaced on operating
65*ba11c5b5SToomas Soomesystem update. The local updates are advised to be added into the
66*ba11c5b5SToomas Soome.Pa /boot/loader.rc.local
67*ba11c5b5SToomas Soome.Pp
68*ba11c5b5SToomas SoomeThe configuration variables are read from the following files:
69*ba11c5b5SToomas Soome.Bl -tag -width Ar
70*ba11c5b5SToomas Soome.It Ar /boot/solaris/bootenv.rc
71*ba11c5b5SToomas SoomeManaged by the
72*ba11c5b5SToomas Soome.Xr eeprom 1M
73*ba11c5b5SToomas Soomecommand.
74*ba11c5b5SToomas Soome.It Ar /boot/defaults/loader.conf
75*ba11c5b5SToomas SoomeLoader defaults provided by the operating system.
76*ba11c5b5SToomas Soome.It Ar /boot/loader.conf
77*ba11c5b5SToomas SoomeSystem specific loader configuration. May be provided by the operating system.
78*ba11c5b5SToomas Soome.It Ar /boot/loader.conf.local
79*ba11c5b5SToomas SoomeUser editable loader configuration.
80*ba11c5b5SToomas Soome.It Ar /boot/conf.d/*
81*ba11c5b5SToomas SoomeUser editable loader configuration snippets. The files are proccessed in
82*ba11c5b5SToomas Soomelexicographical order. The configuration snippets mechanism is not
83*ba11c5b5SToomas Soomeavailable in case of TFTP boot as TFTP does not provide the directory list.
84*ba11c5b5SToomas Soome.It Ar /boot/transient.conf
85*ba11c5b5SToomas SoomeConfiguration file for transient boot. This file is created by the
86*ba11c5b5SToomas Soome.Xr reboot 1M
87*ba11c5b5SToomas Soomecommand and is automatically removed when system is reaching the multi-user
88*ba11c5b5SToomas Soomerun level.
89*ba11c5b5SToomas Soome.El
90*ba11c5b5SToomas Soome.Pp
91*ba11c5b5SToomas SoomeThe configuration is processed in the order listed above.
92*ba11c5b5SToomas Soome.Ss SYNTAX
93*ba11c5b5SToomas SoomeThe general parsing rules are:
94*ba11c5b5SToomas Soome.Bl -bullet
95*ba11c5b5SToomas Soome.It
96*ba11c5b5SToomas SoomeSpaces and empty lines are ignored.
97*ba11c5b5SToomas Soome.It
98*ba11c5b5SToomas SoomeA # sign will mark the remainder of the line as a comment.
99*ba11c5b5SToomas Soome.It
100*ba11c5b5SToomas SoomeOnly one setting can be present on each line.
101*ba11c5b5SToomas Soome.El
102*ba11c5b5SToomas Soome.Pp
103*ba11c5b5SToomas SoomeAll settings have the following format:
104*ba11c5b5SToomas Soome.Pp
105*ba11c5b5SToomas Soome.Dl variable="value"
106*ba11c5b5SToomas Soome.Pp
107*ba11c5b5SToomas SoomeUnless it belongs to one of the classes of settings that receive special
108*ba11c5b5SToomas Soometreatment, a setting will set the value of a
109*ba11c5b5SToomas Soome.Xr loader 5
110*ba11c5b5SToomas Soomeenvironment variable.
111*ba11c5b5SToomas SoomeThe settings that receive special
112*ba11c5b5SToomas Soometreatment are listed below.
113*ba11c5b5SToomas SoomeSettings beginning with
114*ba11c5b5SToomas Soome.Qq *
115*ba11c5b5SToomas Soomebelow define the modules to be loaded and
116*ba11c5b5SToomas Soomemay have any prefix; the prefix identifies a module.
117*ba11c5b5SToomas SoomeAll such settings sharing a common
118*ba11c5b5SToomas Soomeprefix refer to the same module.
119*ba11c5b5SToomas Soome.Bl -tag -width Ar
120*ba11c5b5SToomas Soome.It Ar exec
121*ba11c5b5SToomas SoomeImmediately executes a
122*ba11c5b5SToomas Soome.Xr loader 5
123*ba11c5b5SToomas Soomecommand.
124*ba11c5b5SToomas SoomeThis type of setting cannot be processed by programs other
125*ba11c5b5SToomas Soomethan
126*ba11c5b5SToomas Soome.Xr loader 5 ,
127*ba11c5b5SToomas Soomeso its use should be avoided.
128*ba11c5b5SToomas SoomeMultiple instances of it will be processed
129*ba11c5b5SToomas Soomeindependently.
130*ba11c5b5SToomas Soome.It Ar loader_conf_files
131*ba11c5b5SToomas SoomeDefines additional configuration files to be processed right after the
132*ba11c5b5SToomas Soomepresent file.
133*ba11c5b5SToomas Soome.It Ar kernel
134*ba11c5b5SToomas SoomeName of the kernel to be loaded.
135*ba11c5b5SToomas SoomeIf no kernel name is set, no additional
136*ba11c5b5SToomas Soomemodules will be loaded.
137*ba11c5b5SToomas Soome.It Ar boot-args
138*ba11c5b5SToomas SoomeFlags to be passed to the kernel.
139*ba11c5b5SToomas Soome.It Ar password
140*ba11c5b5SToomas SoomeProtect boot menu with a password without interrupting
141*ba11c5b5SToomas Soome.Ic autoboot
142*ba11c5b5SToomas Soomeprocess.
143*ba11c5b5SToomas SoomeThe password should be in clear text format.
144*ba11c5b5SToomas SoomeIf a password is set, boot menu will not appear until any key is pressed during
145*ba11c5b5SToomas Soomecountdown period specified by
146*ba11c5b5SToomas Soome.Va autoboot_delay
147*ba11c5b5SToomas Soomevariable or
148*ba11c5b5SToomas Soome.Ic autoboot
149*ba11c5b5SToomas Soomeprocess fails.
150*ba11c5b5SToomas SoomeIn both cases user should provide specified password to be able to access boot
151*ba11c5b5SToomas Soomemenu.
152*ba11c5b5SToomas Soome.It Ar bootlock_password
153*ba11c5b5SToomas SoomeProvides a password to be required by check-password before execution is
154*ba11c5b5SToomas Soomeallowed to continue.
155*ba11c5b5SToomas SoomeThe password should be in clear text format.
156*ba11c5b5SToomas SoomeIf a password is set, the user must provide specified password to boot.
157*ba11c5b5SToomas Soome.It Ar verbose_loading
158*ba11c5b5SToomas SoomeIf set to
159*ba11c5b5SToomas Soome.Dq YES ,
160*ba11c5b5SToomas Soomemodule names will be displayed as they are loaded.
161*ba11c5b5SToomas Soome.It Ar *_load
162*ba11c5b5SToomas SoomeIf set to
163*ba11c5b5SToomas Soome.Dq YES ,
164*ba11c5b5SToomas Soomethat module will be loaded.
165*ba11c5b5SToomas SoomeIf no name is defined (see below), the
166*ba11c5b5SToomas Soomemodule's name is taken to be the same as the prefix.
167*ba11c5b5SToomas Soome.It Ar *_name
168*ba11c5b5SToomas SoomeDefines the name of the module.
169*ba11c5b5SToomas Soome.It Ar *_type
170*ba11c5b5SToomas SoomeDefines the module's type.
171*ba11c5b5SToomas SoomeIf none is given, it defaults to a kld module.
172*ba11c5b5SToomas Soome.It Ar *_flags
173*ba11c5b5SToomas SoomeFlags and parameters to be passed to the module.
174*ba11c5b5SToomas Soome.It Ar *_before
175*ba11c5b5SToomas SoomeCommands to be executed before the module is loaded.
176*ba11c5b5SToomas SoomeUse of this setting
177*ba11c5b5SToomas Soomeshould be avoided.
178*ba11c5b5SToomas Soome.It Ar *_after
179*ba11c5b5SToomas SoomeCommands to be executed after the module is loaded.
180*ba11c5b5SToomas SoomeUse of this setting
181*ba11c5b5SToomas Soomeshould be avoided.
182*ba11c5b5SToomas Soome.It Ar *_error
183*ba11c5b5SToomas SoomeCommands to be executed if the loading of a module fails.
184*ba11c5b5SToomas SoomeExcept for the
185*ba11c5b5SToomas Soomespecial value
186*ba11c5b5SToomas Soome.Dq abort ,
187*ba11c5b5SToomas Soomewhich aborts the bootstrap process, use of this setting should be avoided.
188*ba11c5b5SToomas Soome.El
189*ba11c5b5SToomas Soome.Ss DEFAULT SETTINGS
190*ba11c5b5SToomas SoomeMost of
191*ba11c5b5SToomas Soome.Nm Ns 's
192*ba11c5b5SToomas Soomedefault settings can be ignored.
193*ba11c5b5SToomas SoomeThe few of them which are important
194*ba11c5b5SToomas Soomeor useful are:
195*ba11c5b5SToomas Soome.Bl -tag -width bootfile -offset indent
196*ba11c5b5SToomas Soome.It Va console
197*ba11c5b5SToomas Soome.Pq Dq text
198*ba11c5b5SToomas Soome.Dq ttya
199*ba11c5b5SToomas Soome-
200*ba11c5b5SToomas Soome.Dq ttyd
201*ba11c5b5SToomas Soomeselects serial console,
202*ba11c5b5SToomas Soome.Dq text
203*ba11c5b5SToomas Soomeselects the video console,
204*ba11c5b5SToomas Soome.Dq nullconsole
205*ba11c5b5SToomas Soomeselects a mute console
206*ba11c5b5SToomas Soome(useful for systems with neither a video console nor a serial port), and
207*ba11c5b5SToomas Soome.Dq spinconsole
208*ba11c5b5SToomas Soomeselects the video console which prevents any input and hides all output
209*ba11c5b5SToomas Soomereplacing it with
210*ba11c5b5SToomas Soome.Dq spinning
211*ba11c5b5SToomas Soomecharacter (useful for embedded products and such).
212*ba11c5b5SToomas Soome.It Va kernel
213*ba11c5b5SToomas Soome.Pq Dq i86pc/kernel/${ISADIR}
214*ba11c5b5SToomas Soome.Ar /platform
215*ba11c5b5SToomas Soomesub-directory containing kernel
216*ba11c5b5SToomas Soome.It Va loader_conf_files
217*ba11c5b5SToomas Soome.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
218*ba11c5b5SToomas Soome.It Va beastie_disable
219*ba11c5b5SToomas SoomeIf set to
220*ba11c5b5SToomas Soome.Dq YES ,
221*ba11c5b5SToomas Soomethe beastie boot menu will be skipped.
222*ba11c5b5SToomas SoomeThe beastie boot menu is always skipped if running non-x86 hardware.
223*ba11c5b5SToomas Soome.It Va loader_logo Pq Dq Li illumos
224*ba11c5b5SToomas SoomeSelects a desired logo in the beastie boot menu.
225*ba11c5b5SToomas SoomePossible values depend on distribution;
226*ba11c5b5SToomas Soome.Dq Li none
227*ba11c5b5SToomas Soomewill disable the logo.
228*ba11c5b5SToomas Soome.It Va loader_color
229*ba11c5b5SToomas SoomeIf set to
230*ba11c5b5SToomas Soome.Dq NO ,
231*ba11c5b5SToomas Soomethe beastie boot menu will be displayed without ANSI coloring.
232*ba11c5b5SToomas Soome.El
233*ba11c5b5SToomas Soome.Sh SEE ALSO
234*ba11c5b5SToomas Soome.Xr boot 1M ,
235*ba11c5b5SToomas Soome.Xr eeprom 1M ,
236*ba11c5b5SToomas Soome.Xr loader 5 ,
237*ba11c5b5SToomas Soome.Xr loader.4th 5
238*ba11c5b5SToomas Soome.Sh NOTES
239*ba11c5b5SToomas SoomeThe
240*ba11c5b5SToomas Soome.Xr loader 5
241*ba11c5b5SToomas Soomestops reading
242*ba11c5b5SToomas Soome.Nm
243*ba11c5b5SToomas Soomewhen it encounters a syntax error, so any options which are vital for
244*ba11c5b5SToomas Soomebooting a particular system should precede any experimental additions to
245*ba11c5b5SToomas Soome.Nm .
246