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