Init diversity in buster and beyond

News and discussion about development of the Debian OS itself

Init diversity in buster and beyond

Postby Head_on_a_Stick » 2019-04-18 14:24

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
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Init diversity in buster and beyond

Postby Bulkley » 2019-04-18 14:53

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.
Last edited by Bulkley on 2019-04-18 15:00, edited 1 time in total.
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Init diversity in buster and beyond

Postby Head_on_a_Stick » 2019-04-18 14:58

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.
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Init diversity in buster and beyond

Postby Bulkley » 2019-04-18 15:07

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:
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Init diversity in buster and beyond

Postby Head_on_a_Stick » 2019-04-18 15:16

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".
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Init diversity in buster and beyond

Postby Head_on_a_Stick » 2019-04-18 15:20

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.
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Init diversity in buster and beyond

Postby golinux » 2019-04-18 15:21

@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
May the FORK be with you!
User avatar
golinux
 
Posts: 1501
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Init diversity in buster and beyond

Postby Bulkley » 2019-04-18 16:41

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.
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Init diversity in buster and beyond

Postby stevepusser » 2019-04-18 22:04

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. :(
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11097
Joined: 2009-10-06 05:53

Re: Init diversity in buster and beyond

Postby Bulkley » 2019-04-18 23:01

Steve, is anyone at MX considering abandoning sysvinit in favor of one of the choices listed by Head_on_a_Stick ?
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Init diversity in buster and beyond

Postby stevepusser » 2019-04-19 01:01

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11097
Joined: 2009-10-06 05:53

Re: Init diversity in buster and beyond

Postby golinux » 2019-04-19 01:14

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.
May the FORK be with you!
User avatar
golinux
 
Posts: 1501
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Init diversity in buster and beyond

Postby Bulkley » 2019-04-19 03:59

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.
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Init diversity in buster and beyond

Postby Head_on_a_Stick » 2019-04-19 08:39

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.
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Init diversity in buster and beyond

Postby golinux » 2019-04-27 19:48

FYI . . . Some exciting news! Debian sid without systemd!! This is a very good thing.
May the FORK be with you!
User avatar
golinux
 
Posts: 1501
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Next

Return to Debian Development

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable