xref: /titanic_51/usr/src/man/man4/loader.conf.4 (revision 6298d5285e2394ba869ed330bfa7d7ef65fd7f55)
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 Apr 20, 2016
26.Dt LOADER.CONF 4
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 5 .
42.Pp
43Loader implements set of builtin commands and functions and script
44interpreter as standalone binary program. When starting, the loader will
45read 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. The local updates are advised to be added into the
66.Pa /boot/loader.rc.local
67.Pp
68The configuration variables are read from the following files:
69.Bl -tag -width Ar
70.It Ar /boot/solaris/bootenv.rc
71Managed by the
72.Xr eeprom 1M
73command.
74.It Ar /boot/defaults/loader.conf
75Loader defaults provided by the operating system.
76.It Ar /boot/loader.conf
77System specific loader configuration. May be provided by the operating system.
78.It Ar /boot/loader.conf.local
79User editable loader configuration.
80.It Ar /boot/conf.d/*
81User editable loader configuration snippets. The files are proccessed in
82lexicographical order. The configuration snippets mechanism is not
83available in case of TFTP boot as TFTP does not provide the directory list.
84.It Ar /boot/transient.conf
85Configuration file for transient boot. This file is created by the
86.Xr reboot 1M
87command and is automatically removed when system is reaching the multi-user
88run level.
89.El
90.Pp
91The configuration is processed in the order listed above.
92.Ss SYNTAX
93The general parsing rules are:
94.Bl -bullet
95.It
96Spaces and empty lines are ignored.
97.It
98A # sign will mark the remainder of the line as a comment.
99.It
100Only one setting can be present on each line.
101.El
102.Pp
103All settings have the following format:
104.Pp
105.Dl variable="value"
106.Pp
107Unless it belongs to one of the classes of settings that receive special
108treatment, a setting will set the value of a
109.Xr loader 5
110environment variable.
111The settings that receive special
112treatment are listed below.
113Settings beginning with
114.Qq *
115below define the modules to be loaded and
116may have any prefix; the prefix identifies a module.
117All such settings sharing a common
118prefix refer to the same module.
119.Bl -tag -width Ar
120.It Ar exec
121Immediately executes a
122.Xr loader 5
123command.
124This type of setting cannot be processed by programs other
125than
126.Xr loader 5 ,
127so its use should be avoided.
128Multiple instances of it will be processed
129independently.
130.It Ar loader_conf_files
131Defines additional configuration files to be processed right after the
132present file.
133.It Ar kernel
134Name of the kernel to be loaded.
135If no kernel name is set, no additional
136modules will be loaded.
137.It Ar boot-args
138Flags to be passed to the kernel.
139.It Ar password
140Protect boot menu with a password without interrupting
141.Ic autoboot
142process.
143The password should be in clear text format.
144If a password is set, boot menu will not appear until any key is pressed during
145countdown period specified by
146.Va autoboot_delay
147variable or
148.Ic autoboot
149process fails.
150In both cases user should provide specified password to be able to access boot
151menu.
152.It Ar bootlock_password
153Provides a password to be required by check-password before execution is
154allowed to continue.
155The password should be in clear text format.
156If a password is set, the user must provide specified password to boot.
157.It Ar verbose_loading
158If set to
159.Dq YES ,
160module names will be displayed as they are loaded.
161.It Ar *_load
162If set to
163.Dq YES ,
164that module will be loaded.
165If no name is defined (see below), the
166module's name is taken to be the same as the prefix.
167.It Ar *_name
168Defines the name of the module.
169.It Ar *_type
170Defines the module's type.
171If none is given, it defaults to a kld module.
172.It Ar *_flags
173Flags and parameters to be passed to the module.
174.It Ar *_before
175Commands to be executed before the module is loaded.
176Use of this setting
177should be avoided.
178.It Ar *_after
179Commands to be executed after the module is loaded.
180Use of this setting
181should be avoided.
182.It Ar *_error
183Commands to be executed if the loading of a module fails.
184Except for the
185special value
186.Dq abort ,
187which aborts the bootstrap process, use of this setting should be avoided.
188.El
189.Ss DEFAULT SETTINGS
190Most of
191.Nm Ns 's
192default settings can be ignored.
193The few of them which are important
194or useful are:
195.Bl -tag -width bootfile -offset indent
196.It Va console
197.Pq Dq text
198.Dq ttya
199-
200.Dq ttyd
201selects serial console,
202.Dq text
203selects the video console,
204.Dq nullconsole
205selects a mute console
206(useful for systems with neither a video console nor a serial port), and
207.Dq spinconsole
208selects the video console which prevents any input and hides all output
209replacing it with
210.Dq spinning
211character (useful for embedded products and such).
212.It Va kernel
213.Pq Dq i86pc/kernel/${ISADIR}
214.Ar /platform
215sub-directory containing kernel
216.It Va loader_conf_files
217.Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
218.It Va beastie_disable
219If set to
220.Dq YES ,
221the beastie boot menu will be skipped.
222The beastie boot menu is always skipped if running non-x86 hardware.
223.It Va loader_logo Pq Dq Li illumos
224Selects a desired logo in the beastie boot menu.
225Possible values depend on distribution;
226.Dq Li none
227will disable the logo.
228.It Va loader_color
229If set to
230.Dq NO ,
231the beastie boot menu will be displayed without ANSI coloring.
232.El
233.Sh SEE ALSO
234.Xr boot 1M ,
235.Xr eeprom 1M ,
236.Xr loader 5 ,
237.Xr loader.4th 5
238.Sh NOTES
239The
240.Xr loader 5
241stops reading
242.Nm
243when it encounters a syntax error, so any options which are vital for
244booting a particular system should precede any experimental additions to
245.Nm .
246