FINIT(8)

πŸ“¦
version 4.14 Β· 3 versions
, in nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ¦‹ finit(8) β€” Fast init for Linux systems πŸ¦‹


🌸 NAME 🌸

finit β€” Fast init for Linux systems πŸ’–


✨ SYNOPSIS ✨

/sbin/finit -- [debug] [quiet] [rescue | recover] [single | S]
            [panic=SEC] [loglevel=<0-7>] [fsck.mode=[auto,skip,force]]
            [fsck.repair=[no,yes,preen]] [finit.debug=<true,false>]
            [finit.fstab=/path/to/fstab] [finit.cond=foo[,bar[,baz]]]
            [finit.config=/path/to/finit.conf]
            [finit.status_style=<classic,modern>]
            [finit.status=<on,off>]
/sbin/telinit [-hv] [q | Q | s | S | 0-9]

πŸ’… DESCRIPTION πŸ’…

Okay bestie, so finit is a fast init for Linux systems. No cap. It got reverse engineered from the EeePC fastinit like 10+ years ago by Claudio Matsuoka, and the vibe was literally "gaps filled with frog DNA ..." 🐸✨

It's main-character energy is aimed at small and embedded systems, but ngl it's fully usable on server and desktop systems too. Slay. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

When it's not started as PID 1, finit just behaves like telinit, following classic UNIX command line syntax. The options are:

  • -h β€” Show the built-in help text πŸ“–
  • -v β€” Show the program version πŸ‘€
More options are implemented for SysV init support, but bestie... they're ignored. πŸ’€

πŸ¦‹ ARGUMENTS πŸ¦‹

When it's not started as PID 1, finit (or telinit) takes these arguments:

  • q | Q β€” Reload configuration, same as initctl reload πŸ”„
  • 0 - 9 β€” Go to runlevel N, same as initctl reload N πŸš€
  • s | S β€” Go to single user mode, runlevel 1 🌱

πŸ‘‘ FEATURES πŸ‘‘

  • Runlevels, defined per service 🎚️
  • One-shot tasks, services (daemons), or SysV init start/stop scripts πŸ”§
  • Runparts and /etc/rc.local support πŸ“œ
  • Process supervision similar to systemd(8) πŸ‘€
  • Sourcing environment files 🌿
  • Conditions for network/process/custom dependencies πŸ•ΈοΈ
  • Process readiness notification for synchronizing system startup as well as reconfiguration at runtime. Natively PID files are used, but systemd sd_notify() and s6 notification is also supported. πŸ“£
  • Limited support for tmpfiles.d(5), no aging, attributes, or subvolumes πŸ—‚οΈ
  • Pre/Post script actions 🎬
  • Tooling to enable/disable services πŸ› οΈ
  • Built-in getty πŸ–₯️
  • Built-in watchdog, with support for hand-over to watchdogd: https://troglobit.com/watchdogd.html πŸ•
  • Built-in support for Debian/BusyBox /etc/network/interfaces 🌐
  • Cgroups v2, both configuration and monitoring in initctl top πŸ“Š
  • Plugin support for customization 🧩
  • Proper rescue mode with bundled sulogin for protected maintenance shell πŸš‘

🌈 BOOTPARAM 🌈

finit supports the following command line parameters to alter the behavior at boot. Notice the -- separator needed to tell the kernel which parameters should be given to PID 1. For more info on this, and on the available kernel command line options, see bootparam(7). πŸ“š

debug

Enable kernel debug. Debug messages are printed to the console until Finit starts up, unless loglevel=7 (below) is used. πŸ›

fsck.mode=<auto,force,skip>

Defaults to auto, unless Finit is built with configure --enable-fastboot, in which case the default is skip. ⚑

fsck.repair=<preen,yes,no>

Defaults to preen, unless Finit is built with configure --enable-fsckfix, in which case the default is yes. This configure option also sets fsck.mode=force, unless fastboot is also enabled. I.e., the configure --enable-fastboot build option overrides the fsck.mode default value. πŸ”

finit.cond=foo[,bar[,baz]]

