1ca987d46SWarner Losh.\" Copyright (c) 1999 Daniel C. Sobral 2ca987d46SWarner Losh.\" All rights reserved. 3ca987d46SWarner Losh.\" 4ca987d46SWarner Losh.\" Redistribution and use in source and binary forms, with or without 5ca987d46SWarner Losh.\" modification, are permitted provided that the following conditions 6ca987d46SWarner Losh.\" are met: 7ca987d46SWarner Losh.\" 1. Redistributions of source code must retain the above copyright 8ca987d46SWarner Losh.\" notice, this list of conditions and the following disclaimer. 9ca987d46SWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright 10ca987d46SWarner Losh.\" notice, this list of conditions and the following disclaimer in the 11ca987d46SWarner Losh.\" documentation and/or other materials provided with the distribution. 12ca987d46SWarner Losh.\" 13ca987d46SWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14ca987d46SWarner Losh.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15ca987d46SWarner Losh.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16ca987d46SWarner Losh.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17ca987d46SWarner Losh.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18ca987d46SWarner Losh.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19ca987d46SWarner Losh.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20ca987d46SWarner Losh.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21ca987d46SWarner Losh.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22ca987d46SWarner Losh.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23ca987d46SWarner Losh.\" SUCH DAMAGE. 24ca987d46SWarner Losh.\" 25ca987d46SWarner Losh.\" $FreeBSD$ 26ca987d46SWarner Losh.\" 27ca987d46SWarner Losh.Dd November 13, 2013 28ca987d46SWarner Losh.Dt LOADER.4TH 8 29ca987d46SWarner Losh.Os 30ca987d46SWarner Losh.Sh NAME 31ca987d46SWarner Losh.Nm loader.4th 32ca987d46SWarner Losh.Nd loader.conf processing tools 33ca987d46SWarner Losh.Sh DESCRIPTION 34ca987d46SWarner LoshThe file that goes by the name of 35ca987d46SWarner Losh.Nm 36ca987d46SWarner Loshis a set of commands designed to manipulate 37ca987d46SWarner Losh.Xr loader.conf 5 38ca987d46SWarner Loshfiles. 39ca987d46SWarner LoshThe default 40ca987d46SWarner Losh.Pa /boot/loader.rc 41ca987d46SWarner Loshincludes 42ca987d46SWarner Losh.Nm 43ca987d46SWarner Loshand uses one of its commands to automatically read and process 44ca987d46SWarner Loshthe standard 45ca987d46SWarner Losh.Xr loader.conf 5 46ca987d46SWarner Loshfiles. 47ca987d46SWarner LoshOther commands exists to help the user specify alternate 48ca987d46SWarner Loshconfigurations. 49ca987d46SWarner Losh.Pp 50ca987d46SWarner LoshThe commands of 51ca987d46SWarner Losh.Nm 52ca987d46SWarner Loshby themselves are not enough for most uses. 53ca987d46SWarner LoshPlease refer to the 54ca987d46SWarner Loshexamples below for the most common situations, and to 55ca987d46SWarner Losh.Xr loader 8 56ca987d46SWarner Loshfor additional commands. 57ca987d46SWarner Losh.Pp 58ca987d46SWarner LoshBefore using any of the commands provided in 59ca987d46SWarner Losh.Nm , 60ca987d46SWarner Loshit must be included 61ca987d46SWarner Loshthrough the command: 62ca987d46SWarner Losh.Pp 63ca987d46SWarner Losh.Dl include loader.4th 64ca987d46SWarner Losh.Pp 65ca987d46SWarner LoshThis line is present in the default 66ca987d46SWarner Losh.Pa /boot/loader.rc 67ca987d46SWarner Loshfile, so it is not needed (and should not be re-issued) in a normal setup. 68ca987d46SWarner Losh.Pp 69ca987d46SWarner LoshThe commands provided by it are: 70ca987d46SWarner Losh.Bl -tag -width disable-module_module -compact -offset indent 71ca987d46SWarner Losh.It Ic boot 72ca987d46SWarner Losh.It Ic boot Ar kernelname Op Cm ... 73ca987d46SWarner Losh.It Ic boot Ar directory Op Cm ... 74ca987d46SWarner Losh.It Ic boot Fl flag Cm ... 75ca987d46SWarner LoshBoot as specified by the 76ca987d46SWarner Losh.Xr loader.conf 5 77ca987d46SWarner Loshfiles read. 78ca987d46SWarner Losh.Pp 79ca987d46SWarner LoshDepending on the arguments passed, it can override boot flags and 80ca987d46SWarner Losheither the kernel name or the search path for kernel and modules. 81ca987d46SWarner Losh.Pp 82ca987d46SWarner Losh.It Ic boot-conf 83ca987d46SWarner Losh.It Ic boot-conf Ar kernelname Op Cm ... 84ca987d46SWarner Losh.It Ic boot-conf Ar directory Op Cm ... 85ca987d46SWarner Losh.It Ic boot-conf Fl flag Cm ... 86ca987d46SWarner LoshWorks like 87ca987d46SWarner Losh.Ic boot 88ca987d46SWarner Loshdescribed above, but instead of booting immediately, uses 89ca987d46SWarner Losh.Ic autoboot , 90ca987d46SWarner Loshso it can be stopped. 91ca987d46SWarner Losh.Pp 92ca987d46SWarner Losh.It Ic start 93ca987d46SWarner LoshReads 94ca987d46SWarner Losh.Pa /boot/defaults/loader.conf , 95ca987d46SWarner Loshall other 96ca987d46SWarner Losh.Xr loader.conf 5 97ca987d46SWarner Loshfiles specified in it, then loads the desired kernel and modules 98ca987d46SWarner Losh.Pq if not already loaded . 99ca987d46SWarner LoshAfter which you can use the 100ca987d46SWarner Losh.Ic boot 101ca987d46SWarner Loshor 102ca987d46SWarner Losh.Ic autoboot 103*ad49d7c5SGordon Berglingcommands or simply exit (provided 104ca987d46SWarner Losh.Va autoboot_delay 105ca987d46SWarner Loshis not set to NO) to boot the system. 106ca987d46SWarner Losh.Ic start 107ca987d46SWarner Loshis the command used in the default 108ca987d46SWarner Losh.Pa /boot/loader.rc 109ca987d46SWarner Loshfile 110ca987d46SWarner Losh.Pq see Xr loader 8 . 111ca987d46SWarner Losh.Pp 112ca987d46SWarner Losh.It Ic initialize 113ca987d46SWarner LoshInitialize the support library so commands can be used without executing 114ca987d46SWarner Losh.Ic start 115ca987d46SWarner Loshfirst. 116ca987d46SWarner LoshLike 117ca987d46SWarner Losh.Ic start , 118ca987d46SWarner Loshit reads 119ca987d46SWarner Losh.Pa /boot/defaults/loader.conf 120ca987d46SWarner Loshand all other 121ca987d46SWarner Losh.Xr loader.conf 5 122ca987d46SWarner Loshfiles specified in it 123ca987d46SWarner Losh.Pq but does not load kernel or modules . 124ca987d46SWarner LoshReturns a flag on the stack to indicate 125ca987d46SWarner Loshif any configuration files were successfully loaded. 126ca987d46SWarner Losh.Pp 127ca987d46SWarner Losh.It Ic read-conf Ar filename 128ca987d46SWarner LoshReads and processes a 129ca987d46SWarner Losh.Xr loader.conf 5 130ca987d46SWarner Loshfile. 131ca987d46SWarner LoshDoes not proceed to boot. 132ca987d46SWarner Losh.Pp 133ca987d46SWarner Losh.It Ic enable-module Ar module 134ca987d46SWarner LoshEnables the loading of 135ca987d46SWarner Losh.Ar module . 136ca987d46SWarner Losh.Pp 137ca987d46SWarner Losh.It Ic disable-module Ar module 138ca987d46SWarner LoshDisables the loading of 139ca987d46SWarner Losh.Ar module . 140ca987d46SWarner Losh.Pp 141ca987d46SWarner Losh.It Ic toggle-module Ar module 142ca987d46SWarner LoshToggles the loading of 143ca987d46SWarner Losh.Ar module 144ca987d46SWarner Loshon and off. 145ca987d46SWarner Losh.Pp 146ca987d46SWarner Losh.It Ic show-module Ar module 147ca987d46SWarner LoshShows the information gathered in the 148ca987d46SWarner Losh.Xr loader.conf 5 149ca987d46SWarner Loshfiles about the module 150ca987d46SWarner Losh.Ar module . 151ca987d46SWarner Losh.Pp 152ca987d46SWarner Losh.It Ic retry 153ca987d46SWarner LoshUsed inside 154ca987d46SWarner Losh.Xr loader.conf 5 155ca987d46SWarner Loshfiles to specify the action after a module loading fails. 156ca987d46SWarner Losh.Pp 157ca987d46SWarner Losh.It Ic ignore 158ca987d46SWarner LoshUsed inside 159ca987d46SWarner Losh.Xr loader.conf 5 160ca987d46SWarner Loshfiles to specify the action after a module loading fails. 161ca987d46SWarner Losh.It Ic try-include Ar file Op Ar 162ca987d46SWarner LoshProcess script files if they exist. 163ca987d46SWarner LoshEach file, in turn, is completely read into memory, 164ca987d46SWarner Loshand then each of its lines is passed to the command line interpreter. 165ca987d46SWarner LoshIf any error is returned by the interpreter, the try-include 166ca987d46SWarner Loshcommand aborts immediately, without reading any other files, and 167ca987d46SWarner Loshsilently returns without error. 168ca987d46SWarner Losh.El 169ca987d46SWarner Losh.Sh FILES 170ca987d46SWarner Losh.Bl -tag -width /boot/loader.4th -compact 171ca987d46SWarner Losh.It Pa /boot/loader 172ca987d46SWarner LoshThe 173ca987d46SWarner Losh.Xr loader 8 . 174ca987d46SWarner Losh.It Pa /boot/loader.4th 175ca987d46SWarner Losh.Nm 176ca987d46SWarner Loshitself. 177ca987d46SWarner Losh.It Pa /boot/loader.rc 178ca987d46SWarner Losh.Xr loader 8 179ca987d46SWarner Loshbootstrapping script. 180ca987d46SWarner Losh.It Pa /boot/defaults/loader.conf 181ca987d46SWarner LoshFile loaded by the 182ca987d46SWarner Losh.Ic start 183ca987d46SWarner Loshcommand. 184ca987d46SWarner Losh.El 185ca987d46SWarner Losh.Sh EXAMPLES 186ca987d46SWarner LoshStandard 187ca987d46SWarner Losh.Pa /boot/loader.rc : 188ca987d46SWarner Losh.Pp 189ca987d46SWarner Losh.Bd -literal -offset indent -compact 190ca987d46SWarner Loshinclude /boot/loader.4th 191ca987d46SWarner Loshstart 192ca987d46SWarner Losh.Ed 193ca987d46SWarner Losh.Pp 194ca987d46SWarner LoshLoad a different kernel with the standard configuration: 195ca987d46SWarner Losh.Pp 196ca987d46SWarner Losh.Bd -literal -offset indent -compact 197ca987d46SWarner Loshset kernel="kernel.old" 198ca987d46SWarner Loshunload 199ca987d46SWarner Loshboot-conf 200ca987d46SWarner Losh.Ed 201ca987d46SWarner Losh.Pp 202ca987d46SWarner LoshRead an additional configuration file and then proceed to boot: 203ca987d46SWarner Losh.Pp 204ca987d46SWarner Losh.Bd -literal -offset indent -compact 205ca987d46SWarner Loshunload 206ca987d46SWarner Loshread-conf /boot/special.conf 207ca987d46SWarner Loshboot-conf 208ca987d46SWarner Losh.Ed 209ca987d46SWarner Losh.Pp 210ca987d46SWarner LoshDisable the loading of the splash screen module and bitmap and then 211ca987d46SWarner Loshproceed to boot: 212ca987d46SWarner Losh.Pp 213ca987d46SWarner Losh.Bd -literal -offset indent -compact 214ca987d46SWarner Loshunload 215ca987d46SWarner Loshdisable-module splash_bmp 216ca987d46SWarner Loshdisable-module bitmap 217ca987d46SWarner Loshboot-conf 218ca987d46SWarner Losh.Ed 219ca987d46SWarner Losh.Sh SEE ALSO 220ca987d46SWarner Losh.Xr loader.conf 5 , 221ca987d46SWarner Losh.Xr loader 8 222ca987d46SWarner Losh.Sh HISTORY 223ca987d46SWarner LoshThe 224ca987d46SWarner Losh.Nm 225ca987d46SWarner Loshset of commands first appeared in 226ca987d46SWarner Losh.Fx 3.2 . 227ca987d46SWarner Losh.Sh AUTHORS 228ca987d46SWarner LoshThe 229ca987d46SWarner Losh.Nm 230ca987d46SWarner Loshset of commands was written by 231ca987d46SWarner Losh.An Daniel C. Sobral Aq dcs@FreeBSD.org . 232ca987d46SWarner Losh.Sh BUGS 233ca987d46SWarner LoshA British espionage series. 234