Initial import from FreeBSD RELENG_4:
[dragonfly.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: src/sys/boot/forth/loader.4th.8,v 1.5.2.6 2002/07/07 14:32:16 schweikh Exp $
26 .\"
27 .Dd April 25, 1999
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. The default
39 .Pa /boot/loader.rc
40 includes
41 .Nm
42 and uses one of its commands to automatically read and process
43 the standard
44 .Xr loader.conf 5
45 files. Other commands exists to help the user specify alternate
46 configurations.
47 .Pp
48 The commands of
49 .Nm
50 by themselves are not enough for most uses. Please refer to the
51 examples below for the most common situations, and to
52 .Xr loader 8
53 for additional commands.
54 .Pp
55 Before using any of the commands provided in
56 .Nm ,
57 it must be included
58 through the command:
59 .Pp
60 .Dl include loader.4th
61 .Pp
62 This line is present in the default
63 .Pa /boot/loader.rc
64 file, so it isn't needed (and should not be re-issued) in a normal setup.
65 .Pp
66 The commands provided by it are:
67 .Bl -tag -width disable-module_module -offset indent
68 .It Ic boot-conf
69 Boot as specified by the
70 .Xr loader.conf 5
71 files read.
72 It uses
73 .Ic autoboot ,
74 so it can be stopped.
75 .Pp
76 .It Ic start
77 Reads
78 .Pa /boot/defaults/loader.conf ,
79 all other
80 .Xr loader.conf 5
81 files specified in it, and then proceeds to boot as specified in them. This
82 is the command used in the default
83 .Pa /boot/loader.rc
84 file, and it uses the
85 .Pa autoboot
86 command (see
87 .Xr loader 8 ) ,
88 so it can be stopped for further interaction with
89 .Xr loader 8 .
90 .Pp
91 .It Ic initialize
92 Initialize the supporting library so commands can be used without
93 executing
94 .Ic start
95 first. Like
96 .Ic start ,
97 reads
98 .Pa /boot/defaults/loader.conf
99 and all other
100 .Xr loader.conf 5
101 files specified in it. Returns a flag on the stack to indicate
102 if any configuration file was successfully loaded.
103 .Pp
104 .It Ic read-conf Ar filename
105 Reads and processes a
106 .Xr loader.conf 5
107 file. Does not proceed to boot.
108 .Pp
109 .It Ic enable-module Ar module
110 Enables the loading of
111 .Ar module .
112 .Pp
113 .It Ic disable-module Ar module
114 Disables the loading of
115 .Ar module .
116 .Pp
117 .It Ic toggle-module Ar module
118 Toggles the loading of
119 .Ar module
120 on and off.
121 .Pp
122 .It Ic show-module Ar module
123 Shows the information gathered in the
124 .Xr loader.conf 5
125 files about the module
126 .Ar module .
127 .Pp
128 .It Ic retry
129 Used inside
130 .Xr loader.conf 5
131 files to specify the action after a module loading fails.
132 .Pp
133 .It Ic ignore
134 Used inside
135 .Xr loader.conf 5
136 files to specify the action after a module loading fails.
137 .El
138 .Sh FILES
139 .Bl -tag -width /boot/loader.4th -compact
140 .It Pa /boot/loader
141 The
142 .Xr loader 8 .
143 .It Pa /boot/loader.4th
144 .Nm
145 itself.
146 .It Pa /boot/loader.rc
147 .Xr loader 8
148 bootstrapping script.
149 .It Pa /boot/defaults/loader.conf
150 File loaded by the
151 .Ic start
152 command.
153 .El
154 .Sh EXAMPLES
155 Standard
156 .Pa /boot/loader.rc :
157 .Pp
158 .Bd -literal -offset indent -compact
159 include /boot/loader.4th
160 start
161 .Ed
162 .Pp
163 Load a different kernel with the standard configuration:
164 .Pp
165 .Bd -literal -offset indent -compact
166 set kernel="kernel.old"
167 unload
168 boot-conf
169 .Ed
170 .Pp
171 Read an additional configuration file and then proceed to boot:
172 .Pp
173 .Bd -literal -offset indent -compact
174 unload
175 read-conf /boot/special.conf
176 boot-conf
177 .Ed
178 .Pp
179 Disable the loading of the splash screen module and bitmap and then
180 proceed to boot:
181 .Pp
182 .Bd -literal -offset indent -compact
183 unload
184 disable-module splash_bmp
185 disable-module bitmap
186 boot-conf
187 .Ed
188 .Sh SEE ALSO
189 .Xr loader.conf 5 ,
190 .Xr loader 8
191 .Sh HISTORY
192 .Nm
193 first appeared in
194 .Fx 3.2 .
195 .Sh AUTHORS
196 .Nm
197 was written by
198 .An Daniel C. Sobral Aq dcs@FreeBSD.org .
199 .Sh BUGS
200 A British espionage series.