Page 1 of 2

Init diversity in buster and beyond

Posted: 2019-04-18 14:24
by Head_on_a_Stick
Background: https://lwn.net/Articles/770093/

As the Debian buster release approaches I thought it was a good time to take stock of the alternative init systems available in Debian.

The choices are decided by the init metapackage, which has three possible dependencies in buster: The runit option is new but was available in stretch until I made a bug report about it and got it removed just before the release (sorry).

To change PID1 simply install one of the alternative dependencies.

The old systemd-shim package was orphaned almost three years ago[1] and has now been removed from buster so it is no longer possible to have systemd co-installed with the alternatives.

At the moment, to use either sysvinit or runit as PID1 (init) it is necessary to add your user to the input group to allow the keyboard & mouse and other input devices to work in the graphical desktop:

Code: Select all

# adduser $user input
(Replace $user with the actual user name.)

Note that this is not advisable for a multi-user system because input device snooping then becomes a trivial matter for all users.

I should probably submit a bug report about this but I am worried about getting the alternatives removed (again). Hopefully it will be sorted for the official release.

It is also possible to use OpenRC for process supervision if sysvinit is running as PID1, simply installing the openrc package makes the switch automatically and allows for full process supervision (which is not available with pure sysvinit).

Likewise, the plain runit package can perform process supervision for sysvinit but I don't really see the point of this now that runit-init is an option.

Of the three options I prefer runit-init because of the tiny codebase, especially compared to the systemd behemoth.

FAQ here: http://smarden.org/runit/faq.html

Re: Init diversity in buster and beyond

Posted: 2019-04-18 14:53
by Bulkley
It is also possible to use OpenRC for process supervision if sysvinit is running as PID1, simply installing the openrc package makes the switch automatically and allows for full process supervision (which is not available with pure sysvinit).
In Buster, does not openrc-init run as PID1 ? Sorry, I can't find a good way to tell for sure but my Stretch boot clearly identifies Openrc.

BTW, S6 is in Buster. S6 is identified as a "small and secure supervision software suite" but I think it includes s6-linux-init. I admit that configuring it is over my head complicated but it's available.

Re: Init diversity in buster and beyond

Posted: 2019-04-18 14:58
by Head_on_a_Stick
Bulkley wrote:In Buster, does not openrc-init run as PID1 ?
The openrc package in buster does supply /sbin/openrc-init but I can't get it to boot to a login prompt.

It works in Devuan though: https://dev1galaxy.org/viewtopic.php?id=2788

But Devuan's init metapackage doesn't offer runit-init as an alternative dependency, strangely.

Re: Init diversity in buster and beyond

Posted: 2019-04-18 15:07
by Bulkley
When you installed openrc did you do

Code: Select all

for file in /etc/rc0.d/K*; do s=`basename $(readlink "$file")` ; /etc/init.d/$s stop; done
as instructed? I found that to be critical.

Having said that, I admit that I have had no success with doing anything I like in Buster. :twisted:

Re: Init diversity in buster and beyond

Posted: 2019-04-18 15:16
by Head_on_a_Stick
All that command does is shut down any running services.

You will be using sysvinit as PID1 with OpenRC providing the process supervision, confirm this with

Code: Select all

cat /proc/1/comm
which should return "init" rather than "openrc-init".

Re: Init diversity in buster and beyond

Posted: 2019-04-18 15:20
by Head_on_a_Stick
Bulkley wrote:S6 is in Buster
Ah yes, thanks, I forgot about that.

I will try that now and see how it goes...
Bulkley wrote:I think it includes s6-linux-init
No, it does not, sadly:

https://packages.debian.org/buster/amd64/s6/filelist

And anyway it is not listed as an alternative dependency for the init metapackage and so could not be easily substituted even if it did provide s6-init.

Re: Init diversity in buster and beyond

