1 .\" Copyright (c) 1999 Daniel C. Sobral
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
30 .Nd loader.conf processing tools
32 The file that goes by the name of
34 is a set of commands designed to manipulate
41 and uses one of its commands to automatically read and process
45 Other commands exists to help the user specify alternate
50 by themselves are not enough for most uses.
52 examples below for the most common situations, and to
54 for additional commands.
56 Before using any of the commands provided in
61 .Dl include loader.4th
63 This line is present in the default
65 file, so it is not needed (and should not be re-issued) in a normal setup.
67 The commands provided by it are:
68 .Bl -tag -width disable-module_module -compact -offset indent
70 .It Ic boot Ar kernelname Op Cm ...
71 .It Ic boot Ar directory Op Cm ...
72 .It Ic boot Fl flag Cm ...
73 Boot as specified by the
77 Depending on the arguments passed, it can override boot flags and
78 either the kernel name or the search path for kernel and modules.
81 .It Ic boot-conf Ar kernelname Op Cm ...
82 .It Ic boot-conf Ar directory Op Cm ...
83 .It Ic boot-conf Fl flag Cm ...
86 described above, but instead of booting immediately, uses
92 .Pa /boot/defaults/loader.conf ,
95 files specified in it, then loads the desired kernel and modules
96 .Pq if not already loaded .
97 After which you can use the
101 commands or simply exit (provided
103 is not set to NO) to boot the system.
105 is the command used in the default
108 .Pq see Xr loader 8 .
111 Initialize the support library so commands can be used without executing
117 .Pa /boot/defaults/loader.conf
120 files specified in it
121 .Pq but does not load kernel or modules .
122 Returns a flag on the stack to indicate
123 if any configuration files were successfully loaded.
125 .It Ic read-conf Ar filename
126 Reads and processes a
129 Does not proceed to boot.
131 .It Ic enable-module Ar module
132 Enables the loading of
135 .It Ic disable-module Ar module
136 Disables the loading of
139 .It Ic toggle-module Ar module
140 Toggles the loading of
144 .It Ic show-module Ar module
145 Shows the information gathered in the
147 files about the module
153 files to specify the action after a module loading fails.
158 files to specify the action after a module loading fails.
159 .It Ic try-include Ar file Op Ar
160 Process script files if they exist.
161 Each file, in turn, is completely read into memory,
162 and then each of its lines is passed to the command line interpreter.
163 If any error is returned by the interpreter, the try-include
164 command aborts immediately, without reading any other files, and
165 silently returns without error.
168 .Bl -tag -width /boot/loader.4th -compact
172 .It Pa /boot/loader.4th
175 .It Pa /boot/loader.rc
177 bootstrapping script.
178 .It Pa /boot/defaults/loader.conf
185 .Pa /boot/loader.rc :
187 .Bd -literal -offset indent -compact
188 include /boot/loader.4th
192 Load a different kernel with the standard configuration:
194 .Bd -literal -offset indent -compact
195 set kernel="kernel.old"
200 Read an additional configuration file and then proceed to boot:
202 .Bd -literal -offset indent -compact
204 read-conf /boot/special.conf
208 Disable the loading of the splash screen module and bitmap and then
211 .Bd -literal -offset indent -compact
213 disable-module splash_bmp
214 disable-module bitmap
223 set of commands first appeared in
228 set of commands was written by
229 .An Daniel C. Sobral Aq dcs@FreeBSD.org .
231 A British espionage series.