xref: /illumos-gate/usr/src/man/man7/loader.4th.7 (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 Apr 22, 2017
26*bbf21555SRichard Lowe.Dt LOADER.4TH 7
27*bbf21555SRichard Lowe.Os
28*bbf21555SRichard Lowe.Sh NAME
29*bbf21555SRichard Lowe.Nm loader.4th
30*bbf21555SRichard Lowe.Nd loader.conf processing tools
31*bbf21555SRichard Lowe.Sh DESCRIPTION
32*bbf21555SRichard LoweThe file that goes by the name of
33*bbf21555SRichard Lowe.Nm
34*bbf21555SRichard Loweis a set of commands designed to manipulate
35*bbf21555SRichard Lowe.Xr loader.conf 5
36*bbf21555SRichard Lowefiles.
37*bbf21555SRichard LoweThe default
38*bbf21555SRichard Lowe.Pa /boot/loader.rc
39*bbf21555SRichard Loweincludes
40*bbf21555SRichard Lowe.Nm
41*bbf21555SRichard Loweand uses one of its commands to automatically read and process
42*bbf21555SRichard Lowethe standard
43*bbf21555SRichard Lowe.Xr loader.conf 5
44*bbf21555SRichard Lowefiles.
45*bbf21555SRichard LoweOther commands exists to help the user specify alternate
46*bbf21555SRichard Loweconfigurations.
47*bbf21555SRichard Lowe.Pp
48*bbf21555SRichard LoweThe commands of
49*bbf21555SRichard Lowe.Nm
50*bbf21555SRichard Loweby themselves are not enough for most uses.
51*bbf21555SRichard LowePlease refer to the
52*bbf21555SRichard Loweexamples below for the most common situations, and to
53*bbf21555SRichard Lowe.Xr loader 7
54*bbf21555SRichard Lowefor additional commands.
55*bbf21555SRichard Lowe.Pp
56*bbf21555SRichard LoweBefore using any of the commands provided in
57*bbf21555SRichard Lowe.Nm ,
58*bbf21555SRichard Loweit must be included
59*bbf21555SRichard Lowethrough the command:
60*bbf21555SRichard Lowe.Pp
61*bbf21555SRichard Lowe.Dl include loader.4th
62*bbf21555SRichard Lowe.Pp
63*bbf21555SRichard LoweThis line is present in the default
64*bbf21555SRichard Lowe.Pa /boot/loader.rc
65*bbf21555SRichard Lowefile, so it is not needed (and should not be re-issued) in a normal setup.
66*bbf21555SRichard Lowe.Pp
67*bbf21555SRichard LoweThe commands provided by it are:
68*bbf21555SRichard Lowe.Bl -tag -width disable-module_module -compact -offset indent
69*bbf21555SRichard Lowe.It Ic boot
70*bbf21555SRichard Lowe.It Ic boot Ar kernelname Op Cm ...
71*bbf21555SRichard Lowe.It Ic boot Ar directory Op Cm ...
72*bbf21555SRichard Lowe.It Ic boot Fl flag Cm ...
73*bbf21555SRichard LoweBoot as specified by the
74*bbf21555SRichard Lowe.Xr loader.conf 5
75*bbf21555SRichard Lowefiles read.
76*bbf21555SRichard Lowe.Pp
77*bbf21555SRichard LoweDepending on the arguments passed, it can override boot flags and
78*bbf21555SRichard Loweeither the kernel name or the search path for kernel and modules.
79*bbf21555SRichard Lowe.Pp
80*bbf21555SRichard Lowe.It Ic boot-conf
81*bbf21555SRichard Lowe.It Ic boot-conf Ar kernelname Op Cm ...
82*bbf21555SRichard Lowe.It Ic boot-conf Ar directory Op Cm ...
83*bbf21555SRichard Lowe.It Ic boot-conf Fl flag Cm ...
84*bbf21555SRichard LoweWorks like
85*bbf21555SRichard Lowe.Ic boot
86*bbf21555SRichard Lowedescribed above, but instead of booting immediately, uses
87*bbf21555SRichard Lowe.Ic autoboot ,
88*bbf21555SRichard Loweso it can be stopped.
89*bbf21555SRichard Lowe.Pp
90*bbf21555SRichard Lowe.It Ic start
91*bbf21555SRichard LoweReads
92*bbf21555SRichard Lowe.Pa /boot/defaults/loader.conf ,
93*bbf21555SRichard Loweall other
94*bbf21555SRichard Lowe.Xr loader.conf 5
95*bbf21555SRichard Lowefiles specified in it, then loads the desired kernel and modules
96*bbf21555SRichard Lowe.Pq if not already loaded .
97*bbf21555SRichard LoweAfter which you can use the
98*bbf21555SRichard Lowe.Ic boot
99*bbf21555SRichard Loweor
100*bbf21555SRichard Lowe.Ic autoboot
101*bbf21555SRichard Lowecommands or simply exit (provided
102*bbf21555SRichard Lowe.Va autoboot_delay
103*bbf21555SRichard Loweis not set to NO) to boot the system.
104*bbf21555SRichard Lowe.Ic start
105*bbf21555SRichard Loweis the command used in the default
106*bbf21555SRichard Lowe.Pa /boot/loader.rc
107*bbf21555SRichard Lowefile
108*bbf21555SRichard Lowe.Pq see Xr loader 7 .
109*bbf21555SRichard Lowe.Pp
110*bbf21555SRichard Lowe.It Ic initialize
111*bbf21555SRichard LoweInitialize the support library so commands can be used without executing
112*bbf21555SRichard Lowe.Ic start
113*bbf21555SRichard Lowefirst.
114*bbf21555SRichard LoweLike
115*bbf21555SRichard Lowe.Ic start ,
116*bbf21555SRichard Loweit reads
117*bbf21555SRichard Lowe.Pa /boot/defaults/loader.conf
118*bbf21555SRichard Loweand all other
119*bbf21555SRichard Lowe.Xr loader.conf 5
120*bbf21555SRichard Lowefiles specified in it
121*bbf21555SRichard Lowe.Pq but does not load kernel or modules .
122*bbf21555SRichard LoweReturns a flag on the stack to indicate
123*bbf21555SRichard Loweif any configuration files were successfully loaded.
124*bbf21555SRichard Lowe.Pp
125*bbf21555SRichard Lowe.It Ic read-conf Ar filename
126*bbf21555SRichard LoweReads and processes a
127*bbf21555SRichard Lowe.Xr loader.conf 5
128*bbf21555SRichard Lowefile.
129*bbf21555SRichard LoweDoes not proceed to boot.
130*bbf21555SRichard Lowe.Pp
131*bbf21555SRichard Lowe.It Ic enable-module Ar module
132*bbf21555SRichard LoweEnables the loading of
133*bbf21555SRichard Lowe.Ar module .
134*bbf21555SRichard Lowe.Pp
135*bbf21555SRichard Lowe.It Ic disable-module Ar module
136*bbf21555SRichard LoweDisables the loading of
137*bbf21555SRichard Lowe.Ar module .
138*bbf21555SRichard Lowe.Pp
139*bbf21555SRichard Lowe.It Ic toggle-module Ar module
140*bbf21555SRichard LoweToggles the loading of
141*bbf21555SRichard Lowe.Ar module
142*bbf21555SRichard Loweon and off.
143*bbf21555SRichard Lowe.Pp
144*bbf21555SRichard Lowe.It Ic show-module Ar module
145*bbf21555SRichard LoweShows the information gathered in the
146*bbf21555SRichard Lowe.Xr loader.conf 5
147*bbf21555SRichard Lowefiles about the module
148*bbf21555SRichard Lowe.Ar module .
149*bbf21555SRichard Lowe.Pp
150*bbf21555SRichard Lowe.It Ic show-module-options
151*bbf21555SRichard LoweShows all modules defined in current
152*bbf21555SRichard Lowe.Xr loader.conf 5
153*bbf21555SRichard Loweconfiguration.
154*bbf21555SRichard Lowe.Pp
155*bbf21555SRichard Lowe.It Ic retry
156*bbf21555SRichard LoweUsed inside
157*bbf21555SRichard Lowe.Xr loader.conf 5
158*bbf21555SRichard Lowefiles to specify the action after a module loading fails.
159*bbf21555SRichard Lowe.Pp
160*bbf21555SRichard Lowe.It Ic ignore
161*bbf21555SRichard LoweUsed inside
162*bbf21555SRichard Lowe.Xr loader.conf 5
163*bbf21555SRichard Lowefiles to specify the action after a module loading fails.
164*bbf21555SRichard Lowe.It Ic try-include Ar file Op Ar
165*bbf21555SRichard LoweProcess script files if they exist.
166*bbf21555SRichard LoweEach file, in turn, is completely read into memory,
167*bbf21555SRichard Loweand then each of its lines is passed to the command line interpreter.
168*bbf21555SRichard LoweIf any error is returned by the interpreter, the try-include
169*bbf21555SRichard Lowecommand aborts immediately, without reading any other files, and
170*bbf21555SRichard Lowesilently returns without error.
171*bbf21555SRichard Lowe.El
172*bbf21555SRichard Lowe.Sh FILES
173*bbf21555SRichard Lowe.Bl -tag -width /boot/forth/loader.4th -compact
174*bbf21555SRichard Lowe.It Pa /boot/loader
175*bbf21555SRichard LoweThe
176*bbf21555SRichard Lowe.Xr loader 7 .
177*bbf21555SRichard Lowe.It Pa /boot/forth/loader.4th
178*bbf21555SRichard Lowe.Nm
179*bbf21555SRichard Loweitself.
180*bbf21555SRichard Lowe.It Pa /boot/loader.rc
181*bbf21555SRichard Lowe.Xr loader 7
182*bbf21555SRichard Lowebootstrapping script.
183*bbf21555SRichard Lowe.It Pa /boot/defaults/loader.conf
184*bbf21555SRichard LoweFile loaded by the
185*bbf21555SRichard Lowe.Ic start
186*bbf21555SRichard Lowecommand.
187*bbf21555SRichard Lowe.El
188*bbf21555SRichard Lowe.Sh EXAMPLES
189*bbf21555SRichard LoweStandard
190*bbf21555SRichard Lowe.Pa /boot/loader.rc :
191*bbf21555SRichard Lowe.Pp
192*bbf21555SRichard Lowe.Bd -literal -offset indent -compact
193*bbf21555SRichard Loweinclude /boot/forth/loader.4th
194*bbf21555SRichard Lowestart
195*bbf21555SRichard Lowe.Ed
196*bbf21555SRichard Lowe.Pp
197*bbf21555SRichard LoweRead an additional configuration file and then proceed to boot:
198*bbf21555SRichard Lowe.Pp
199*bbf21555SRichard Lowe.Bd -literal -offset indent -compact
200*bbf21555SRichard Loweunload
201*bbf21555SRichard Loweread-conf /boot/special.conf
202*bbf21555SRichard Loweboot-conf
203*bbf21555SRichard Lowe.Ed
204*bbf21555SRichard Lowe.Sh SEE ALSO
205*bbf21555SRichard Lowe.Xr loader.conf 5 ,
206*bbf21555SRichard Lowe.Xr loader 7
207