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