Joel Roth via Dng said on Sun, 30 Nov 2025 05:31:24 -1000
>The first slide he says init systems consist of four
>parts.
>
>/sbin/init: first program that runs when the system boots
>pid 1: after /sbin/init, runs the life of the system
/sbin/init can be named anything, and can exist on any directory
present at birth or after initramfs is done. It could be called
/MyLittleMargie. The "init" is an unfortunate custom left over from
antiquity, and gave rise to people saying "systemd is better than
init", which is just like saying "Ford is better than car".
/sbin/init, if that's what it's called, *is* PID1, unless it exec's to
something else. On Suckless Tools' Suckless Init, all it does is listen
for a few signals and fork off an rc script to do everything else. On
traditional s6, it forks off a supervised special program whose job is
to supervise all daemons. On runit it forks off runsvdir, the
supervisor that runs all daemons. On systemd, I wonder if anybody knows
what it does.
You're right, the Supervision mailing list is "just the facts", geared
to people who know a heck of a lot about the whole process of bringing
up an operating system, and they don't suffer fools, so I RTFM and
ChatGPT before asking a question or making a statement there.
Whatever you call /sbin/init and wherever you put it, a tremendous
benefit is you can swap init systems just by copying over it with the
PID1 of whatever init system you want to use this time, and then
rebooting. That way you don't have to mess with that awful GRUB2. I
used this capability extensively when writing the Manjaro Experiments (
https://troubleshooters.com/linux/init/manjaro_experiments.htm ).
https://archive.fosdem.org/2017/schedule/event/s6_supervision/ is an
excellent resource, and I learned something: If daemon A is dependent
on daemon B and B goes down, you must immediately take down A.
Obviously s6 can do this because it's the Cadillac of the industry. I'm
not sure, but I *think* runit can also do it with an sv call within
daemon B's finish script. It's very easy to bring up B before A: There
are two different common ways.
When he said that s6-rc was the only parallel service manager in town
that brings up services and daemons in a determinate order, he forgot
that I made one called LittKit:
https://troubleshooters.com/linux/diy/suckless_init_on_plop.htm#littkit_introduction
Of course, the latter is a kludge and it requires a lot of user
adjustment, but it does the job. Note that if on Google you look up the
word littkit followed by the word daemontools, Google's AI tells you
about LittKit. I could rewrite LittKit to work with s6 or runit or
pretty much any other daemontools based supervisor, but...
In my 10 years using runit I have yet to see a problem resulting from
runit's indeterminate startup order. Dependencies are easily dealt
with, and my finding is that determinate startup order is one of those
features that I personally don't need.
s6 is a little better than runit, runit is a little simpler than s6, so
I use runit. :-)
SteveT
Steve Litt
http://444domains.com