66

Software

obarun.org

boot

Meant to be run as pid 1 as a stage1 init. Performs the necessary early system preparation and execs into scandir start.

Interface

boot [ -h ] [ -c ] [ -m ] [ -s skel ] [ -l log_user ] [ -e environment ] [ -d dev ] [ -b banner ]

This program performs some early preparations, forks a stage2 process that brings up the enabled trees and then execs into scandir start.

Exit codes

Command boot never exits. It forks stage2 and execs into scandir start which runs forever until the machine stops or reboots.

Options

Early preparation

When booting a system, command boot performs the following operations:

In the unusual event that any of the above processes fail, command boot will try to launch a single-user login namely sulogin to provide the means to repair the system.

Skeleton files

Skeleton files are mandatory and must exist on your system to be able to boot the machine properly. By default those files are installed at /etc/66. Use the -D skeleton-dir=DIR option at compile time to change it.

Kernel command line

Any valid key=value pair set at the init.conf skeleton file can be passed on the kernel command line as parameter:

BOOT_IMAGE=../vmlinuz-linux root=/dev/sda3 ro vga=895 initrd=../intel-ucode.img,../initramfs-linux.img TREE=boot VERBOSITY=4

Environment importation

The keys of the init.conf file are read by boot itself; a key given on the kernel command line takes precedence over the same key of the init.conf file. Of these keys, only PATH and VERBOSITY are passed on in the environment.

The environment of the processes launched by the boot is built in the following order. For any key=value pair, the last one encountered takes precedence:

The scandir create and tree init invocations run before the directories are imported, so they see only PATH and VERBOSITY from the init.conf file or the kernel command line. Everything that starts after them, the scandir, stage2 and every service, sees the complete environment: a VERBOSITY set in /etc/66/environment or in the -e directory replaces the one of the init.conf file.

See also