staff note: moved from an older but related topic
The take-over of Debian by the cult of systemd provoked me to explore alternative init systems. How difficult could it be to initialize Linux that systemd's 550,000 lines of code is the best solution? What was actually wrong with sysvinit anyway?
There are, of course, many alternative init systems that work for Linux; OpenRC and UpStart are just the systems that featured in the debate over Debian.
Before Devuan was announced, I started playing with the Epoch init system as a way of starting Debian 7. Epoch is a complete solution for managing the Linux init process [universe2.us]. Epoch was written by the elusive "subsentient", and explained by Steve Litt in his paper "The Manjaro Experiments" [troubleshooters.com]. The latter provided all I needed to use Epoch to start Debian 7 [and later Debian 8].
Epoch expends much of its 10,000 lines of C in making sure that the daemons that it starts stay alive. That activity seems to pre-occupy all of the major init systems. Why? Why should we expect daemons to die all over the place? Discuss.
I have been using Epoch to init devuan-jessie-netboot-amd64-alpha2.iso. All good so far. I am sure that there are more recent ISOs available, but this is all I could find.
More recently, I have been using sinit [suckless.org; author "sin"] instead to start Devuan. The reason I was attracted to sinit is that it is small: sinit itself is just 56 lines of C, and the required "rc.init" script is about another 70. I decided to dispense with a Display Manager, and just start the XFCE4 desktop with the startxcfe4 command.
Steve Litt suggests using daemontools-encore [untroubled.org] as a way of managing the daemons created in the init process. I may give-in and use such software - when my daemons start dying.
I was concerned that the activities of the initrd file system were hidden from view, so I decompressed it and took a look: it actually did nothing of any importance for me. So I took the example of CRUX Linux, which has no initrd file system, and recompiled my kernel with its .config file [with minor adjustments]. It actually needs very few kernel modules, with all the code needed to boot compiled into the kernel itself. Of course, if I needed to encrypt my root file system, then initrd would still be needed.
With all this, I have retained the option to use the original Devuan kernel with sinit, Epoch or SysVinit using a hand-crafted GRUB file. I use the "init=/etc/sinit/sinit" GRUB clause to replace the init, putting all the neccesary files in the /etc/sinit directory for the sake of simplicity.
Since I start udev in my rc.init script, I assume that switching to vdev would be simple enough in due course, although I would prefer that it is in the Devuan 1.0 repositories first.
Of course, this work cannot be seen as a solution that can be picked up by others and used "as is". It is a personal journey to answer the question: how hard can it be [to replace systemd or sysvinit]? For myself, the answer is "not hard". Yet how much effort was expended in just debating the issue for Debian. I wrote only a hand full of lines of "dash" script in these explorations, and no C code.
I am not sure if Devuan needs a replacement init system, but there are many solutions out there just waiting, none of them as big and unweildy as systemd.