Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
CORE.LUA(8) FreeBSD System Manager's Manual CORE.LUA(8)

FreeBSD core module

core.lua contains core functionality that does not have a more fitting module.

Before hooking into or using the functionality provided by core.lua, it must be included with a statement such as the following:

local core = require("core")

The following raw key code constants are defined in core.lua:
The backspace code. Should generally be checked along with KEY_DELETE for backspace functionality.
The enter key, or hard return.
The delete code. Should generally be checked along with KEY_BACKSPACE for backspace functionality.

The following key-string constants are defined in core.lua:

The escape key.
The ANSI CSI sequence.

The following menu entry type constants are defined in core.lua:

Return to the parent menu.
A normal menu entry.
A menu entry that serves as a separator.
A menu entry that opens a submenu when selected.
A menu entry that rotates through items like a carousel upon selection of the menu entry.

Please see menu.lua(8) for extended descriptions and usage of the MENU_* constants.

The following functions are exported from core.lua:
Sets or unsets boot_verbose. If verbose is omitted, toggle the current verbose setting.
Sets or unsets boot_single. If singleUser is omitted, toggle the current single user setting.
Check whether ACPI is present. This will only be accurate for i386-compatible loaders, including non-UEFI loaders on amd64 systems. If checkingSystemDefaults is true, ignore the current value of hint.acpi.0.disabled. Otherwise, return true only if ACPI is both present and not disabled.
Sets or unsets acpi_load, hint.acpi.0.disabled, and loader.acpi_disabled_by_user. If acpi is omitted, toggle the current ACPI setting.
Set the safe mode setting. Sets or unsets kern.smp.disabled, hw.ata.ata_dma, hw.ata.atapi_dma, hw.ata.wc, hw.eisa_slots, kern.eventtimer.periodic, and kern.geom.part.check_integrity. If safeMode is omitted, toggle the current safe mode setting.
Clears out the cache of kernels to be displayed on the boot menu. This function is registered as a config.reloaded hook. It is used to invalidate the kernel list whenever it may have changed, either due to a boot environment change or a potential change in either kernel or kernels.
Returns a table of kernels to display on the boot menu. This will combine kernel and kernels from loader.conf(5). If kernels_autodetect is set in loader.conf(5), kernels will be autodetected from the current system.
Returns the default boot environment, nil if unset.
Returns a table of boot environments, or an empty table. These will be picked up using the bootenvs and bootenvs_count variables set by loader(8).
Resets ACPI, safe mode, single user, and verbose settings to their system defauilts.
Loads the kernel and specified modules, then invokes the autoboot loader(8) command with argstr as-is.
Loads the kernel and specified modules, then invokes the boot loader(8) command with argstr as-is.
Returns true if boot_single is set to yes.
Returns true if currdev is set to a zfs(8) dataset.
Returns true if we are booting over serial. This checks console, boot_serial, and boot_multicons.
Returns true if this bootloader was compiled as an i386 binary. This generally applies to i386 loaders as well as non-UEFI loaders on amd64.
Recursively deep copies tbl and returns the result.
Pops the front element off of tbl, and returns two return values: the front element, and the rest of the table. If there are no elements, this returns nil and nil. If there is one element, this returns the front element and an empty table. This will not operate on truly associative tables; numeric indices are required.

loader.conf(5), loader(8), menu.lua(8)

The core.lua file was originally written by Pedro Souza <>. Later work and this manual page was done by
Kyle Evans <>.
March 21, 2018 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.