Set the <boot/foo> condition. Optionally multiple conditions can be set using the same option, separated with a comma. Alternatively, multiple foo.cond=arg can be given. Each will result in a <boot/arg> condition being set to control the rest of the system bootstrap. πŸŽ›οΈ

Very useful for selecting different boot modes, e.g. manufacturing test, firmware upgrade, or rescue mode. 🏭

Note: <boot/...> conditions cannot be cleared with initctl! 😱

finit.config=/path/to/alternative/finit.conf

Override the compile-time bootstrap config file, default:

Useful when starting up in various rescue mode, factory, or production test setups. Use the top-level configuration file directive rcsd /path/to/finit.d to override the default rcS.d directory. πŸ—ΊοΈ

finit.debug

Enable Finit debug messages on system console and log. Sometimes useful when doing board bringup. Before the system log daemon has started, Finit uses the kernel ring buffer, /dev/kmsg. πŸ”

finit.fstab=/path/to/fstab.alt

Tell finit to use an alternate fstab to mount the file system from. Remember, this file must be on the root=... file system provided to Finit from the kernel. If this file is missing, finit falls back to its built-in default, which can be changed at build time using the --with-fstab=/path/to/footab configure option. It's even possible to completely disable the built-in using --without-fstab, meaning finit must be started with the finit.fstab option. 🧷

Should finit discover that there is no fstab file available, including the fallback, it triggers the same failure mode as when fsck fails, starting sulogin(8), if that is available. When sulogin is missing, or when the user exits from sulogin, the system is rebooted. πŸ”„

Default fstab, unless changed at build-time: /etc/fstab πŸ“„

finit.status=<on,off>

Control finit boot progress, including banner. This used to be called finit.show_status, which still works but is deprecated. ⚠️

finit.status_style=<classic,modern>

Set Finit boot progress style, when enabled. πŸ’«

loglevel=<0-7>

Set the kernel's log level, which is more granular than debug. Also, when loglevel=7, Finit will not disable kernel logs to the console. This is very useful when debugging the kernel at system bring-up. Since loglevel=7 is the same as debug this means you have to use quiet for a quiet boot, until sysklogd takes over logging of kernel events. 🀫

panic=SEC

By default the kernel does not reboot after a kernel panic. This setting will cause a kernel reboot after SEC seconds. πŸ’₯

quiet

Suppress kernel logging to console, except for warnings and errors. Also, see loglevel and quiet above. 🀐

rescue | recover

Start rescue/maintenance mode. If your system comes with the bundled sulogin program (Finit, or from util-linux/Busybox), you'll be given a root login to a maintenance shell. However, if sulogin is missing, the file /lib/finit/rescue.conf is read and the system booted in a limited fallback mode. See finit.conf(5) for more information. 🚨

single | S

Single user mode, runlevel 1, in Finit. Useful to debug problems with the regular runlevel. All services and TTYs in [1] will be started, e.g., a tty [1] @console nologin configuration presents you with a root console without login. πŸ–€

Note: by definition, single user mode does not have networking enabled. This is also true for runlevel 1. πŸ“΅

🧚 BOOTING 🧚

Before launching services, the system needs to be bootstrapped. This involves mounting all filesystems (not already mounted by an initramfs) in /etc/fstab, or any alternate fstab file provided on the Finit command line using finit.fstab, ensuring that necessary filesystems like: /dev, /proc, /sys, and /run are available and can provide the system with the services required. πŸ—‚οΈ

With that out of the way, a set of plugins take over:

  • bootmisc.so β€” Cleans up stale files from previous boots and default directories are created in tmpfs filesystems 🧹
  • modprobe.so β€” Probes kernel modules required by the system πŸ”Œ
  • procps.so β€” Set kernel variables from /etc/sysctl.conf et al βš™οΈ

