1332f0f1dSSascha Wildner.\" Copyright (c) 1999 Daniel C. Sobral 2332f0f1dSSascha Wildner.\" All rights reserved. 3332f0f1dSSascha Wildner.\" 4332f0f1dSSascha Wildner.\" Redistribution and use in source and binary forms, with or without 5332f0f1dSSascha Wildner.\" modification, are permitted provided that the following conditions 6332f0f1dSSascha Wildner.\" are met: 7332f0f1dSSascha Wildner.\" 1. Redistributions of source code must retain the above copyright 8332f0f1dSSascha Wildner.\" notice, this list of conditions and the following disclaimer. 9332f0f1dSSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright 10332f0f1dSSascha Wildner.\" notice, this list of conditions and the following disclaimer in the 11332f0f1dSSascha Wildner.\" documentation and/or other materials provided with the distribution. 12332f0f1dSSascha Wildner.\" 13332f0f1dSSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14332f0f1dSSascha Wildner.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15332f0f1dSSascha Wildner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16332f0f1dSSascha Wildner.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17332f0f1dSSascha Wildner.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18332f0f1dSSascha Wildner.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19332f0f1dSSascha Wildner.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20332f0f1dSSascha Wildner.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21332f0f1dSSascha Wildner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22332f0f1dSSascha Wildner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23332f0f1dSSascha Wildner.\" SUCH DAMAGE. 24332f0f1dSSascha Wildner.\" 25332f0f1dSSascha Wildner.\" $FreeBSD: src/sys/boot/forth/loader.conf.5,v 1.18 2002/08/27 01:02:56 trhodes Exp $ 26b5ef8da1SThomas Nikolajsen.Dd October 6, 2010 27332f0f1dSSascha Wildner.Dt LOADER.CONF 5 28332f0f1dSSascha Wildner.Os 29332f0f1dSSascha Wildner.Sh NAME 30332f0f1dSSascha Wildner.Nm loader.conf 31332f0f1dSSascha Wildner.Nd system bootstrap configuration information 32332f0f1dSSascha Wildner.Sh DESCRIPTION 33332f0f1dSSascha WildnerThe file 34332f0f1dSSascha Wildner.Nm 35332f0f1dSSascha Wildnercontains descriptive information on bootstrapping the system. 36b5ef8da1SThomas NikolajsenThrough it you can specify the kernel to be booted, 37b5ef8da1SThomas Nikolajsenparameters to be passed to it, 38b5ef8da1SThomas Nikolajsenand additional kernel modules to be loaded; 39b5ef8da1SThomas Nikolajsenand generally set all variables described in 40332f0f1dSSascha Wildner.Xr loader 8 . 41332f0f1dSSascha Wildner.Pp 42332f0f1dSSascha WildnerA file 43b5ef8da1SThomas Nikolajsen.Pa dloader.rc 44b5ef8da1SThomas Nikolajsenmust contain the following lines for 45332f0f1dSSascha Wildner.Nm 46332f0f1dSSascha Wildnerto be automatically processed: 47332f0f1dSSascha Wildner.Pp 48b5ef8da1SThomas Nikolajsen.Dl include defaults/loader.conf 49b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf 50b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf.local 51332f0f1dSSascha Wildner.Pp 52332f0f1dSSascha WildnerIf no 53b5ef8da1SThomas Nikolajsen.Pa /boot/dloader.rc 54332f0f1dSSascha Wildnerexists at installworld time, one with the above lines will be installed. 55332f0f1dSSascha Wildner.Sh SYNTAX 56332f0f1dSSascha WildnerThough 57332f0f1dSSascha Wildner.Nm Ns 's 58332f0f1dSSascha Wildnerformat was defined explicitly to resemble 59332f0f1dSSascha Wildner.Xr rc.conf 5 , 60332f0f1dSSascha Wildnerand can be sourced by 61332f0f1dSSascha Wildner.Xr sh 1 , 62332f0f1dSSascha Wildnersome settings are treated in a special fashion. 63b5ef8da1SThomas NikolajsenAlso, the behavior of some settings is defined by the setting's suffix; 64332f0f1dSSascha Wildnerthe prefix identifies which module the setting controls. 65332f0f1dSSascha Wildner.Pp 66332f0f1dSSascha WildnerThe general parsing rules are: 67332f0f1dSSascha Wildner.Bl -bullet 68332f0f1dSSascha Wildner.It 69332f0f1dSSascha WildnerSpaces and empty lines are ignored. 70332f0f1dSSascha Wildner.It 71332f0f1dSSascha WildnerA 72332f0f1dSSascha Wildner.Ql # 73332f0f1dSSascha Wildnersign will mark the remainder of the line as a comment. 74332f0f1dSSascha Wildner.It 75332f0f1dSSascha WildnerOnly one setting can be present on each line. 76332f0f1dSSascha Wildner.El 77332f0f1dSSascha Wildner.Pp 78332f0f1dSSascha WildnerAll settings have the following format: 79332f0f1dSSascha Wildner.Pp 80332f0f1dSSascha Wildner.Dl variable="value" 81332f0f1dSSascha Wildner.Pp 82b5ef8da1SThomas NikolajsenThis assigns value to a local variable. 83b5ef8da1SThomas NikolajsenIf variable is in a list of known kernel environment variables or 84b5ef8da1SThomas Nikolajsenis a kernel tunable, 85b5ef8da1SThomas Nikolajsenit is also assigned to the kernel environment variable of the given name. 86b5ef8da1SThomas Nikolajsen.Pp 87b5ef8da1SThomas NikolajsenThe settings that receive special treatment are listed below. 88332f0f1dSSascha WildnerSettings beginning with 89332f0f1dSSascha Wildner.Aq Ar module 90b5ef8da1SThomas Nikolajsenbelow define the kernel modules to be loaded. 91332f0f1dSSascha WildnerAll such settings sharing a common 92332f0f1dSSascha Wildnerprefix refer to the same module. 93b5ef8da1SThomas Nikolajsen.Bl -tag -width indent 94332f0f1dSSascha Wildner.It Ar kernel 95332f0f1dSSascha WildnerName of the kernel to be loaded. 96332f0f1dSSascha WildnerIf no kernel name is set, no additional 97332f0f1dSSascha Wildnermodules will be loaded. 98332f0f1dSSascha Wildner.It Ar kernel_options 99332f0f1dSSascha WildnerFlags to be passed to the kernel (see 100332f0f1dSSascha Wildner.Xr boot 8 ) . 101332f0f1dSSascha Wildner.It Ar verbose_loading 102332f0f1dSSascha WildnerIf set to 103332f0f1dSSascha Wildner.Dq YES , 104332f0f1dSSascha Wildnermodule names will be displayed as they are loaded. 105332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _load 106332f0f1dSSascha WildnerIf set to 107332f0f1dSSascha Wildner.Dq YES , 108b5ef8da1SThomas Nikolajsenthat kernel module will be loaded. 109332f0f1dSSascha WildnerIf no 110332f0f1dSSascha Wildner.Ao Ar module Ac Ns Ar _name 111332f0f1dSSascha Wildneris defined (see below), the 112332f0f1dSSascha Wildnermodule's name is taken to be 113332f0f1dSSascha Wildner.Aq Ar module . 114332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _name 115332f0f1dSSascha WildnerDefines the name of the module. 116332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _type 117332f0f1dSSascha WildnerDefines the module's type. 118b5ef8da1SThomas NikolajsenIf none is given, it defaults to a 119b5ef8da1SThomas Nikolajsen.Xr kld 4 120b5ef8da1SThomas Nikolajsenmodule. 121332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _flags 122332f0f1dSSascha WildnerFlags and parameters to be passed to the module. 123332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _before 124332f0f1dSSascha WildnerCommands to be executed before the module is loaded. 125332f0f1dSSascha WildnerUse of this setting 126332f0f1dSSascha Wildnershould be avoided. 127332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _after 128332f0f1dSSascha WildnerCommands to be executed after the module is loaded. 129332f0f1dSSascha WildnerUse of this setting 130332f0f1dSSascha Wildnershould be avoided. 131332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _error 132332f0f1dSSascha WildnerCommands to be executed if the loading of a module fails. 133332f0f1dSSascha WildnerExcept for the 134332f0f1dSSascha Wildnerspecial value 135332f0f1dSSascha Wildner.Dq abort , 136332f0f1dSSascha Wildnerwhich aborts the bootstrap process, use of this setting should be avoided. 137332f0f1dSSascha Wildner.El 138332f0f1dSSascha Wildner.Sh DEFAULT SETTINGS 139b5ef8da1SThomas NikolajsenSee 140b5ef8da1SThomas Nikolajsen.Pa /boot/defaults/loader.conf 141b5ef8da1SThomas Nikolajsenfor 142332f0f1dSSascha Wildner.Nm Ns 's 143b5ef8da1SThomas Nikolajsendefault settings. 144332f0f1dSSascha WildnerThe few of them which are important 145332f0f1dSSascha Wildneror useful are: 146b5ef8da1SThomas Nikolajsen.Bl -tag -width indent 147332f0f1dSSascha Wildner.It Va bitmap_load 148332f0f1dSSascha Wildner.Pq Dq NO 149332f0f1dSSascha WildnerIf set to 150332f0f1dSSascha Wildner.Dq YES , 151332f0f1dSSascha Wildnera bitmap will be loaded to be displayed on screen while booting. 152332f0f1dSSascha Wildner.It Va bitmap_name 153332f0f1dSSascha Wildner.Pq Dq splash.bmp 154332f0f1dSSascha WildnerName of the bitmap to be loaded. 155332f0f1dSSascha WildnerAny other name can be used. 156526a18dfSJoe Talbott.It Va boot_verbose 157526a18dfSJoe Talbott.Pq Dq NO 158526a18dfSJoe TalbottSet to 159526a18dfSJoe Talbott.Dq YES 160526a18dfSJoe Talbottto enable verbose booting. 161332f0f1dSSascha Wildner.It Va console 162332f0f1dSSascha Wildner.Pq Dq vidconsole 163332f0f1dSSascha Wildner.Dq comconsole 164332f0f1dSSascha Wildnerselects serial console, 165332f0f1dSSascha Wildner.Dq vidconsole 166332f0f1dSSascha Wildnerselects the video console, and 167332f0f1dSSascha Wildner.Dq nullconsole 168332f0f1dSSascha Wildnerselects a mute console 169332f0f1dSSascha Wildner(useful for systems with neither a video console nor a serial port). 170792c92cbSMatthew Dillon.Pp 171792c92cbSMatthew DillonWhen using a comconsole the kernel defaults to allowing a console on sio0. 172792c92cbSMatthew DillonTo change this to sio1 you must specify 173792c92cbSMatthew Dillon.Va sio0.flags=0 174792c92cbSMatthew Dillonand 175792c92cbSMatthew Dillon.Va sio1.flags=0x10 176792c92cbSMatthew Dillonin addition to setting the console to the comconsole. 1771b3de706SMatthew DillonYou can also set the baud rate with (for example) 1781b3de706SMatthew Dillon.Va sio1.baud=115200 1791b3de706SMatthew Dillonor simply inherit the baud set in the boot code. 1801b3de706SMatthew DillonNormally these must be set if you want to use a stock kernel in a 1811b3de706SMatthew DillonIPMI environment. 182*fe29771dSMatthew DillonWhen setting the serial console you must specify the serial port 183*fe29771dSMatthew Dillonwith (for example) 184*fe29771dSMatthew Dillon.Va sio1.port=0x3e8 . 185*fe29771dSMatthew DillonTypically sio0 is on 0x3f8 and sio1 is on 0x2f8, but IPMI consoles 186*fe29771dSMatthew Dillonon sio1 are often on 0x3e8 (instead of sio2), which can be confusing. 187*fe29771dSMatthew DillonBe sure to specify the correct port 188*fe29771dSMatthew Dillonif you want early kernel boot messages to work. 189*fe29771dSMatthew DillonIf you do not specify the port the console will still operate on 190*fe29771dSMatthew Dillonthe serial port but only after the kernel has started init. 191792c92cbSMatthew Dillon.Pp 19297a8cef1SMatthew DillonSome IPMI environments do not enable sio1 during the BIOS boot, 19397a8cef1SMatthew Dillonwhich can cause the loader to get confused and not pass RB_SERIAL 19497a8cef1SMatthew Dillonto the kernel. 19597a8cef1SMatthew DillonSetting console=comconsole in this situation also does not work because 19697a8cef1SMatthew Dillonthen the loader is inacessible. Instead, set the sioX fields as shown 19797a8cef1SMatthew Dillonabove and also add 19897a8cef1SMatthew Dillon.Va set boot_serial="YES" 19997a8cef1SMatthew Dillonto cause the kernel to use the serial port without also forcing the 20097a8cef1SMatthew Dillonboot loader to use the serial port. 20197a8cef1SMatthew Dillon.Pp 20297a8cef1SMatthew DillonThe boot1/boot2 code uses BIOS calls to read and write the screen but also 2031b3de706SMatthew Dillonmirrors output to and monitors COM1 @ 9600. 2041b3de706SMatthew DillonIn an IPMI environment you do not usually have to adjust the boot code 20597a8cef1SMatthew Dillonat all, instead using the IPMI feature to redirect the video output. 2061b3de706SMatthew DillonIn non-IPMI setups if you want the boot code to be available on 2071b3de706SMatthew DillonCOM2 at 57600 baud instead of COM1, for example, you must set the variables 208792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_PORT=0x2f8 209792c92cbSMatthew Dillonand 210792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_SPEED=57600 211792c92cbSMatthew Dillonin 212792c92cbSMatthew Dillon.Pa /etc/make.conf 213792c92cbSMatthew Dillonand recompile and install the boot code at 214792c92cbSMatthew Dillon.Pa /usr/src/sys/boot , 215792c92cbSMatthew Dillonthen install the bootcode to the partition via 216792c92cbSMatthew Dillon.Xr disklabel 8 . 217792c92cbSMatthew Dillon.Pp 218792c92cbSMatthew DillonNote that in comconsole mode the kernel will pick up the baud rate 219792c92cbSMatthew Dillonfrom the boot loader, so no kernel recompile is needed. 220332f0f1dSSascha Wildner.It Va fred_disable 221332f0f1dSSascha Wildner.Pq Dq NO 222332f0f1dSSascha WildnerShows a monochrome version of Fred, the official 223332f0f1dSSascha Wildner.Dx 224332f0f1dSSascha Wildnermascot, when the 225332f0f1dSSascha Wildnerboot menu appears. 226332f0f1dSSascha WildnerTo make his life a bit more colorful, consider setting 227332f0f1dSSascha Wildner.Pa loader_color 228332f0f1dSSascha Wildnerto 229332f0f1dSSascha Wildner.Dq YES . 2308b20437dSJoe Talbott.It Va fred_on_left 2318b20437dSJoe Talbott.Pq Dq NO 2328b20437dSJoe TalbottShows Fred on the left side of the menu rather than the right side. 233332f0f1dSSascha Wildner.It Va kernel 234b5ef8da1SThomas Nikolajsen.Pq Dq kernel . 235332f0f1dSSascha Wildner.It Va loader_color 236332f0f1dSSascha Wildner.Pq Dq NO 237332f0f1dSSascha WildnerIf set to 238332f0f1dSSascha Wildner.Dq YES , 239332f0f1dSSascha Wildneryou'll meet Fred, the official 240332f0f1dSSascha Wildner.Dx 241332f0f1dSSascha Wildnermascot, in technicolor when the 242332f0f1dSSascha Wildnerboot menu appears (remember to set 243332f0f1dSSascha Wildner.Pa fred_disable 244332f0f1dSSascha Wildnerto 245332f0f1dSSascha Wildner.Dq NO 246332f0f1dSSascha Wildnerfor this to work.) 247332f0f1dSSascha Wildner.It Va splash_bmp_load 248332f0f1dSSascha Wildner.Pq Dq NO 249332f0f1dSSascha WildnerIf set to 250332f0f1dSSascha Wildner.Dq YES , 251332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a bmp image 252332f0f1dSSascha Wildneron the screen while booting. 253332f0f1dSSascha Wildner.It Va splash_pcx_load 254332f0f1dSSascha Wildner.Pq Dq NO 255332f0f1dSSascha WildnerIf set to 256332f0f1dSSascha Wildner.Dq YES , 257332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a pcx image 258332f0f1dSSascha Wildneron the screen while booting. 259332f0f1dSSascha Wildner.It Va userconfig_script_load 260332f0f1dSSascha Wildner.Pq Dq NO 261332f0f1dSSascha WildnerIf set to 262332f0f1dSSascha Wildner.Dq YES , 263332f0f1dSSascha Wildnerwill load the userconfig data. 264332f0f1dSSascha Wildner.It Va vesa_load 265332f0f1dSSascha Wildner.Pq Dq NO 266332f0f1dSSascha WildnerIf set to 267332f0f1dSSascha Wildner.Dq YES , 268332f0f1dSSascha Wildnerthe vesa module will be loaded, enabling bitmaps above VGA resolution to 269332f0f1dSSascha Wildnerbe displayed. 270332f0f1dSSascha Wildner.El 271792c92cbSMatthew Dillon.Sh IPMI 272792c92cbSMatthew DillonGenerally speaking machines with IPMI capabilities are capable of 273792c92cbSMatthew Dillonredirecting the BIOS POST to a fake serial port controlled by the BMC. 274792c92cbSMatthew DillonIt is then possible to use 275792c92cbSMatthew Dillon.Xr ipmitool 1 276c8e8a2e5SSascha Wildnerfrom 277c8e8a2e5SSascha Wildner.Xr dports 7 278c8e8a2e5SSascha Wildnerto access the console. 279440b845aSSascha Wildner.Dx 280440b845aSSascha Wildnerkernels adjust the video mode in a way that the BMC cannot usually 281792c92cbSMatthew Dillonredirect, so your best bet is to set the boot loader AND the kernel up to 282792c92cbSMatthew Dillonuse a serial port via the 283792c92cbSMatthew Dillon.Va console=comconsole 284792c92cbSMatthew Dillonfeature described above. 285792c92cbSMatthew DillonOften the IPMI controller, called the BMC, is not sitting on COM1 so 286440b845aSSascha Wildner.Dx Ap s 287440b845aSSascha Wildnerdefault console parameters and baud rate will not work. 288332f0f1dSSascha Wildner.Sh FILES 289b5ef8da1SThomas Nikolajsen.Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact 290b5ef8da1SThomas Nikolajsen.It Pa /boot/defaults/dloader.menu 291b5ef8da1SThomas Nikolajsendefault settings for menu setup -- do not change this file. 292332f0f1dSSascha Wildner.It Pa /boot/defaults/loader.conf 293332f0f1dSSascha Wildnerdefault settings -- do not change this file. 294b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.menu 295b5ef8da1SThomas Nikolajsendefines the commands used by 296b5ef8da1SThomas Nikolajsen.Nm loader 297b5ef8da1SThomas Nikolajsento setup menus. 298332f0f1dSSascha Wildner.It Pa /boot/loader.conf 299332f0f1dSSascha Wildneruser defined settings. 300332f0f1dSSascha Wildner.It Pa /boot/loader.conf.local 301332f0f1dSSascha Wildnermachine-specific settings for sites with a common loader.conf. 302b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.rc 303b5ef8da1SThomas Nikolajsencontains the instructions to automatically process. 304332f0f1dSSascha Wildner.El 305332f0f1dSSascha Wildner.Sh SEE ALSO 306332f0f1dSSascha Wildner.Xr boot 8 , 3079b38070eSSascha Wildner.Xr loader 8 308332f0f1dSSascha Wildner.Sh HISTORY 309332f0f1dSSascha WildnerThe file 310332f0f1dSSascha Wildner.Nm 311332f0f1dSSascha Wildnerfirst appeared in 312332f0f1dSSascha Wildner.Fx 3.2 . 313332f0f1dSSascha Wildner.Sh AUTHORS 314332f0f1dSSascha WildnerThis manual page was written by 315c616d378SFranco Fichtner.An Daniel C. Sobral Aq Mt dcs@FreeBSD.org . 316