man.bsd.lv manual page server

Manual Page Search Parameters

LOADER.CONF(5) File Formats Manual LOADER.CONF(5)

loader.confsystem bootstrap configuration information

The file loader.conf contains descriptive information on bootstrapping the system. Through it you can specify the kernel to be booted, parameters to be passed to it, and additional kernel modules to be loaded; and generally set all variables described in loader(8).

A file dloader.rc must contain the following lines for loader.conf to be automatically processed:

include defaults/loader.conf
optinclude loader.conf
optinclude loader.conf.local

If no /boot/dloader.rc exists at installworld time, one with the above lines will be installed.

Though loader.conf's format was defined explicitly to resemble rc.conf(5), and can be sourced by sh(1), some settings are treated in a special fashion. Also, the behavior of some settings is defined by the setting's suffix; the prefix identifies which module the setting controls.

The general parsing rules are:

All settings have the following format:

variable="value"

This assigns value to a local variable. If variable is in a list of known kernel environment variables or is a kernel tunable, it is also assigned to the kernel environment variable of the given name.

The settings that receive special treatment are listed below. Settings beginning with ⟨module⟩ below define the kernel modules to be loaded. All such settings sharing a common prefix refer to the same module.

kernel
Name of the kernel to be loaded. If no kernel name is set, no additional modules will be loaded.
kernel_options
Flags to be passed to the kernel (see boot(8)).
verbose_loading
If set to “YES”, module names will be displayed as they are loaded.
module_load
If set to “YES”, that kernel module will be loaded. If no ⟨module_name is defined (see below), the module's name is taken to be ⟨module⟩. Only modules necessary for mounting the root file system should be loaded from loader.conf due to memory limitations in the early boot phase. Other modules can be loaded later via similar entries in rc.conf(5).
module_name
Defines the name of the module.
module_type
Defines the module's type. If none is given, it defaults to a kld(4) module.
module_flags
Flags and parameters to be passed to the module.
module_before
Commands to be executed before the module is loaded. Use of this setting should be avoided.
module_after
Commands to be executed after the module is loaded. Use of this setting should be avoided.
module_error
Commands to be executed if the loading of a module fails. Except for the special value “abort”, which aborts the bootstrap process, use of this setting should be avoided.

See /boot/defaults/loader.conf for loader.conf's default settings. The few of them which are important or useful are:

bitmap_load
(“NO”) If set to “YES”, a bitmap will be loaded to be displayed on screen while booting.
bitmap_name
(“splash.bmp”) Name of the bitmap to be loaded. Any other name can be used.
boot_verbose
(“NO”) Set to “YES” to enable verbose booting.
console
(“vidconsole”) “comconsole” selects serial console, “vidconsole” selects the video console, and “nullconsole” selects a mute console (useful for systems with neither a video console nor a serial port).

When using a comconsole the kernel defaults to allowing a console on sio0. To change this to sio1 you must specify sio0.flags=0 and sio1.flags=0x10 in addition to setting the console to the comconsole. You can also set the baud rate with (for example) sio1.baud=115200 or simply inherit the baud set in the boot code. Normally these must be set if you want to use a stock kernel in a IPMI environment. When setting the serial console you must specify the serial port with (for example) sio1.port=0x3e8. Typically sio0 is on 0x3f8 and sio1 is on 0x2f8, but IPMI consoles on sio1 are often on 0x3e8 (instead of sio2), which can be confusing. Be sure to specify the correct port if you want early kernel boot messages to work. If you do not specify the port the console will still operate on the serial port but only after the kernel has started init.

Some IPMI environments do not enable sio1 during the BIOS boot, which can cause the loader to get confused and not pass RB_SERIAL to the kernel. Setting console=comconsole in this situation also does not work because then the loader is inacessible. Instead, set the sioX fields as shown above and also add set boot_serial="YES" to cause the kernel to use the serial port without also forcing the boot loader to use the serial port.

In contrast to the above, if you wish to place your serial console on a late-configuring serial port (such as one from a PCIe card), that serial port will not be available to the loader or for half the boot and it is probably best to leave boot_serial unset. In this situation, syscons may have already taken the console, so you need to override it using (for example) sio4.flags=0x30 instead of 0x10.

The boot1/boot2 code uses BIOS calls to read and write the screen but also mirrors output to and monitors COM1 @ 9600. In an IPMI environment you do not usually have to adjust the boot code at all, instead using the IPMI feature to redirect the video output. In non-IPMI setups if you want the boot code to be available on COM2 at 57600 baud instead of COM1, for example, you must set the variables BOOT_COMCONSOLE_PORT=0x2f8 and BOOT_COMCONSOLE_SPEED=57600 in /etc/make.conf and recompile and install the boot code at /usr/src/sys/boot, then install the bootcode to the partition via disklabel(8).

Note that in comconsole mode the kernel will pick up the baud rate from the boot loader, so no kernel recompile is needed.

kernel
(“kernel”).
loader_plain
(“NO”) Unlike in the past, the loader defaults to displaying Fred, the official DragonFly mascot, in color when the boot menu appears, unless console is set to “comconsole” in loader.conf or in the environment. If set to “YES”, Fred will always be displayed in monochrome.
fred_is_red
(“NO”) Under color mode, Fred is depicted as a blue dragonfly with cyan wings by default. If set to “YES”, Fred will be shown as a red dragonfly with red wings instead.
fred_disable
(“NO”) Fred is displayed with the menu by default. If set to “YES”, Fred will not be shown. The area will simply be blank.
fred_on_left
(“NO”) If set to “YES”, Fred will be displayed on the left side of the menu rather than the right side.
fred_separated
(“NO”) If set to “YES”, a line will be drawn between Fred and the menu block.
splash_bmp_load
(“NO”) If set to “YES”, will load the splash screen module, making it possible to display a bmp image on the screen while booting.
splash_pcx_load
(“NO”) If set to “YES”, will load the splash screen module, making it possible to display a pcx image on the screen while booting.

Generally speaking machines with IPMI capabilities are capable of redirecting the BIOS POST to a fake serial port controlled by the BMC. It is then possible to use ipmitool(1) from dports(7) to access the console. DragonFly kernels adjust the video mode in a way that the BMC cannot usually redirect, so your best bet is to set the boot loader AND the kernel up to use a serial port via the console=comconsole feature described above. Often the IPMI controller, called the BMC, is not sitting on COM1 so DragonFly's default console parameters and baud rate will not work.

/boot/defaults/dloader.menu
default settings for menu setup -- do not change this file.
/boot/defaults/loader.conf
default settings -- do not change this file.
/boot/dloader.menu
defines the commands used by loader to setup menus.
/boot/loader.conf
user defined settings.
/boot/loader.conf.local
machine-specific settings for sites with a common loader.conf.
/boot/dloader.rc
contains the instructions to automatically process.

boot(8), loader(8)

The file loader.conf first appeared in FreeBSD 3.2.

This manual page was written by Daniel C. Sobral <dcs@FreeBSD.org>.

August 14, 2015 DragonFly-5.6.1