Synit uses the Linux kernel as a hardware abstraction and virtualisation layer.
init is PID 1, and thus the root of the tree of processes according to the kernel, it
is not the root of the supervision tree. The
init process, acting as management daemon for
the kernel from Synit's perspective, is "supervised" by the system bus like all other
services. The supervision tree is a Synit concept, not a Linux concept.
The kernel first loads the stock PostmarketOS
initrd, which performs a number of important
tasks and then delegates to
synit-config package overrides the usual contents of
/sbin/init, replacing it with a short shell script,
synit-init.sh. This script, in turn,
takes care of a few boring tasks such as mounting
/run, etc., ensuring that
a few important directories exist, and remounting
/ as read-write before
For the remainder of the lifetime of the system,
/sbin/synit-pid1 is the PID 1
synit-pid1 program starts by spawning the system bus
syndicate-server in the process tree above) and the program
stderr of the former to
stdin of the latter.
It then goes on to perform two tasks concurrently: the first is the Unix
init role, reaping zombie processes, and the second is
to interact with the system bus as an ordinary system service.
The latter allows the system to treat
init just like any other part of the system, accessing
its abilities to reboot or power off the system using messages and assertions in the system
dataspace as usual.
synit-pid1 is, to the kernel, a parent process of
syndicate-server, it is
logically a child process.
- Source code:
This short shell script invokes the S6 program
s6-log to capture log
output from the system bus, directing it to files in