LOADER.4TH(5) Standards, Environments, and Macros LOADER.4TH(5)

NAME

loader.4thloader.conf processing tools

DESCRIPTION

The file that goes by the name of loader.4th is a set of commands designed to manipulate loader.conf(4) files. The default /boot/loader.rc includes loader.4th and uses one of its commands to automatically read and process the standard loader.conf(4) files. Other commands exists to help the user specify alternate configurations.
The commands of loader.4th by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to loader(5) for additional commands.
Before using any of the commands provided in loader.4th, it must be included through the command:
include loader.4th
This line is present in the default /boot/loader.rc file, so it is not needed (and should not be re-issued) in a normal setup.
The commands provided by it are:
boot
boot kernelname [...]
boot directory [...]
boot -flag ...
Boot as specified by the loader.conf(4) files read.
Depending on the arguments passed, it can override boot flags and either the kernel name or the search path for kernel and modules.
boot-conf
boot-conf kernelname [...]
boot-conf directory [...]
boot-conf -flag ...
Works like boot described above, but instead of booting immediately, uses autoboot, so it can be stopped.
start
Reads /boot/defaults/loader.conf, all other loader.conf(4) files specified in it, then loads the desired kernel and modules (if not already loaded). After which you can use the boot or autoboot commands or simply exit (provided autoboot_delay is not set to NO) to boot the system. start is the command used in the default /boot/loader.rc file (see loader(5)).
initialize
Initialize the support library so commands can be used without executing start first. Like start, it reads /boot/defaults/loader.conf and all other loader.conf(4) files specified in it (but does not load kernel or modules). Returns a flag on the stack to indicate if any configuration files were successfully loaded.
read-conf filename
Reads and processes a loader.conf(4) file. Does not proceed to boot.
enable-module module
Enables the loading of module.
disable-module module
Disables the loading of module.
toggle-module module
Toggles the loading of module on and off.
show-module module
Shows the information gathered in the loader.conf(4) files about the module module.
show-module-options
Shows all modules defined in current loader.conf(4) configuration.
retry
Used inside loader.conf(4) files to specify the action after a module loading fails.
ignore
Used inside loader.conf(4) files to specify the action after a module loading fails.
try-include file [file ...]
Process script files if they exist. Each file, in turn, is completely read into memory, and then each of its lines is passed to the command line interpreter. If any error is returned by the interpreter, the try-include command aborts immediately, without reading any other files, and silently returns without error.

FILES

/boot/loader
The loader(5).
/boot/forth/loader.4th
loader.4th itself.
/boot/loader.rc
loader(5) bootstrapping script.
/boot/defaults/loader.conf
File loaded by the start command.

EXAMPLES

Standard /boot/loader.rc:
include /boot/forth/loader.4th 
start
Read an additional configuration file and then proceed to boot:
unload 
read-conf /boot/special.conf 
boot-conf

SEE ALSO

loader.conf(4), loader(5)
April 22, 2017 illumos