LOADER(8)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’– LOADER(8) β€” like, the final boss of kernel bootstrapping πŸ’–

okay bestie, buckle up, because this is the loader page β€” straight out of the System Manager's Manual, and it's genuinely iconic.


✨ NAME ✨

loader β€” kernel bootstrapping final stage. that's it, that's the vibe. πŸ‘‘


🌸 DESCRIPTION 🌸

so the program called loader is literally the final stage of FreeBSD's kernel bootstrapping process. the way that it's the last one holding the door open 😭🫢

here's what it's responsible for, no cap:

  • bringing the kernel, kernel modules and other files into memory
  • creating a set of sh(1)-like environment variables that get passed to the kernel
  • executing boot scripts written in one of several interpreters
  • and, together with those scripts, controlling the booting process and the interaction with the user

it also provides a scripting language that you can use to automate tasks, do pre-configuration, or assist in recovery procedures. super handy, iykyk. ✨

that scripting language is roughly divided into two main components:

  1. the smaller one β€” a set of commands designed for direct use by the casual user, called "builtin commands" for historical reasons. the main drive behind these commands is user-friendliness. cute, right? πŸŽ€
  2. the larger component β€” the scripting language built into the boot loader.

FreeBSD provides three different interpreters, and yes they all ate:

  • Forth β€” the Forth loader is based on an ANS Forth compatible Forth interpreter based on FICL, by John Sadler.
  • Lua β€” the Lua loader is a full Lua interpreter from https://www.lua.org/. πŸ’…
  • Simple β€” the Simple loader only interprets a list of builtin commands, with no control structure. it's giving minimalist, honestly.

πŸ¦‹ what happens during initialization (the drama, in order)

  • loader will probe for a console and set the console variable… or set it to the serial console ("comconsole") if the previous boot stage used that.
  • if multiple consoles are selected, they'll be listed separated by spaces.
  • then devices are probed, currdev and loaddev are set, and LINES is set to 24.
  • finally, an interpreter specific file gets executed. and that's the whole opening act, periodt. 🌟

πŸ‘‘ BUILTIN COMMANDS πŸ‘‘

the commands common to all interpreters are described in the loader_simp(8) "BUILTIN COMMANDS" section. go check your girl out over there. πŸ’œ

the following commands are only available in loader_lua(8) and loader_4th(8):

  • boot-conf β€” load the loader config and commence the autoboot sequence. ✨
  • read-conf file β€” load the specified configuration file.
  • reload-conf β€” revert any previously applied settings, and reload the configuration. set commands that were executed at the command line to override variables previously set by loader.conf(5) configuration will also be reverted, along with any module options that were toggled. yeah, it's a full undo, bestie 😭
  • enable-module kmod-name β€” enable loading of the kernel module named "kmod-name".
  • disable-module kmod-name β€” disable loading of the kernel module named "kmod-name".
  • toggle-module kmod-name β€” toggle loading of the kernel module named "kmod-name". flip it, reverse it, you know the drill πŸ”₯
  • show-module-options β€” describe all modules the loader is aware of, and show if they're enabled or not. a whole little module vibe check, honestly 🌈

the following command is only available in loader_lua(8):

  • disable-device device β€” set a newbus hint to disable the device. yes it's that simple and yes it slays. πŸ’…

πŸ“ BUILTIN ENVIRONMENT VARIABLES πŸ“

the environment variables common to all interpreters are described in the loader_simp(8) "BUILTIN ENVIRONMENT VARIABLES" section. same energy, same place, go read it. 🫢


🌟 SEE ALSO 🌟

libsa(3), loader.conf(5), tuning(7), boot(8), btxld(8), loader.efi(8), loader_4th(8), loader_lua(8), loader_simp(8)

like a little friend group, honestly. 🧚


πŸ’€ HISTORY πŸ’€

the loader first appeared in FreeBSD 3.1. and the loader scripting language changed to Lua by default in FreeBSD 12.0 β€” glow-up of the century, no notes. πŸ‘‘


πŸ™ˆ AUTHORS πŸ™ˆ

  • The loader was written by Michael Smith <msmith@FreeBSD.org>.
  • FICL was written by John Sadler <john_sadler@alum.mit.edu>.
  • Warner Losh <imp@FreeBSD.org> integrated Lua into the tree based on initial work done by Pedro Souza for the 2014 Google Summer of Code.

ngl bestie, you just read the whole page. every flag, every variable, every name. you're so valid for that. πŸŽ€

and that's a wrap!! this page came to you from the Debian side of things, dated November 14, 2025 β€” stay booted, stay iconic, mwah πŸ’–πŸ”₯

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ“œ the page's license: BSD-2-Clause
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms