---
name: "loader.kboot"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/loader.kboot"
---

# loader.kboot(8)

LinuxBoot kernel loader

## NAME

**loader.kboot** – LinuxBoot kernel loader

## DESCRIPTION

**loader.kboot** loads FreeBSD under “LinuxBoot”: a Linux kernel is used as the platform firmware, and **loader.kboot** runs as an ordinary Linux userland program on top of it to load the FreeBSD kernel. It is linked statically to minimize dependencies.

**loader.kboot** can run at any time during the boot process as a normal program. When running as *init* (PID 1), **loader.kboot** mounts */proc*, */sys*, */dev* and */tmp*; creates the usual compatibility symlinks (*/dev/fd*, */dev/stdin*, */dev/stdout*, */dev/stderr*); and switches its own stdio to */dev/console* before doing anything else. **loader.kboot** implements all the usual FreeBSD 8(loader) and 8(loader\_lua) features.

### Devices

Disks are accessed through their Linux */dev* names, not the FreeBSD names:

```
/dev/sda:
```

```
/dev/nvme0n1p3:
```

The environment variable *hostdisk\_override* may be set, before disk probing runs, to the path of a regular file. When unset, */sys/block* is scanned for all available devices.

The **host** filesystem gives access to files on the Linux host's own root filesystem, rooted at the value of the *hostfs\_root* environment variable (default “*/*”). Paths beginning with */sys/* or */proc/* bypass this rooting and are passed to the host unchanged, since those are kernel-provided filesystems rather than part of any disk image. A path starting with two slashes has one slash stripped and is otherwise unchanged.

*bootdev* selects the boot device, using the same naming as *currdev*. If unset, disks and their partitions found under */sys/block* are tried in turn, followed by any ZFS pools found on them; failing all of that, “host:/” is used.

### Firmware tables

Since there is no direct firmware access, ACPI's RSDP and the SMBIOS entry point are recovered from the Linux EFI system table exposed at */sys/firmware/efi/systab*, if present. SMBIOS data itself is read from */sys/firmware/dmi/tables/DMI*. When those are unavailable, **loader.kboot** attempts to use */dev/mem*, though that often is also unavailable.

### Kernel hand-off

**loader.kboot** uses the kexec\_load feature to stage the kernel, kernel modules, tuneables and other metadata in an intermediate buffer. **loader.kboot** then calls **reboot**() with special arguments and he Linux kernel will then move these to the requested location (if necessary) and jumps to the new kernel.

## FILES

- */boot/loader.kboot*

  **loader.kboot** itself.

- */boot/lua/loader.lua*

  The script run by **loader.kboot** on startup; see [loader\_lua(8)](/loader_lua/8.md).

## SEE ALSO

[loader(8)](/loader/8.md) [loader\_lua(8)](/loader_lua/8.md)

## HISTORY

**loader.kboot** first appeared in FreeBSD 11.0 as part of the PS3 port, and later generalized to several members of the PowerPC family. Support for aarch64 and amd64 was added in FreeBSD 14.0.

## AUTHORS

**loader.kboot** was written by Nathan Whitehorn ⟨*nwhitehorn@FreeBSD.org*⟩. Support was generalized by Warner Losh ⟨*imp@FreeBSD.org*⟩.
