xref: /illumos-gate/usr/src/man/man5/loader.conf.5 (revision bbf21555)
1199767f8SToomas Soome.\" Copyright (c) 1999 Daniel C. Sobral
2199767f8SToomas Soome.\" All rights reserved.
3199767f8SToomas Soome.\"
4199767f8SToomas Soome.\" Redistribution and use in source and binary forms, with or without
5199767f8SToomas Soome.\" modification, are permitted provided that the following conditions
6199767f8SToomas Soome.\" are met:
7199767f8SToomas Soome.\" 1. Redistributions of source code must retain the above copyright
8199767f8SToomas Soome.\"    notice, this list of conditions and the following disclaimer.
9199767f8SToomas Soome.\" 2. Redistributions in binary form must reproduce the above copyright
10199767f8SToomas Soome.\"    notice, this list of conditions and the following disclaimer in the
11199767f8SToomas Soome.\"    documentation and/or other materials provided with the distribution.
12199767f8SToomas Soome.\"
13199767f8SToomas Soome.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14199767f8SToomas Soome.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15199767f8SToomas Soome.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16199767f8SToomas Soome.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17199767f8SToomas Soome.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18199767f8SToomas Soome.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19199767f8SToomas Soome.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20199767f8SToomas Soome.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21199767f8SToomas Soome.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22199767f8SToomas Soome.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23199767f8SToomas Soome.\" SUCH DAMAGE.
24199767f8SToomas Soome.\"
25c5bab702SPeter Tribble.Dd Nov 26, 2017
26*bbf21555SRichard Lowe.Dt LOADER.CONF 5
27199767f8SToomas Soome.Os
28199767f8SToomas Soome.Sh NAME
29199767f8SToomas Soome.Nm loader.conf
30199767f8SToomas Soome.Nd "system bootstrap configuration information"
310b5e2468SToomas Soome.Sh SYNOPSIS
320b5e2468SToomas Soome.Nm /boot/loader.conf
33199767f8SToomas Soome.Sh DESCRIPTION
34199767f8SToomas SoomeThe file
35199767f8SToomas Soome.Nm
36199767f8SToomas Soomecontains descriptive information on bootstrapping the system.
37199767f8SToomas SoomeThrough
38199767f8SToomas Soomeit you can specify the kernel to be booted, parameters to be passed to
39199767f8SToomas Soomeit, and additional modules to be loaded; and generally set all variables
40199767f8SToomas Soomedescribed in
41*bbf21555SRichard Lowe.Xr loader 7 .
420b5e2468SToomas Soome.Pp
430b5e2468SToomas SoomeLoader implements set of builtin commands and functions and script
4472d3dbb9SYuri Pankovinterpreter as standalone binary program.
4572d3dbb9SYuri PankovWhen starting, the loader will read the file
460b5e2468SToomas Soome.Pa /boot/loader.rc
470b5e2468SToomas Soomeas initialization and startup script, to include other support files
480b5e2468SToomas Soomeand to read the configuration, describing current boot environment.
490b5e2468SToomas SoomeAll loader scripts and configuration files are located in the
500b5e2468SToomas Soome.Pa /boot
510b5e2468SToomas Soomedirectory tree.
52199767f8SToomas Soome.Pp
53199767f8SToomas SoomeThe file
54199767f8SToomas Soome.Pa /boot/loader.rc
55199767f8SToomas Soomemust contain the following two lines for
56199767f8SToomas Soome.Nm
57199767f8SToomas Soometo be automatically processed:
58199767f8SToomas Soome.Pp
590b5e2468SToomas Soome.Dl include /boot/forth/loader.4th
60199767f8SToomas Soome.Dl start
61199767f8SToomas Soome.Pp
620b5e2468SToomas SoomeThe default
63199767f8SToomas Soome.Pa /boot/loader.rc
640b5e2468SToomas Soomeis provided by the operating system and may be replaced on operating
6572d3dbb9SYuri Pankovsystem update.
6672d3dbb9SYuri PankovThe local updates are advised to be added into the
670b5e2468SToomas Soome.Pa /boot/loader.rc.local
68199767f8SToomas Soome.Pp
690b5e2468SToomas SoomeThe configuration variables are read from the following files:
700b5e2468SToomas Soome.Bl -tag -width Ar
710b5e2468SToomas Soome.It Ar /boot/solaris/bootenv.rc
720b5e2468SToomas SoomeManaged by the
73*bbf21555SRichard Lowe.Xr eeprom 8
740b5e2468SToomas Soomecommand.
750b5e2468SToomas Soome.It Ar /boot/defaults/loader.conf
760b5e2468SToomas SoomeLoader defaults provided by the operating system.
770b5e2468SToomas Soome.It Ar /boot/loader.conf
7872d3dbb9SYuri PankovSystem specific loader configuration.
7972d3dbb9SYuri PankovMay be provided by the operating system.
800b5e2468SToomas Soome.It Ar /boot/loader.conf.local
810b5e2468SToomas SoomeUser editable loader configuration.
820b5e2468SToomas Soome.It Ar /boot/conf.d/*
8372d3dbb9SYuri PankovUser editable loader configuration snippets.
84c5bab702SPeter TribbleThe files are processed in lexicographical order.
8572d3dbb9SYuri PankovThe configuration snippets mechanism is not available in case of TFTP boot as
8672d3dbb9SYuri PankovTFTP does not provide the directory list.
870b5e2468SToomas Soome.It Ar /boot/transient.conf
8872d3dbb9SYuri PankovConfiguration file for transient boot.
8972d3dbb9SYuri PankovThis file is created by the
90*bbf21555SRichard Lowe.Xr reboot 8
910b5e2468SToomas Soomecommand and is automatically removed when system is reaching the multi-user
920b5e2468SToomas Soomerun level.
930b5e2468SToomas Soome.El
940b5e2468SToomas Soome.Pp
950b5e2468SToomas SoomeThe configuration is processed in the order listed above.
960b5e2468SToomas Soome.Ss SYNTAX
97199767f8SToomas SoomeThe general parsing rules are:
98199767f8SToomas Soome.Bl -bullet
99199767f8SToomas Soome.It
100199767f8SToomas SoomeSpaces and empty lines are ignored.
101199767f8SToomas Soome.It
102199767f8SToomas SoomeA # sign will mark the remainder of the line as a comment.
103199767f8SToomas Soome.It
104199767f8SToomas SoomeOnly one setting can be present on each line.
105199767f8SToomas Soome.El
106199767f8SToomas Soome.Pp
107199767f8SToomas SoomeAll settings have the following format:
108199767f8SToomas Soome.Pp
109199767f8SToomas Soome.Dl variable="value"
110199767f8SToomas Soome.Pp
111199767f8SToomas SoomeUnless it belongs to one of the classes of settings that receive special
112199767f8SToomas Soometreatment, a setting will set the value of a
113*bbf21555SRichard Lowe.Xr loader 7
114199767f8SToomas Soomeenvironment variable.
115199767f8SToomas SoomeThe settings that receive special
116199767f8SToomas Soometreatment are listed below.
117199767f8SToomas SoomeSettings beginning with
118199767f8SToomas Soome.Qq *
119199767f8SToomas Soomebelow define the modules to be loaded and
120199767f8SToomas Soomemay have any prefix; the prefix identifies a module.
121199767f8SToomas SoomeAll such settings sharing a common
122199767f8SToomas Soomeprefix refer to the same module.
123199767f8SToomas Soome.Bl -tag -width Ar
124199767f8SToomas Soome.It Ar exec
125199767f8SToomas SoomeImmediately executes a
126*bbf21555SRichard Lowe.Xr loader 7
127199767f8SToomas Soomecommand.
128199767f8SToomas SoomeThis type of setting cannot be processed by programs other
129199767f8SToomas Soomethan
130*bbf21555SRichard Lowe.Xr loader 7 ,
131199767f8SToomas Soomeso its use should be avoided.
132199767f8SToomas SoomeMultiple instances of it will be processed
133199767f8SToomas Soomeindependently.
134199767f8SToomas Soome.It Ar loader_conf_files
135199767f8SToomas SoomeDefines additional configuration files to be processed right after the
136199767f8SToomas Soomepresent file.
137199767f8SToomas Soome.It Ar kernel
138199767f8SToomas SoomeName of the kernel to be loaded.
139199767f8SToomas SoomeIf no kernel name is set, no additional
140199767f8SToomas Soomemodules will be loaded.
1410b5e2468SToomas Soome.It Ar boot-args
142199767f8SToomas SoomeFlags to be passed to the kernel.
143199767f8SToomas Soome.It Ar password
144199767f8SToomas SoomeProtect boot menu with a password without interrupting
145199767f8SToomas Soome.Ic autoboot
146199767f8SToomas Soomeprocess.
147199767f8SToomas SoomeThe password should be in clear text format.
148199767f8SToomas SoomeIf a password is set, boot menu will not appear until any key is pressed during
149199767f8SToomas Soomecountdown period specified by
150199767f8SToomas Soome.Va autoboot_delay
151199767f8SToomas Soomevariable or
152199767f8SToomas Soome.Ic autoboot
153199767f8SToomas Soomeprocess fails.
154199767f8SToomas SoomeIn both cases user should provide specified password to be able to access boot
155199767f8SToomas Soomemenu.
156199767f8SToomas Soome.It Ar bootlock_password
157199767f8SToomas SoomeProvides a password to be required by check-password before execution is
158199767f8SToomas Soomeallowed to continue.
159199767f8SToomas SoomeThe password should be in clear text format.
160199767f8SToomas SoomeIf a password is set, the user must provide specified password to boot.
161199767f8SToomas Soome.It Ar verbose_loading
162199767f8SToomas SoomeIf set to
163199767f8SToomas Soome.Dq YES ,
164199767f8SToomas Soomemodule names will be displayed as they are loaded.
165199767f8SToomas Soome.It Ar *_load
166199767f8SToomas SoomeIf set to
167199767f8SToomas Soome.Dq YES ,
168199767f8SToomas Soomethat module will be loaded.
169199767f8SToomas SoomeIf no name is defined (see below), the
170199767f8SToomas Soomemodule's name is taken to be the same as the prefix.
171199767f8SToomas Soome.It Ar *_name
172199767f8SToomas SoomeDefines the name of the module.
173199767f8SToomas Soome.It Ar *_type
174199767f8SToomas SoomeDefines the module's type.
175199767f8SToomas SoomeIf none is given, it defaults to a kld module.
176199767f8SToomas Soome.It Ar *_flags
177199767f8SToomas SoomeFlags and parameters to be passed to the module.
178199767f8SToomas Soome.It Ar *_before
179199767f8SToomas SoomeCommands to be executed before the module is loaded.
180199767f8SToomas SoomeUse of this setting
181199767f8SToomas Soomeshould be avoided.
182199767f8SToomas Soome.It Ar *_after
183199767f8SToomas SoomeCommands to be executed after the module is loaded.
184199767f8SToomas SoomeUse of this setting
185199767f8SToomas Soomeshould be avoided.
186199767f8SToomas Soome.It Ar *_error
187199767f8SToomas SoomeCommands to be executed if the loading of a module fails.
188199767f8SToomas SoomeExcept for the
189199767f8SToomas Soomespecial value
190199767f8SToomas Soome.Dq abort ,
191199767f8SToomas Soomewhich aborts the bootstrap process, use of this setting should be avoided.
192199767f8SToomas Soome.El
1930b5e2468SToomas Soome.Ss DEFAULT SETTINGS
194199767f8SToomas SoomeMost of
195199767f8SToomas Soome.Nm Ns 's
196199767f8SToomas Soomedefault settings can be ignored.
197199767f8SToomas SoomeThe few of them which are important
198199767f8SToomas Soomeor useful are:
199199767f8SToomas Soome.Bl -tag -width bootfile -offset indent
200199767f8SToomas Soome.It Va console
2010b5e2468SToomas Soome.Pq Dq text
2020b5e2468SToomas Soome.Dq ttya
2030b5e2468SToomas Soome-
2040b5e2468SToomas Soome.Dq ttyd
205199767f8SToomas Soomeselects serial console,
2060b5e2468SToomas Soome.Dq text
207199767f8SToomas Soomeselects the video console,
208199767f8SToomas Soome.Dq nullconsole
209199767f8SToomas Soomeselects a mute console
210199767f8SToomas Soome(useful for systems with neither a video console nor a serial port), and
211199767f8SToomas Soome.Dq spinconsole
212199767f8SToomas Soomeselects the video console which prevents any input and hides all output
213199767f8SToomas Soomereplacing it with
214199767f8SToomas Soome.Dq spinning
215199767f8SToomas Soomecharacter (useful for embedded products and such).
216199767f8SToomas Soome.It Va kernel
2170b5e2468SToomas Soome.Pq Dq i86pc/kernel/${ISADIR}
2180b5e2468SToomas Soome.Ar /platform
2190b5e2468SToomas Soomesub-directory containing kernel
220199767f8SToomas Soome.It Va loader_conf_files
221199767f8SToomas Soome.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
222199767f8SToomas Soome.It Va beastie_disable
223199767f8SToomas SoomeIf set to
224199767f8SToomas Soome.Dq YES ,
225199767f8SToomas Soomethe beastie boot menu will be skipped.
226199767f8SToomas SoomeThe beastie boot menu is always skipped if running non-x86 hardware.
2270b5e2468SToomas Soome.It Va loader_logo Pq Dq Li illumos
228199767f8SToomas SoomeSelects a desired logo in the beastie boot menu.
2290b5e2468SToomas SoomePossible values depend on distribution;
2300b5e2468SToomas Soome.Dq Li none
2310b5e2468SToomas Soomewill disable the logo.
232199767f8SToomas Soome.It Va loader_color
233199767f8SToomas SoomeIf set to
234199767f8SToomas Soome.Dq NO ,
235199767f8SToomas Soomethe beastie boot menu will be displayed without ANSI coloring.
236199767f8SToomas Soome.El
237199767f8SToomas Soome.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
2420b5e2468SToomas Soome.Sh NOTES
243199767f8SToomas SoomeThe
244*bbf21555SRichard Lowe.Xr loader 7
245199767f8SToomas Soomestops reading
246199767f8SToomas Soome.Nm
247199767f8SToomas Soomewhen it encounters a syntax error, so any options which are vital for
2480b5e2468SToomas Soomebooting a particular system should precede any experimental additions to
249199767f8SToomas Soome.Nm .
250