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 $ 26d0a4041bSSascha Wildner.\" 27*479ab7f0SSascha Wildner.Dd October 29, 2020 28332f0f1dSSascha Wildner.Dt LOADER.CONF 5 29332f0f1dSSascha Wildner.Os 30332f0f1dSSascha Wildner.Sh NAME 31332f0f1dSSascha Wildner.Nm loader.conf 32332f0f1dSSascha Wildner.Nd system bootstrap configuration information 33332f0f1dSSascha Wildner.Sh DESCRIPTION 34332f0f1dSSascha WildnerThe file 35332f0f1dSSascha Wildner.Nm 36332f0f1dSSascha Wildnercontains descriptive information on bootstrapping the system. 37b5ef8da1SThomas NikolajsenThrough it you can specify the kernel to be booted, 38b5ef8da1SThomas Nikolajsenparameters to be passed to it, 39b5ef8da1SThomas Nikolajsenand additional kernel modules to be loaded; 40b5ef8da1SThomas Nikolajsenand generally set all variables described in 41332f0f1dSSascha Wildner.Xr loader 8 . 42332f0f1dSSascha Wildner.Pp 43332f0f1dSSascha WildnerA file 44b5ef8da1SThomas Nikolajsen.Pa dloader.rc 45b5ef8da1SThomas Nikolajsenmust contain the following lines for 46332f0f1dSSascha Wildner.Nm 47332f0f1dSSascha Wildnerto be automatically processed: 48332f0f1dSSascha Wildner.Pp 49b5ef8da1SThomas Nikolajsen.Dl include defaults/loader.conf 50b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf 51b5ef8da1SThomas Nikolajsen.Dl optinclude loader.conf.local 52332f0f1dSSascha Wildner.Pp 53332f0f1dSSascha WildnerIf no 54b5ef8da1SThomas Nikolajsen.Pa /boot/dloader.rc 55332f0f1dSSascha Wildnerexists at installworld time, one with the above lines will be installed. 56332f0f1dSSascha Wildner.Sh SYNTAX 57332f0f1dSSascha WildnerThough 58332f0f1dSSascha Wildner.Nm Ns 's 59332f0f1dSSascha Wildnerformat was defined explicitly to resemble 60332f0f1dSSascha Wildner.Xr rc.conf 5 , 61332f0f1dSSascha Wildnerand can be sourced by 62332f0f1dSSascha Wildner.Xr sh 1 , 63332f0f1dSSascha Wildnersome settings are treated in a special fashion. 64b5ef8da1SThomas NikolajsenAlso, the behavior of some settings is defined by the setting's suffix; 65332f0f1dSSascha Wildnerthe prefix identifies which module the setting controls. 66332f0f1dSSascha Wildner.Pp 67332f0f1dSSascha WildnerThe general parsing rules are: 68332f0f1dSSascha Wildner.Bl -bullet 69332f0f1dSSascha Wildner.It 70332f0f1dSSascha WildnerSpaces and empty lines are ignored. 71332f0f1dSSascha Wildner.It 72332f0f1dSSascha WildnerA 73332f0f1dSSascha Wildner.Ql # 74332f0f1dSSascha Wildnersign will mark the remainder of the line as a comment. 75332f0f1dSSascha Wildner.It 76332f0f1dSSascha WildnerOnly one setting can be present on each line. 77332f0f1dSSascha Wildner.El 78332f0f1dSSascha Wildner.Pp 79332f0f1dSSascha WildnerAll settings have the following format: 80332f0f1dSSascha Wildner.Pp 81332f0f1dSSascha Wildner.Dl variable="value" 82332f0f1dSSascha Wildner.Pp 83b5ef8da1SThomas NikolajsenThis assigns value to a local variable. 84b5ef8da1SThomas NikolajsenIf variable is in a list of known kernel environment variables or 85b5ef8da1SThomas Nikolajsenis a kernel tunable, 86b5ef8da1SThomas Nikolajsenit is also assigned to the kernel environment variable of the given name. 87b5ef8da1SThomas Nikolajsen.Pp 88b5ef8da1SThomas NikolajsenThe settings that receive special treatment are listed below. 89332f0f1dSSascha WildnerSettings beginning with 90332f0f1dSSascha Wildner.Aq Ar module 91b5ef8da1SThomas Nikolajsenbelow define the kernel modules to be loaded. 92332f0f1dSSascha WildnerAll such settings sharing a common 93332f0f1dSSascha Wildnerprefix refer to the same module. 94b5ef8da1SThomas Nikolajsen.Bl -tag -width indent 95332f0f1dSSascha Wildner.It Ar kernel 96332f0f1dSSascha WildnerName of the kernel to be loaded. 97332f0f1dSSascha WildnerIf no kernel name is set, no additional 98332f0f1dSSascha Wildnermodules will be loaded. 99332f0f1dSSascha Wildner.It Ar kernel_options 100332f0f1dSSascha WildnerFlags to be passed to the kernel (see 101332f0f1dSSascha Wildner.Xr boot 8 ) . 102332f0f1dSSascha Wildner.It Ar verbose_loading 103332f0f1dSSascha WildnerIf set to 104332f0f1dSSascha Wildner.Dq YES , 105332f0f1dSSascha Wildnermodule names will be displayed as they are loaded. 106332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _load 107332f0f1dSSascha WildnerIf set to 108332f0f1dSSascha Wildner.Dq YES , 109b5ef8da1SThomas Nikolajsenthat kernel module will be loaded. 110332f0f1dSSascha WildnerIf no 111332f0f1dSSascha Wildner.Ao Ar module Ac Ns Ar _name 112332f0f1dSSascha Wildneris defined (see below), the 113332f0f1dSSascha Wildnermodule's name is taken to be 114332f0f1dSSascha Wildner.Aq Ar module . 115105b5cd2SJohannes HofmannOnly modules necessary for mounting the root file system should be loaded from 116edf2e657SSascha Wildner.Nm 117105b5cd2SJohannes Hofmanndue to memory limitations in the early boot phase. 118105b5cd2SJohannes HofmannOther modules can be loaded later via similar entries in 119105b5cd2SJohannes Hofmann.Xr rc.conf 5 . 120332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _name 121332f0f1dSSascha WildnerDefines the name of the module. 122332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _type 123332f0f1dSSascha WildnerDefines the module's type. 124b5ef8da1SThomas NikolajsenIf none is given, it defaults to a 125b5ef8da1SThomas Nikolajsen.Xr kld 4 126b5ef8da1SThomas Nikolajsenmodule. 127332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _flags 128332f0f1dSSascha WildnerFlags and parameters to be passed to the module. 129332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _before 130332f0f1dSSascha WildnerCommands to be executed before the module is loaded. 131332f0f1dSSascha WildnerUse of this setting 132332f0f1dSSascha Wildnershould be avoided. 133332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _after 134332f0f1dSSascha WildnerCommands to be executed after the module is loaded. 135332f0f1dSSascha WildnerUse of this setting 136332f0f1dSSascha Wildnershould be avoided. 137332f0f1dSSascha Wildner.It Ao Ar module Ac Ns Ar _error 138332f0f1dSSascha WildnerCommands to be executed if the loading of a module fails. 139332f0f1dSSascha WildnerExcept for the 140332f0f1dSSascha Wildnerspecial value 141332f0f1dSSascha Wildner.Dq abort , 142332f0f1dSSascha Wildnerwhich aborts the bootstrap process, use of this setting should be avoided. 143332f0f1dSSascha Wildner.El 144332f0f1dSSascha Wildner.Sh DEFAULT SETTINGS 145b5ef8da1SThomas NikolajsenSee 146b5ef8da1SThomas Nikolajsen.Pa /boot/defaults/loader.conf 147b5ef8da1SThomas Nikolajsenfor 148332f0f1dSSascha Wildner.Nm Ns 's 149b5ef8da1SThomas Nikolajsendefault settings. 150332f0f1dSSascha WildnerThe few of them which are important 151332f0f1dSSascha Wildneror useful are: 152b5ef8da1SThomas Nikolajsen.Bl -tag -width indent 153332f0f1dSSascha Wildner.It Va bitmap_load 154332f0f1dSSascha Wildner.Pq Dq NO 155332f0f1dSSascha WildnerIf set to 156332f0f1dSSascha Wildner.Dq YES , 157332f0f1dSSascha Wildnera bitmap will be loaded to be displayed on screen while booting. 158332f0f1dSSascha Wildner.It Va bitmap_name 159332f0f1dSSascha Wildner.Pq Dq splash.bmp 160332f0f1dSSascha WildnerName of the bitmap to be loaded. 161332f0f1dSSascha WildnerAny other name can be used. 162526a18dfSJoe Talbott.It Va boot_verbose 163526a18dfSJoe Talbott.Pq Dq NO 164526a18dfSJoe TalbottSet to 165526a18dfSJoe Talbott.Dq YES 166526a18dfSJoe Talbottto enable verbose booting. 167332f0f1dSSascha Wildner.It Va console 168332f0f1dSSascha Wildner.Pq Dq vidconsole 169332f0f1dSSascha Wildner.Dq comconsole 170332f0f1dSSascha Wildnerselects serial console, 171332f0f1dSSascha Wildner.Dq vidconsole 172332f0f1dSSascha Wildnerselects the video console, and 173332f0f1dSSascha Wildner.Dq nullconsole 174332f0f1dSSascha Wildnerselects a mute console 175332f0f1dSSascha Wildner(useful for systems with neither a video console nor a serial port). 176792c92cbSMatthew Dillon.Pp 177792c92cbSMatthew DillonWhen using a comconsole the kernel defaults to allowing a console on sio0. 178792c92cbSMatthew DillonTo change this to sio1 you must specify 179792c92cbSMatthew Dillon.Va sio0.flags=0 180792c92cbSMatthew Dillonand 181792c92cbSMatthew Dillon.Va sio1.flags=0x10 182792c92cbSMatthew Dillonin addition to setting the console to the comconsole. 1831b3de706SMatthew DillonYou can also set the baud rate with (for example) 1841b3de706SMatthew Dillon.Va sio1.baud=115200 1851b3de706SMatthew Dillonor simply inherit the baud set in the boot code. 1861b3de706SMatthew DillonNormally these must be set if you want to use a stock kernel in a 1871b3de706SMatthew DillonIPMI environment. 188fe29771dSMatthew DillonWhen setting the serial console you must specify the serial port 189fe29771dSMatthew Dillonwith (for example) 190fe29771dSMatthew Dillon.Va sio1.port=0x3e8 . 191fe29771dSMatthew DillonTypically sio0 is on 0x3f8 and sio1 is on 0x2f8, but IPMI consoles 192fe29771dSMatthew Dillonon sio1 are often on 0x3e8 (instead of sio2), which can be confusing. 193fe29771dSMatthew DillonBe sure to specify the correct port 194fe29771dSMatthew Dillonif you want early kernel boot messages to work. 195fe29771dSMatthew DillonIf you do not specify the port the console will still operate on 196fe29771dSMatthew Dillonthe serial port but only after the kernel has started init. 197792c92cbSMatthew Dillon.Pp 19897a8cef1SMatthew DillonSome IPMI environments do not enable sio1 during the BIOS boot, 19997a8cef1SMatthew Dillonwhich can cause the loader to get confused and not pass RB_SERIAL 20097a8cef1SMatthew Dillonto the kernel. 20197a8cef1SMatthew DillonSetting console=comconsole in this situation also does not work because 20297a8cef1SMatthew Dillonthen the loader is inacessible. Instead, set the sioX fields as shown 20397a8cef1SMatthew Dillonabove and also add 20497a8cef1SMatthew Dillon.Va set boot_serial="YES" 20597a8cef1SMatthew Dillonto cause the kernel to use the serial port without also forcing the 20697a8cef1SMatthew Dillonboot loader to use the serial port. 20797a8cef1SMatthew Dillon.Pp 2086481baf4SMatthew DillonIn contrast to the above, if you wish to place your serial console 2096481baf4SMatthew Dillonon a late-configuring serial port (such as one from a PCIe card), 2106481baf4SMatthew Dillonthat serial port will not be available to the loader or for half 2116481baf4SMatthew Dillonthe boot and it is probably best to leave 2126481baf4SMatthew Dillon.Va boot_serial unset . 2136481baf4SMatthew DillonIn 2146481baf4SMatthew Dillonthis situation, syscons may have already taken the console, so 2156481baf4SMatthew Dillonyou need to override it using (for example) 2166481baf4SMatthew Dillon.Va sio4.flags=0x30 instead of 0x10. 2176481baf4SMatthew Dillon.Pp 21897a8cef1SMatthew DillonThe boot1/boot2 code uses BIOS calls to read and write the screen but also 2191b3de706SMatthew Dillonmirrors output to and monitors COM1 @ 9600. 2201b3de706SMatthew DillonIn an IPMI environment you do not usually have to adjust the boot code 22197a8cef1SMatthew Dillonat all, instead using the IPMI feature to redirect the video output. 2221b3de706SMatthew DillonIn non-IPMI setups if you want the boot code to be available on 2231b3de706SMatthew DillonCOM2 at 57600 baud instead of COM1, for example, you must set the variables 224792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_PORT=0x2f8 225792c92cbSMatthew Dillonand 226792c92cbSMatthew Dillon.Va BOOT_COMCONSOLE_SPEED=57600 227792c92cbSMatthew Dillonin 228792c92cbSMatthew Dillon.Pa /etc/make.conf 229792c92cbSMatthew Dillonand recompile and install the boot code at 230*479ab7f0SSascha Wildner.Pa /usr/src/stand/boot , 231792c92cbSMatthew Dillonthen install the bootcode to the partition via 232792c92cbSMatthew Dillon.Xr disklabel 8 . 233792c92cbSMatthew Dillon.Pp 234792c92cbSMatthew DillonNote that in comconsole mode the kernel will pick up the baud rate 235792c92cbSMatthew Dillonfrom the boot loader, so no kernel recompile is needed. 236a147fd46SJohn Marino.It Va kernel 237a147fd46SJohn Marino.Pq Dq kernel . 23872b78560SJohn Marino.It Va loader_plain 23972b78560SJohn Marino.Pq Dq NO 24072b78560SJohn MarinoUnlike in the past, the loader defaults to displaying Fred, the official 24172b78560SJohn Marino.Dx 24272b78560SJohn Marinomascot, in color when the boot menu appears, unless 24372b78560SJohn Marino.Pa console 24472b78560SJohn Marinois set to 24572b78560SJohn Marino.Dq comconsole 24672b78560SJohn Marinoin 24772b78560SJohn Marino.Pa loader.conf 24872b78560SJohn Marinoor in the environment. If set to 24972b78560SJohn Marino.Dq YES , 25072b78560SJohn MarinoFred will always be displayed in monochrome. 25172b78560SJohn Marino.It Va fred_is_red 25272b78560SJohn Marino.Pq Dq NO 25372b78560SJohn MarinoUnder color mode, Fred is depicted as a blue dragonfly with cyan wings 25472b78560SJohn Marinoby default. If set to 25572b78560SJohn Marino.Dq YES , 25672b78560SJohn MarinoFred will be shown as a red dragonfly with red wings instead. 257332f0f1dSSascha Wildner.It Va fred_disable 258332f0f1dSSascha Wildner.Pq Dq NO 25972b78560SJohn MarinoFred is displayed with the menu by default. If set to 26072b78560SJohn Marino.Dq YES , 26172b78560SJohn MarinoFred will not be shown. The area will simply be blank. 2628b20437dSJoe Talbott.It Va fred_on_left 2638b20437dSJoe Talbott.Pq Dq NO 264332f0f1dSSascha WildnerIf set to 265332f0f1dSSascha Wildner.Dq YES , 26672b78560SJohn MarinoFred will be displayed on the left side of the menu rather than the right side. 26772b78560SJohn Marino.It Va fred_separated 268a147fd46SJohn Marino.Pq Dq NO 26972b78560SJohn MarinoIf set to 27072b78560SJohn Marino.Dq YES , 27172b78560SJohn Marinoa line will be drawn between Fred and the menu block. 272332f0f1dSSascha Wildner.It Va splash_bmp_load 273332f0f1dSSascha Wildner.Pq Dq NO 274332f0f1dSSascha WildnerIf set to 275332f0f1dSSascha Wildner.Dq YES , 276332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a bmp image 277332f0f1dSSascha Wildneron the screen while booting. 278332f0f1dSSascha Wildner.It Va splash_pcx_load 279332f0f1dSSascha Wildner.Pq Dq NO 280332f0f1dSSascha WildnerIf set to 281332f0f1dSSascha Wildner.Dq YES , 282332f0f1dSSascha Wildnerwill load the splash screen module, making it possible to display a pcx image 283332f0f1dSSascha Wildneron the screen while booting. 284332f0f1dSSascha Wildner.El 285792c92cbSMatthew Dillon.Sh IPMI 286792c92cbSMatthew DillonGenerally speaking machines with IPMI capabilities are capable of 287792c92cbSMatthew Dillonredirecting the BIOS POST to a fake serial port controlled by the BMC. 288792c92cbSMatthew DillonIt is then possible to use 289792c92cbSMatthew Dillon.Xr ipmitool 1 290c8e8a2e5SSascha Wildnerfrom 291c8e8a2e5SSascha Wildner.Xr dports 7 292c8e8a2e5SSascha Wildnerto access the console. 293440b845aSSascha Wildner.Dx 294440b845aSSascha Wildnerkernels adjust the video mode in a way that the BMC cannot usually 295792c92cbSMatthew Dillonredirect, so your best bet is to set the boot loader AND the kernel up to 296792c92cbSMatthew Dillonuse a serial port via the 297792c92cbSMatthew Dillon.Va console=comconsole 298792c92cbSMatthew Dillonfeature described above. 299792c92cbSMatthew DillonOften the IPMI controller, called the BMC, is not sitting on COM1 so 300440b845aSSascha Wildner.Dx Ap s 301440b845aSSascha Wildnerdefault console parameters and baud rate will not work. 302332f0f1dSSascha Wildner.Sh FILES 303b5ef8da1SThomas Nikolajsen.Bl -tag -width ".Pa /boot/defaults/dloader.menu" -compact 304b5ef8da1SThomas Nikolajsen.It Pa /boot/defaults/dloader.menu 305b5ef8da1SThomas Nikolajsendefault settings for menu setup -- do not change this file. 306332f0f1dSSascha Wildner.It Pa /boot/defaults/loader.conf 307332f0f1dSSascha Wildnerdefault settings -- do not change this file. 308b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.menu 309b5ef8da1SThomas Nikolajsendefines the commands used by 310b5ef8da1SThomas Nikolajsen.Nm loader 311b5ef8da1SThomas Nikolajsento setup menus. 312332f0f1dSSascha Wildner.It Pa /boot/loader.conf 313332f0f1dSSascha Wildneruser defined settings. 314332f0f1dSSascha Wildner.It Pa /boot/loader.conf.local 315332f0f1dSSascha Wildnermachine-specific settings for sites with a common loader.conf. 316b5ef8da1SThomas Nikolajsen.It Pa /boot/dloader.rc 317b5ef8da1SThomas Nikolajsencontains the instructions to automatically process. 318332f0f1dSSascha Wildner.El 319332f0f1dSSascha Wildner.Sh SEE ALSO 320332f0f1dSSascha Wildner.Xr boot 8 , 3219b38070eSSascha Wildner.Xr loader 8 322332f0f1dSSascha Wildner.Sh HISTORY 323332f0f1dSSascha WildnerThe file 324332f0f1dSSascha Wildner.Nm 325332f0f1dSSascha Wildnerfirst appeared in 326332f0f1dSSascha Wildner.Fx 3.2 . 327332f0f1dSSascha Wildner.Sh AUTHORS 328332f0f1dSSascha WildnerThis manual page was written by 329c616d378SFranco Fichtner.An Daniel C. Sobral Aq Mt dcs@FreeBSD.org . 330