Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Init diversity in buster and beyond

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Message
Author
User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Init diversity in buster and beyond

#1 Post 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
deadbang

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#2 Post 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.
Last edited by Bulkley on 2019-04-18 15:00, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#3 Post 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.
deadbang

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#4 Post 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:

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#5 Post 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".
deadbang

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#6 Post 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.
deadbang

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Init diversity in buster and beyond

#7 Post 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
May the FORK be with you!

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#8 Post 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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Init diversity in buster and beyond

#9 Post 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. :(
MX Linux packager and developer

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#10 Post by Bulkley »

Steve, is anyone at MX considering abandoning sysvinit in favor of one of the choices listed by Head_on_a_Stick ?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Init diversity in buster and beyond

#11 Post 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.
MX Linux packager and developer

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Init diversity in buster and beyond

#12 Post 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.
May the FORK be with you!

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#13 Post 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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#14 Post 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.
deadbang

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Init diversity in buster and beyond

#15 Post by golinux »

FYI . . . Some exciting news! Debian sid without systemd!! This is a very good thing.
May the FORK be with you!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Init diversity in buster and beyond

#16 Post 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.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#17 Post 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
deadbang

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Init diversity in buster and beyond

#18 Post 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 . . .
May the FORK be with you!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Init diversity in buster and beyond

#19 Post 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.
deadbang

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Init diversity in buster and beyond

#20 Post 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.

Post Reply