]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - sys/boot/forth/loader.4th.8
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / sys / boot / forth / loader.4th.8
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 .\" $FreeBSD$
26 .\"
27 .Dd November 13, 2013
28 .Dt LOADER.4TH 8
29 .Os
30 .Sh NAME
31 .Nm loader.4th
32 .Nd loader.conf processing tools
33 .Sh DESCRIPTION
34 The file that goes by the name of
35 .Nm
36 is a set of commands designed to manipulate
37 .Xr loader.conf 5
38 files.
39 The default
40 .Pa /boot/loader.rc
41 includes
42 .Nm
43 and uses one of its commands to automatically read and process
44 the standard
45 .Xr loader.conf 5
46 files.
47 Other commands exists to help the user specify alternate
48 configurations.
49 .Pp
50 The commands of
51 .Nm
52 by themselves are not enough for most uses.
53 Please refer to the
54 examples below for the most common situations, and to
55 .Xr loader 8
56 for additional commands.
57 .Pp
58 Before using any of the commands provided in
59 .Nm ,
60 it must be included
61 through the command:
62 .Pp
63 .Dl include loader.4th
64 .Pp
65 This line is present in the default
66 .Pa /boot/loader.rc
67 file, so it is not needed (and should not be re-issued) in a normal setup.
68 .Pp
69 The commands provided by it are:
70 .Bl -tag -width disable-module_module -compact -offset indent
71 .It Ic boot
72 .It Ic boot Ar kernelname Op Cm ...
73 .It Ic boot Ar directory Op Cm ...
74 .It Ic boot Fl flag Cm ...
75 Boot as specified by the
76 .Xr loader.conf 5
77 files read.
78 .Pp
79 Depending on the arguments passed, it can override boot flags and
80 either the kernel name or the search path for kernel and modules.
81 .Pp
82 .It Ic boot-conf
83 .It Ic boot-conf Ar kernelname Op Cm ...
84 .It Ic boot-conf Ar directory Op Cm ...
85 .It Ic boot-conf Fl flag Cm ...
86 Works like
87 .Ic boot
88 described above, but instead of booting immediately, uses
89 .Ic autoboot ,
90 so it can be stopped.
91 .Pp
92 .It Ic start
93 Reads
94 .Pa /boot/defaults/loader.conf ,
95 all other
96 .Xr loader.conf 5
97 files specified in it, then loads the desired kernel and modules
98 .Pq if not already loaded .
99 After which you can use the
100 .Ic boot
101 or
102 .Ic autoboot
103 commmands or simply exit (provided
104 .Va autoboot_delay
105 is not set to NO) to boot the system.
106 .Ic start
107 is the command used in the default
108 .Pa /boot/loader.rc
109 file
110 .Pq see Xr loader 8 .
111 .Pp
112 .It Ic initialize
113 Initialize the support library so commands can be used without executing
114 .Ic start
115 first.
116 Like
117 .Ic start ,
118 it reads
119 .Pa /boot/defaults/loader.conf
120 and all other
121 .Xr loader.conf 5
122 files specified in it
123 .Pq but does not load kernel or modules .
124 Returns a flag on the stack to indicate
125 if any configuration files were successfully loaded.
126 .Pp
127 .It Ic read-conf Ar filename
128 Reads and processes a
129 .Xr loader.conf 5
130 file.
131 Does not proceed to boot.
132 .Pp
133 .It Ic enable-module Ar module
134 Enables the loading of
135 .Ar module .
136 .Pp
137 .It Ic disable-module Ar module
138 Disables the loading of
139 .Ar module .
140 .Pp
141 .It Ic toggle-module Ar module
142 Toggles the loading of
143 .Ar module
144 on and off.
145 .Pp
146 .It Ic show-module Ar module
147 Shows the information gathered in the
148 .Xr loader.conf 5
149 files about the module
150 .Ar module .
151 .Pp
152 .It Ic retry
153 Used inside
154 .Xr loader.conf 5
155 files to specify the action after a module loading fails.
156 .Pp
157 .It Ic ignore
158 Used inside
159 .Xr loader.conf 5
160 files to specify the action after a module loading fails.
161 .It Ic try-include Ar file Op Ar
162 Process script files if they exist.
163 Each file, in turn, is completely read into memory,
164 and then each of its lines is passed to the command line interpreter.
165 If any error is returned by the interpreter, the try-include
166 command aborts immediately, without reading any other files, and
167 silently returns without error.
168 .El
169 .Sh FILES
170 .Bl -tag -width /boot/loader.4th -compact
171 .It Pa /boot/loader
172 The
173 .Xr loader 8 .
174 .It Pa /boot/loader.4th
175 .Nm
176 itself.
177 .It Pa /boot/loader.rc
178 .Xr loader 8
179 bootstrapping script.
180 .It Pa /boot/defaults/loader.conf
181 File loaded by the
182 .Ic start
183 command.
184 .El
185 .Sh EXAMPLES
186 Standard
187 .Pa /boot/loader.rc :
188 .Pp
189 .Bd -literal -offset indent -compact
190 include /boot/loader.4th
191 start
192 .Ed
193 .Pp
194 Load a different kernel with the standard configuration:
195 .Pp
196 .Bd -literal -offset indent -compact
197 set kernel="kernel.old"
198 unload
199 boot-conf
200 .Ed
201 .Pp
202 Read an additional configuration file and then proceed to boot:
203 .Pp
204 .Bd -literal -offset indent -compact
205 unload
206 read-conf /boot/special.conf
207 boot-conf
208 .Ed
209 .Pp
210 Disable the loading of the splash screen module and bitmap and then
211 proceed to boot:
212 .Pp
213 .Bd -literal -offset indent -compact
214 unload
215 disable-module splash_bmp
216 disable-module bitmap
217 boot-conf
218 .Ed
219 .Sh SEE ALSO
220 .Xr loader.conf 5 ,
221 .Xr loader 8
222 .Sh HISTORY
223 The
224 .Nm
225 set of commands first appeared in
226 .Fx 3.2 .
227 .Sh AUTHORS
228 The
229 .Nm
230 set of commands was written by
231 .An Daniel C. Sobral Aq dcs@FreeBSD.org .
232 .Sh BUGS
233 A British espionage series.