xref: /titanic_51/usr/src/man/man5/loader.4th.5 (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 22, 2017
26*ba11c5b5SToomas Soome.Dt LOADER.4TH 5
27*ba11c5b5SToomas Soome.Os
28*ba11c5b5SToomas Soome.Sh NAME
29*ba11c5b5SToomas Soome.Nm loader.4th
30*ba11c5b5SToomas Soome.Nd loader.conf processing tools
31*ba11c5b5SToomas Soome.Sh DESCRIPTION
32*ba11c5b5SToomas SoomeThe file that goes by the name of
33*ba11c5b5SToomas Soome.Nm
34*ba11c5b5SToomas Soomeis a set of commands designed to manipulate
35*ba11c5b5SToomas Soome.Xr loader.conf 4
36*ba11c5b5SToomas Soomefiles.
37*ba11c5b5SToomas SoomeThe default
38*ba11c5b5SToomas Soome.Pa /boot/loader.rc
39*ba11c5b5SToomas Soomeincludes
40*ba11c5b5SToomas Soome.Nm
41*ba11c5b5SToomas Soomeand uses one of its commands to automatically read and process
42*ba11c5b5SToomas Soomethe standard
43*ba11c5b5SToomas Soome.Xr loader.conf 4
44*ba11c5b5SToomas Soomefiles.
45*ba11c5b5SToomas SoomeOther commands exists to help the user specify alternate
46*ba11c5b5SToomas Soomeconfigurations.
47*ba11c5b5SToomas Soome.Pp
48*ba11c5b5SToomas SoomeThe commands of
49*ba11c5b5SToomas Soome.Nm
50*ba11c5b5SToomas Soomeby themselves are not enough for most uses.
51*ba11c5b5SToomas SoomePlease refer to the
52*ba11c5b5SToomas Soomeexamples below for the most common situations, and to
53*ba11c5b5SToomas Soome.Xr loader 5
54*ba11c5b5SToomas Soomefor additional commands.
55*ba11c5b5SToomas Soome.Pp
56*ba11c5b5SToomas SoomeBefore using any of the commands provided in
57*ba11c5b5SToomas Soome.Nm ,
58*ba11c5b5SToomas Soomeit must be included
59*ba11c5b5SToomas Soomethrough the command:
60*ba11c5b5SToomas Soome.Pp
61*ba11c5b5SToomas Soome.Dl include loader.4th
62*ba11c5b5SToomas Soome.Pp
63*ba11c5b5SToomas SoomeThis line is present in the default
64*ba11c5b5SToomas Soome.Pa /boot/loader.rc
65*ba11c5b5SToomas Soomefile, so it is not needed (and should not be re-issued) in a normal setup.
66*ba11c5b5SToomas Soome.Pp
67*ba11c5b5SToomas SoomeThe commands provided by it are:
68*ba11c5b5SToomas Soome.Bl -tag -width disable-module_module -compact -offset indent
69*ba11c5b5SToomas Soome.It Ic boot
70*ba11c5b5SToomas Soome.It Ic boot Ar kernelname Op Cm ...
71*ba11c5b5SToomas Soome.It Ic boot Ar directory Op Cm ...
72*ba11c5b5SToomas Soome.It Ic boot Fl flag Cm ...
73*ba11c5b5SToomas SoomeBoot as specified by the
74*ba11c5b5SToomas Soome.Xr loader.conf 4
75*ba11c5b5SToomas Soomefiles read.
76*ba11c5b5SToomas Soome.Pp
77*ba11c5b5SToomas SoomeDepending on the arguments passed, it can override boot flags and
78*ba11c5b5SToomas Soomeeither the kernel name or the search path for kernel and modules.
79*ba11c5b5SToomas Soome.Pp
80*ba11c5b5SToomas Soome.It Ic boot-conf
81*ba11c5b5SToomas Soome.It Ic boot-conf Ar kernelname Op Cm ...
82*ba11c5b5SToomas Soome.It Ic boot-conf Ar directory Op Cm ...
83*ba11c5b5SToomas Soome.It Ic boot-conf Fl flag Cm ...
84*ba11c5b5SToomas SoomeWorks like
85*ba11c5b5SToomas Soome.Ic boot
86*ba11c5b5SToomas Soomedescribed above, but instead of booting immediately, uses
87*ba11c5b5SToomas Soome.Ic autoboot ,
88*ba11c5b5SToomas Soomeso it can be stopped.
89*ba11c5b5SToomas Soome.Pp
90*ba11c5b5SToomas Soome.It Ic start
91*ba11c5b5SToomas SoomeReads
92*ba11c5b5SToomas Soome.Pa /boot/defaults/loader.conf ,
93*ba11c5b5SToomas Soomeall other
94*ba11c5b5SToomas Soome.Xr loader.conf 4
95*ba11c5b5SToomas Soomefiles specified in it, then loads the desired kernel and modules
96*ba11c5b5SToomas Soome.Pq if not already loaded .
97*ba11c5b5SToomas SoomeAfter which you can use the
98*ba11c5b5SToomas Soome.Ic boot
99*ba11c5b5SToomas Soomeor
100*ba11c5b5SToomas Soome.Ic autoboot
101*ba11c5b5SToomas Soomecommmands or simply exit (provided
102*ba11c5b5SToomas Soome.Va autoboot_delay
103*ba11c5b5SToomas Soomeis not set to NO) to boot the system.
104*ba11c5b5SToomas Soome.Ic start
105*ba11c5b5SToomas Soomeis the command used in the default
106*ba11c5b5SToomas Soome.Pa /boot/loader.rc
107*ba11c5b5SToomas Soomefile
108*ba11c5b5SToomas Soome.Pq see Xr loader 5 .
109*ba11c5b5SToomas Soome.Pp
110*ba11c5b5SToomas Soome.It Ic initialize
111*ba11c5b5SToomas SoomeInitialize the support library so commands can be used without executing
112*ba11c5b5SToomas Soome.Ic start
113*ba11c5b5SToomas Soomefirst.
114*ba11c5b5SToomas SoomeLike
115*ba11c5b5SToomas Soome.Ic start ,
116*ba11c5b5SToomas Soomeit reads
117*ba11c5b5SToomas Soome.Pa /boot/defaults/loader.conf
118*ba11c5b5SToomas Soomeand all other
119*ba11c5b5SToomas Soome.Xr loader.conf 4
120*ba11c5b5SToomas Soomefiles specified in it
121*ba11c5b5SToomas Soome.Pq but does not load kernel or modules .
122*ba11c5b5SToomas SoomeReturns a flag on the stack to indicate
123*ba11c5b5SToomas Soomeif any configuration files were successfully loaded.
124*ba11c5b5SToomas Soome.Pp
125*ba11c5b5SToomas Soome.It Ic read-conf Ar filename
126*ba11c5b5SToomas SoomeReads and processes a
127*ba11c5b5SToomas Soome.Xr loader.conf 4
128*ba11c5b5SToomas Soomefile.
129*ba11c5b5SToomas SoomeDoes not proceed to boot.
130*ba11c5b5SToomas Soome.Pp
131*ba11c5b5SToomas Soome.It Ic enable-module Ar module
132*ba11c5b5SToomas SoomeEnables the loading of
133*ba11c5b5SToomas Soome.Ar module .
134*ba11c5b5SToomas Soome.Pp
135*ba11c5b5SToomas Soome.It Ic disable-module Ar module
136*ba11c5b5SToomas SoomeDisables the loading of
137*ba11c5b5SToomas Soome.Ar module .
138*ba11c5b5SToomas Soome.Pp
139*ba11c5b5SToomas Soome.It Ic toggle-module Ar module
140*ba11c5b5SToomas SoomeToggles the loading of
141*ba11c5b5SToomas Soome.Ar module
142*ba11c5b5SToomas Soomeon and off.
143*ba11c5b5SToomas Soome.Pp
144*ba11c5b5SToomas Soome.It Ic show-module Ar module
145*ba11c5b5SToomas SoomeShows the information gathered in the
146*ba11c5b5SToomas Soome.Xr loader.conf 4
147*ba11c5b5SToomas Soomefiles about the module
148*ba11c5b5SToomas Soome.Ar module .
149*ba11c5b5SToomas Soome.Pp
150*ba11c5b5SToomas Soome.It Ic show-module-options
151*ba11c5b5SToomas SoomeShows all modules defined in current
152*ba11c5b5SToomas Soome.Xr loader.conf 4
153*ba11c5b5SToomas Soomeconfiguration.
154*ba11c5b5SToomas Soome.Pp
155*ba11c5b5SToomas Soome.It Ic retry
156*ba11c5b5SToomas SoomeUsed inside
157*ba11c5b5SToomas Soome.Xr loader.conf 4
158*ba11c5b5SToomas Soomefiles to specify the action after a module loading fails.
159*ba11c5b5SToomas Soome.Pp
160*ba11c5b5SToomas Soome.It Ic ignore
161*ba11c5b5SToomas SoomeUsed inside
162*ba11c5b5SToomas Soome.Xr loader.conf 4
163*ba11c5b5SToomas Soomefiles to specify the action after a module loading fails.
164*ba11c5b5SToomas Soome.It Ic try-include Ar file Op Ar
165*ba11c5b5SToomas SoomeProcess script files if they exist.
166*ba11c5b5SToomas SoomeEach file, in turn, is completely read into memory,
167*ba11c5b5SToomas Soomeand then each of its lines is passed to the command line interpreter.
168*ba11c5b5SToomas SoomeIf any error is returned by the interpreter, the try-include
169*ba11c5b5SToomas Soomecommand aborts immediately, without reading any other files, and
170*ba11c5b5SToomas Soomesilently returns without error.
171*ba11c5b5SToomas Soome.El
172*ba11c5b5SToomas Soome.Sh FILES
173*ba11c5b5SToomas Soome.Bl -tag -width /boot/forth/loader.4th -compact
174*ba11c5b5SToomas Soome.It Pa /boot/zfsloader
175*ba11c5b5SToomas SoomeThe
176*ba11c5b5SToomas Soome.Xr zfsloader 5 .
177*ba11c5b5SToomas Soome.It Pa /boot/forth/loader.4th
178*ba11c5b5SToomas Soome.Nm
179*ba11c5b5SToomas Soomeitself.
180*ba11c5b5SToomas Soome.It Pa /boot/loader.rc
181*ba11c5b5SToomas Soome.Xr loader 5
182*ba11c5b5SToomas Soomebootstrapping script.
183*ba11c5b5SToomas Soome.It Pa /boot/defaults/loader.conf
184*ba11c5b5SToomas SoomeFile loaded by the
185*ba11c5b5SToomas Soome.Ic start
186*ba11c5b5SToomas Soomecommand.
187*ba11c5b5SToomas Soome.El
188*ba11c5b5SToomas Soome.Sh EXAMPLES
189*ba11c5b5SToomas SoomeStandard
190*ba11c5b5SToomas Soome.Pa /boot/loader.rc :
191*ba11c5b5SToomas Soome.Pp
192*ba11c5b5SToomas Soome.Bd -literal -offset indent -compact
193*ba11c5b5SToomas Soomeinclude /boot/forth/loader.4th
194*ba11c5b5SToomas Soomestart
195*ba11c5b5SToomas Soome.Ed
196*ba11c5b5SToomas Soome.Pp
197*ba11c5b5SToomas SoomeRead an additional configuration file and then proceed to boot:
198*ba11c5b5SToomas Soome.Pp
199*ba11c5b5SToomas Soome.Bd -literal -offset indent -compact
200*ba11c5b5SToomas Soomeunload
201*ba11c5b5SToomas Soomeread-conf /boot/special.conf
202*ba11c5b5SToomas Soomeboot-conf
203*ba11c5b5SToomas Soome.Ed
204*ba11c5b5SToomas Soome.Sh SEE ALSO
205*ba11c5b5SToomas Soome.Xr loader.conf 4 ,
206*ba11c5b5SToomas Soome.Xr loader 5
207