Posted: 2019-04-18 15:21
by golinux
@Buckley . . . Skarnet gave two s6 presentations at the Devuan conference a few weeks ago. Video has not been edited yet - just the raw stream - but might be worth a look for you. Second one prefaced an s6 hacking session for Devuan (which I did not attend because I'm just taking baby steps):

"Demystifying init" by Skarnet - https://youtu.be/I7qE43KK5bY?t=7622
“Devuan with s6 and s6-rc” by Skarnet https://youtu.be/_ULy7jBnXdo?t=1220

Re: Init diversity in buster and beyond

Posted: 2019-04-18 16:41
by Bulkley
Thanks. I won't pretend to know all of what those guys are talking about on the videos. What interests me is that they are talking about it.

Re: Init diversity in buster and beyond

Posted: 2019-04-18 22:04
by stevepusser
I believe that to use sysvinit on Buster, you also need to recompile policykit with a small patch and configuration changes to use elogind and libpam-elogind instead of systemd and libpam-systemd; at least that's part of Devuan is doing and what we are doing with MX and antiX for that base. So far, it doesn't look possible to offer the alternative systemd boot like we are currently do, though. :(

Re: Init diversity in buster and beyond

Posted: 2019-04-18 23:01
by Bulkley
Steve, is anyone at MX considering abandoning sysvinit in favor of one of the choices listed by Head_on_a_Stick ?

Re: Init diversity in buster and beyond

Posted: 2019-04-19 01:01
by stevepusser
We're looking at what can be done, but I don't know if any of them can coexist on the same system as systemd any longer. Pretty much all the commercial VPNs you can install depend on systemd running, as well a lot of other third party programs like Plex.

There is an informal poll on the MX forums now asking what users are booting MX with, and right now it's 65 for the default sysvinit, 3 for systemd, 2 for either depending on the situation, and two for "what's an init system" (count that for the default). A lot of that is going to be the tyranny of the default, though.

Re: Init diversity in buster and beyond

Posted: 2019-04-19 01:14
by golinux
stevepusser wrote:We're looking at what can be done, but I don't know if any of them can coexist on the same system as systemd any longer.
Exactly. Many of us could see the lock-in coming years ago. Not only init but also user space. Perhaps some day we can work together toward modularity, software diversity and init freedom.

Re: Init diversity in buster and beyond

Posted: 2019-04-19 03:59
by Bulkley
stevepusser wrote:Pretty much all the commercial VPNs you can install depend on systemd running, as well a lot of other third party programs like Plex.
Really? Since most computer users run Windows, Apple or various hand-helds that looks to be self defeating.

Re: Init diversity in buster and beyond

Posted: 2019-04-19 08:39
by Head_on_a_Stick
stevepusser wrote:I believe that to use sysvinit on Buster, you also need to recompile policykit with a small patch and configuration changes to use elogind and libpam-elogind instead of systemd and libpam-systemd
That would only be needed if the user wanted to run policykit.

I don't use policykit and swiching from systemd to runit-init has even allowed me to ditch dbus as well, which is fantastic.

As I see it, anybody who doesn't like systemd because of the excessive codebase is likely to prefer plain window managers over bloated desktop environments anyway.

Re: Init diversity in buster and beyond

Posted: 2019-04-27 19:48
by golinux
FYI . . . Some exciting news! Debian sid without systemd!! This is a very good thing.

Re: Init diversity in buster and beyond

Posted: 2019-04-27 22:24
by stevepusser
Bulkley wrote:
stevepusser wrote:Pretty much all the commercial VPNs you can install depend on systemd running, as well a lot of other third party programs like Plex.
Really? Since most computer users run Windows, Apple or various hand-helds that looks to be self defeating.
OK, I meant the Linux versions of those programs, if you need that clarified.

Re: Init diversity in buster and beyond

Posted: 2019-04-27 23:20
by Head_on_a_Stick
That is amazing news, thanks for the heads-up.
stevepusser wrote:Pretty much all the commercial VPNs you can install depend on systemd running
No, they only depend on systemd unit files to start the services.

Those unit files can be translated to sysvinit scripts to allow them to work without systemd, here's an example:

https://github.com/MX-Linux/piavpn-sysvinit-compat

Re: Init diversity in buster and beyond

Posted: 2019-04-30 21:32
by golinux
And now this awesome report . . . gnome isn't exactly awesome but the fact that's it's working without systemd is quite an accomplishment. I hope this patch gets pushed up to Debian. Maybe it already has:

Thank you to whoever got Gnome desktop running [on Devuan].

Would be interesting to know if it's possible to run gnome on Debian/sysvinit with elogind. If anyone's feeling adventurous, maybe give it a try . . .

Re: Init diversity in buster and beyond

Posted: 2019-05-01 16:37
by Head_on_a_Stick
golinux wrote:Would be interesting to know if it's possible to run gnome on Debian/sysvinit with elogind
No, it is not.

I'm running GNOME in buster at the moment:

Code: Select all

shinken:~$ apt-get install -s sysvinit-core elogind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 policykit-1 : Depends: libpam-systemd but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
shinken:~100$
The libpam-systemd package is needed by lots of the GNOME components and there is no systemd-shim package to replace it any more.

Re: Init diversity in buster and beyond

Posted: 2019-05-13 21:55
by Bulkley
Breaking News: VOID – S6 – Obarun’s 66 – musl

systemd-free linux community
If there was a war front against systemd and the axis powers, Void and Obarun seem to have crossed deep into enemy lines.
There's probably a snag somewhere but it's good to know people are working on it.

Full marks go to the developers at Devuan, MX, Antix, and a host of other projects that keep hacking away at this.