When the plugins are done, finit reads /etc/finit.conf and all other enabled services in /etc/finit.d/*. First all services, run/tasks in runlevel S (bootStrap) are started. When all run/tasks have completed, Finit changes to the configured runlevel (default 2). Processes are started in parallel, in dependency order according to their conditions. πŸš€

When all services and run/tasks have been started, the console progress is disabled and all configured getty services are started. πŸ–₯️


πŸ’œ CONDITIONS πŸ’œ

The condition subsystem in Finit was initially created to track PID files of daemons. If service/task B requires service A to have started, Finit waits for the PID file of service A to be created/updated before it starts service B. Conversely, if service A is stopped and its PID file removed, service B is also stopped. πŸ”—

The following condition families are available today:

  • net β€” Linux netlink events, e.g. net/route/default, net/eth0/up, and net/et0/running 🌐
  • pid β€” PID files based on the service declaration name:id, gives the condition pid/name:id πŸ†”
  • service β€” Tracks run/task/service state transitions, including readiness. E.g., service/foo/ready can be used as a condition for service bar, provided foo properly signals its readiness to Finit. πŸ“Ά
  • sys β€” System conditions, e.g. sys/key/ctrlaltdel and sys/pwr/fail πŸ–²οΈ
  • usr β€” User conditions, assert and deassert using initctl cond [set|clr] foo πŸ§‘β€πŸ’»

⭐ SIGNALS ⭐

PID 1 is the only process that by default blocks all signals. Finit allows for the following signals to control operation, but recommends instead using the initctl(8) tool. πŸ“‘

  • HUP β€” Tell finit to reload its configuration file(s), same as initctl reload πŸ”„
  • USR1 β€” Restart API (initctl) socket. πŸ”Œ
  • USR2 β€” Tell finit to perform a system shutdown, same as initctl poweroff πŸŒ™
  • TERM β€” Like SIGUSR2 but performs a reboot, same as initctl reboot πŸ”
  • INT β€” Sent from kernel when Ctrl-Alt-Del is pressed (on the console), this asserts the sys/key/ctrlaltdel condition, which can be used to start tasks or services ⌨️
  • PWR β€” Sent from a a power daemon on changes to UPS status, Finit asserts the sys/pwr/fail condition πŸ”‹

πŸ“ FILES πŸ“

Okay so here's where everything lives, bestie. Memorize these paths or perish πŸ’€

  • /etc/finit.conf β€” the main character config file. This is the one. The big one. Your whole boot vibe lives here.
  • /etc/finit.d/*.conf β€” static service definitions. Like, the services that are just there, no questions asked, no symlink drama ✨
  • /etc/finit.d/available/*.conf β€” the available services. Think of this like your closet: everything's in here, but nothing's actually on yet πŸŽ€
  • /etc/finit.d/enabled/*.conf β€” symlinks from available. This is the outfit you actually chose today. Whatever's symlinked here is what's enabled, periodt πŸ’…
  • /run/finit/ β€” runtime files, and yes, that includes the condition subsystem. Everything that's alive and breathing at runtime chills here 🌸
Quick vibe check: available is the catalog, enabled is the curation. You don't edit files in enabled β€” you symlink into it from available. That's the whole trick, iykyk πŸ¦‹

πŸ‘€ SEE ALSO πŸ‘€

Go read these next, fr fr, they're all part of the same cinematic universe:

  • finit.conf(5) β€” the config file man page. Read this one, seriously 😭
  • initctl(8) β€” the control interface for talking to your init at runtime
  • tmpfiles.d(5) β€” the tmpfiles.d situation, for all your temp-file needs πŸ“

πŸ‘‘ AUTHORS πŸ‘‘

Okay so storytime, and it's kind of iconic:

  • finit was conceived and reverse engineered by Claudio Matsuoka 🧚
  • Since v1.0, it's been maintained by Joachim Wiberg πŸ’œ
  • ...with contributions by many others 🌈

The way that a whole init system got reverse engineered into existence and then handed off to a maintainer and then fed by a whole community of contributors?? That's not just a project, that's a legacy ✨


And that's the whole page, bestie! 🫢 This one's from the Linux manual, dated Jul 9, 2025, and it's page FINIT(8). Go forth and boot responsibly πŸ’–πŸŒΈπŸ’…

πŸ“¦ where this page comes from