Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix cross-nightly manual

This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.

NAME

kernel — operating system kernel

SYNOPSIS

/boot/sortix.bin [--console=terminal] [--disable-em] [--disable-network-drivers] [--disable-logo] [--enable-em] [--enable-network-drivers] [--enable-logo] [--firmware=[bios | efi | pc]] [--no-random-seed] [--term=terminal] [--] [init ...]

DESCRIPTION

/boot/sortix.bin is the operating system kernel. It initializes and manages the hardware to provide a multitasking computing environment. The kernel is a multiboot(7) compatible executable loaded by the bootloader along with a companion initrd(7) that contains a userland.
The kernel extracts the initrd into the initial kernel memory root filesystem. The specified init program is invoked with the given arguments, defaulting to the init(8) at /sbin/init if init is not specified. If the init is to receive any argument starting with a dash, first pass the -- delimiter to stop kernel option parsing. The computer is powered off if the init process exits 0, rebooted if it exits 1, halted with an complaint about an init fatality if it exits 2, and halted with a complaint about an unexpected exit code otherwise.
The options are as follows:
--console=terminal
Use the terminal as the console and the session for init(8) along with options for initializing the terminal. The choices are:
comn[,[BBBBPN][,columnsxrows]]
Use the com(4) serial line; optionally initializing it with the speed BBBB, with the parity P being either n for no parity, o for odd parity, or e for even parity, and N is the number of bits per character; and optionally initializing the terminal window size to the selected columns and rows or 80x25 by default. The --term option is useful to select the TERM environment variable.
This choice currently disables the tty1 terminal because its logterminal driver needs a major restructuring.
tty1
Use the tty1 virtual terminal as the console. This terminal is the default console.
--disable-em
Don't initialize the em(4) driver.
--disable-logo
Don't display the operating system boot on the console during boot.
--disable-network-drivers
Don't initialize any network drivers. This option ensures the booted system is not networked.
--enable-em
Do initialize the em(4) driver.
--enable-logo
Display the operating system boot on the console during boot. This is the default behavior.
--enable-network-drivers
Do initialize network drivers. This is the default behavior.
--firmware=[bios | efi | pc]
Informs the kernel the system is booted using bios or efi. The pc value is a synonym for bios.
--no-random-seed
Don't warn if no random seed file was loaded by the bootloader (usually from /boot/random.seed). This option is useful for live environments where this situation is unavoidable.
--term=terminal
Set the TERM environment variable to the selected terminal. This option is useful in combination with selecting a serial line as the --console. The default TERM is sortix.
The kernel accepts multiboot modules from the bootloader, which are processed in order. The initrd(7) must be passed through this mechanism.
The format of each multiboot module is automatically detected by default:
  • tar(7) archives in the ustar format are extracted into the root directory. The bootloader must already have decompressed the archive.
Each multiboot module has its own command line where the options are as follows:
--append-to=file
Append the contents of the module to the specifed file, creating it with mode 644 if it doesn't exist. Non-existent parent directories are created with mode 755 as needed.
--create-to=file
Create the specified file with mode 644 with contents of the module, but only if it doesn't already exist. No action is taken if the file already existed. Non-existent parent directories are created with mode 755 as needed.
--random-seed
The module contains random data used to seed the kernel entropy gathering. This file is supposed to contain 256 bytes of secret randomness that hasn't been used before. Recycling the random seed is dangerous and insecure. Omitting the random seed will cause the kernel entropy to be collected in the background, which will take some time and system usage before it is secure. with the current time and other readily available information. The bootloader normally loads the random seed from /boot/random.seed.
--to=file
Write the contents of the module to the specifed file, creating it with mode 644 if it doesn't exist, and truncating it if it does exist. Non-existent parent directories are created with mode 755 as needed.

SEE ALSO

initrd(7), init(8)
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org