fpinit
is a modified version of sinit which makes use of script to execute init scripts in parallel.
In its current state, fpinit
is usable as a system's full-time init, but it (somewhat by design) lacks process supervision, meaning it does nothing other than boot and halt the system.
fpinit
booting Alpine Linux in a QEMU VM:
fpinit
contains script
as a module, meaning:
$ git submodule update --init --recursive --remote
Will clone the latest version of script
(--init
is only necessary for first clone). fpinit
can be compiled with:
$ make
And installed with (this will not overwrite any important init scripts or files -- everything is entirely self-contained within /usr/local
):
# make install
To use fpinit
as the system init, the kernel parameter:
init=/usr/local/bin/fpinit
Must be added to the kernel's configuration, likely through bootloader (i.e. GRUB/LILO/Syslinux) or EFI boot entry configuration.
The scripts available in fpinit.d/
and fphalt.d/
are a stripped-down and modified subset of Void's runit scripts, stali's sinit scripts, and Alpine's openrc scripts, doing slightly more than the absolute minimum necessary for a usable system. Right now, they are tested and intended to work on Alpine, however all Alpine/busybox-specific behavior has alternatives which will be used automatically if necessary. Specifically, this includes:
agetty
: preferred overgetty
mdev
: preferred over(e)udev
udhcpc
: preferred overdhcpcd
(which is preferred overdhclient
)
Additionally, there exist a number of scripts in fpinit.extra.d/
which provide non-essential nice-to-haves (e.g. ntpd, sshd, etc.), with the steps to install them being the same as for user-created scripts (detailed below).
Because script
is configuration-free by design, any executable file can be placed into /usr/local/share/fpinit.d/
or /usr/local/share/fphalt.d/
. As fpinit
lacks process supervision, there is currently no built-in way to create services or recurrent tasks, however POSIX setsid
and bash's disown
can achieve similar behavior (see 4-tty.sh)
- Fix(/investigate) sending SIGINT to busybox
udhcpc
andlogin
causing system hang