finit logo

I’m very pleased to announce Finit v4.2! It comes seven months after the last release, v4.1, with a bunch of fixes and some new features. See the release notes for details.

One of the most notable fixes is legacy support for old vendor kernels that do not yet support cgroups v2 – this is now detected and disabled automatically by Finit.

Another neat feature is the support for early logging, using the kernel ring buffer, before any syslog daemon has started. This support is synchronized with the sysklogd v2.3 release which adds support for extracting non-kernel log messages from /dev/kmsg – other syslog daemons support this too, but sysklogd is the recommended syslog with Finit.

Try before you buy!

If you’re interesting in trying Finit out yourself, but haven’t got the time or patience to set it up. Here is a x86_64 VM image for QEMU on, based on myLinux.

Note: this is an example, with a limited number of services included. To use in a full-blown production system, you can quickly build your own image from a myLinux base. I recommend the Buildroot manual for help on how to extract the full potential of your system.

To start it up:

  1. Ensure you have QEMU installed, this varies depending on your preferred Linux distribution, on Linux Mint and other Debian derivatives:

    ~$ sudo apt install qemu-system-x86
    
  2. Download the image and untar it:

    ~$ cd ~/Downloads/
    ~/Downloads$ tar xf myLinux-2.0-dev.tar.xz
    
  3. Run the qemu.sh script, you can modify it to suit your needs:

    ~$ cd myLinux-2.0-dev
    ~/Downloads/myLinux-2.0-dev$ ./qemu.sh
    

You should see the bootstrap messages and a message at the end:

Please press Enter to activate this console.

Ctrl-a x – exit Qemu
Ctrl-a c – toggle Qemu console/monitor

No getty is spawned unless a user is active at the console, which in most headless deployments there isn’t. Let’s pretend we’re servicing this devie, and press enter – you are presented with a login prompt. The default username is root and for the first time login there is no password:

To allow SSH login, you must set a password, use passwd. When set you can connect to the QEMU virtual machine using:

~$ ssh -p 2222 root@localhost

Now you’re settled in and it’s time to get to know Finit. Play around a bit with initctl, it comes with limited built-in help initctl help, and there is much documentation available online, including man pages: initctl(8), finit(8), and finit.conf(5).

Try stopping and starting services. For instance, check the status of the sntpd service, notice the condition on a default route – check what happens when you remove the default route.

More on conditions in another blog post.

Have fun! :-)
/Joachim