News for hackers. Stuff that matters.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by beefhash on Sunday June 18, 2017 @01:47AM (#14579167)
HEADLINE

First-class init that is not systemd

DESCRIPTION

I believe it's notorious that systemd is highly controversial, even spinning off a fork called Devuan. It might be more favorable to reunite the community by including one alternative init system that is, fundamentally, a first-class citizen in the Debian ecosystem.

"First-class" implies that the user is given a choice on new installations in a specified prompt. The default should be the option "systemd (recommended)".

DISTRIBUTION

buster+1 given the expected effort

ROLE/AFFILIATION

Individual and hobbyist system administrator

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JoshTriplett on Sunday June 18, 2017 @02:26AM (#14579291)
Debian is already one of the few distributions that goes out of its way to provide support for non-systemd init systems. Beyond that, it would help if a non-systemd init system as capable as systemd existed; if one did, I'm sure that Debian would include it and support it. This is a case where the problem isn't "please package and support", it's "please develop".
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by rxlim on Sunday June 18, 2017 @02:41AM (#14579333)
> Debian is already one of the few distributions that goes out of its way to provide support for non-systemd init systems.

How does this manifest itself in practice? I don't want to use systemd in Debian 9, what has been done so I can easily change to another init like runit?

In practice it's not possible because of so many (unecessary) dependencies on systemd.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JoshTriplett on Sunday June 18, 2017 @02:54AM (#14579366)
It means that you can install sysvinit or any sysvinit-compatible init, and all daemon packages still provide init scripts, as painful as that is. And Debian still supports installing systemd-shim instead of systemd, so you can have a desktop system with a non-systemd init and it'll still function.

> In practice it's not possible because of so many (unecessary) dependencies on systemd.

Such as? As far as I can tell, almost nothing depends on systemd. A handful of things depend on libpam-systemd (for session management), which functions with systemd-shim.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by rxlim on Sunday June 18, 2017 @03:05AM (#14579390)
The amount of work that goes into Devuan for pulling out systemd of Debian Jessie is clear evidence that what you are saying is not easily possible.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JoshTriplett on Sunday June 18, 2017 @03:25AM (#14579449)
As I understand it, much of that work goes into removing any trace of even innocuous things like libsystemd, which is used by applications that want to support systemd if available. All the necessary work to support a non-systemd init is already in Debian, making Devuan fairly pointless in practice.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by eeZah7Ux on Sunday June 18, 2017 @08:39AM (#14580393)
That's correct. Debian ships sysvinit as well as systemd and daemons have initscripts/confs for both.

A lot of people still use sysvinit and it just works.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by rxlim on Sunday June 18, 2017 @10:31AM (#14580789)
If this is really true, I might have to eat my own words.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by agwa on Sunday June 18, 2017 @01:37PM (#14581820)
Yes, it's true.

To replace PID 1 with sysvinit, run:

  apt-get install sysvinit-core systemd-sysv-
  reboot
To prevent it from coming back, create the file /etc/apt/preferences.d/no-systemd.pref containing:

  Package: systemd-sysv
  Pin: origin *
  Pin-Priority: -1
This works great on servers and lightweight desktops. As others have noted, if you want GNOME you also need to install systemd-shim. I have no experience with this, but I have no reason to doubt that it works.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JoshTriplett on Sunday June 18, 2017 @12:15PM (#14581319)
If you do run into cases where something doesn't work as expected with sysvinit instead of systemd, please do file a bug.

For that matter, if this is a use case you care about, systemd-shim could use a maintainer or maintenance team: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832508

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by sjukfan on Wednesday June 21, 2017 @01:06PM (#14605688)
I'm running openRC on all my systems and the problem is usually dependencies. As an example, both Brasero and K3b depends on something that depends on systemd. I can understand if a program uses the systemd library but these need systemd as pid 1 because reasons.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by jameskegel on Sunday June 18, 2017 @02:28AM (#14579298)
I would love some type of toggle, or "last chance to turn back" during install as far as being able to signal what type of init system I'd like to use.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JdeBP on Sunday June 18, 2017 @06:38AM (#14580024)
The problem is that no-one has incorporated a modification to the Debian installer to have this. There are so-called "preseed" hooks that one can use to manually alter what packages the Debian installer installs. Putting in place pre-seed hooks that permitted something other than systemd to be installed ab initio was one of the first things that the Devuan people did, about two and a half years ago.

But no-one to my knowledge has yet done the work to give the Debian installer this capability without the need for pre-seed hooks, as a menu item/checkbox/question for the administrator to pick/tick/answer. Such work is more than merely writing code, note. It involves testing it too. Thoroughly.

* https://wiki.debian.org/DebianInstaller/Preseed

* https://wiki.debian.org/systemd#Installing_without_systemd

Ironically, this was once a problem the other way around. Attempted changes to enable administrators to select systemd at install time (and indeed upstart, as you can see) failed to make it past a Debian gatekeeper.

* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668001

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by jlgaddis on Sunday June 18, 2017 @09:59AM (#14580654)
Oh man, preseed is a pain in the ass too. I wish they'd support using kickstart files or that there were a kickstart to preseed conversion/migration tool.
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by ZenoArrow on Sunday June 18, 2017 @05:54AM (#14579880)
What do you dislike about systemd? Do you disagree with the ideas behind it, or is your discontentment more about the specific implementation of those ideas? Can you give examples?
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by falcolas on Sunday June 18, 2017 @10:50AM (#14580879)
Not the OP, but:

- It's effectively a black box that nobody but the systemd team really understands; and the response by said team to problems with systemd too often defaults to "you're doing it wrong"

- Systemd is not just an init system, it's a message bus, authentication system, logging system, container management system, xinitd system, and any other number of highly coupled systems.

- Service startup order can still be non-deterministic and fairly slow; hard init problems have been made harder, while easy init problems "only" remain easy.

- Unit files can be stored in a minimum of four separate locations on disk, and this can be increased dynamically.

- Failures are opaque, and the failure of systemd triggers the failure of the entire system.

The original idea that drove systemd's creation is still fairly sound: create a simple, deterministic, and parallel init system which is better than initv. The implementation doesn't live up to those goals, and instead of iterating against that goal, the team's focus has shifted to take over all aspects of the Linux runtime which isn't managed by the kernel.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by majewsky on Sunday June 18, 2017 @04:41PM (#14582809)
> - It's effectively a black box that nobody but the systemd team really understands; and the response by said team to problems with systemd too often defaults to "you're doing it wrong"

I'm seeing this attitude a lot. Just last week, at our Linux User Group meeting, someone brought in a notebook with Debian 9, which didn't boot up correctly because drives were not detected.

The issue turned out to be really simple (udevd is started after `udevadm trigger`, so device files do not get created), and I advised them to file a bugreport with Debian about this. But it still took over an hour to diagnose because everyone around me was bickering how impossible it was to diagnose anything with systemd, whereas I just looked at `systemd-analyze plot`, `journalctl` and poked around a bit.

So, not something that I would call opaque. It's just that they're not used to it. I never really learned inits before systemd (I knew how to enable and disable services on $distro, but that was about it).

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by falcolas on Sunday June 18, 2017 @09:36PM (#14584064)
So, the "impossible it was to diagnose anything with systemd" comes about because "systemd-analyze plot" and "journalctl" have no meaning prior to systemd. It's a whole new toolset which needs to be learned.

It doesn't follow any existing patterns, which makes it harder to learn if you're already familiar with troubleshooting init prior to systemd (troubleshooting which would have started with a quick trip to /var/log/dmesg and stopped with /var/log/syslog).

So yes, it can absolutely be learned. But existing administrators have to abandon most of their existing toolkit to do so.

That all said, that's not what I mean by opaque. By opaque, I'm referring to how many (few?) people truly grok what's going on inside of systemd. As an arbitrary point of measure - systemd (and only systemd) consists of over 500,000 lines of C code. It takes a lot of dedication and time to understand what is going on in that much C code. There are, by GitHub stats, less than 10 people who have contributed (combined additions and deletions in commits) to even 1% of the codebase, and only 4 who have touched more than 50%.

In comparison, sysvinit consists of about 9,300 lines, and upstart 115,000.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by EmanueleAina on Sunday July 02, 2017 @06:52AM (#14681929)
Doesn't that applies to the kernel, libc, openssl, the X server, desktop environments, and web browsers?
Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by digi_owl on Monday June 19, 2017 @10:15AM (#14587115)
Also, where before one could mark1 eyeball what the bootup was trying to do, and reason fixes from that, now one have to rely on an analyzer to tell what the sequence will be. And if said analyzer can't be used, what then?

And similarly the journal format is something that can only be read with the journalctl tool. plain ascii you can throw just about anything at.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by mattadams on Monday June 19, 2017 @03:38PM (#14589770)
I have to second this. I am a long-time Linux user, having run Debian since the late 90s and Slackware since 1993 but systemd put me over the edge. Things that worked and were easy to figure out in the previous init system just stopped working under systemd. It is a brutally complicated init that didn't add anything to my experience and pushed me out of Debian and into FreeBSD where things still have sane defaults. I like to get my work done instead of messing around with an init system that refuses to let me do even the most basic things.

Not all new things are great and I think Debian made a mistake not supporting a traditional init system alongside systemd or at least until the kinks could be worked out.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by ZenoArrow on Sunday June 18, 2017 @12:18PM (#14581345)
Thank you for your response falcolas. Addressing your points:

> "- It's effectively a black box that nobody but the systemd team really understands; and the response by said team to problems with systemd too often defaults to "you're doing it wrong""

Is this because the data being passed around is represented in binary form rather than text form (e.g. binary logs rather than text-based logs)?

> "- Systemd is not just an init system, it's a message bus, authentication system, logging system, container management system, xinitd system, and any other number of highly coupled systems."

Sure, but this doesn't strike me as neccessarily bad. I appreciate the Unix philosophy is based around having a series of tools that serve a single purpose that can be chained together in different ways, but it's still a necessity to have common interfaces over which this chaining takes place. Is this again related to the binary vs. text issue?

> "- Service startup order can still be non-deterministic and fairly slow; hard init problems have been made harder, while easy init problems "only" remain easy."

The non-determinism and speed of start up both strike me as major issues, thank you for mentioning them. Does anyone know if there are there plans to tackle these issues?

> "- Unit files can be stored in a minimum of four separate locations on disk, and this can be increased dynamically."

Again, this also seems like a reasonable complaint. Is this issue due to the intrinsic design of systemd or is this solely a flaw in the implementation?

> "- Failures are opaque, and the failure of systemd triggers the failure of the entire system."

Are there no fallbacks in place should a systemd component fail? I see no reason why this couldn't be implemented.

> "and instead of iterating against that goal, the team's focus has shifted to take over all aspects of the Linux runtime which isn't managed by the kernel."

I don't disagree with that assessment, but there must be reasons why systemd is proving popular amongst distro maintainers. Why would you suggest that is? What advantages do you gain from having a unified layer that provides the services that systemd provides?

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by falcolas on Sunday June 18, 2017 @10:06PM (#14584177)
> Is this because the data being passed around is represented in binary form rather than text form

None of my complaints relate to binary vs. text. Both have their strengths and weaknesses, and while binary data requires new set of tooling, I intentionally did not mention it because of how contentious it is to even bring up.

> Sure, but this doesn't strike me as neccessarily bad.

It's just not necessary. This all worked before. Not always perfectly, and sometimes even poorly... but it worked. And importantly, it worked without requiring the authentication system, message bus (tied into the kernel), custom logging, and init all to be tied together.

> What advantages do you gain from having a unified layer that provides the services that systemd provides?

Personally? None - no advantages. Consider where I'm coming from - I've run Linux on the desktop and server for years (perhaps even before systemd was a glimmer in Pottering's eye). I've written software which ran on startup (including the sysvinit scripts), done init troubleshooting... and it all just worked.

Without reasonable gains in speed, and without resolving the determinism problem, and given a world in which supervisord, daemontools, and LXC exist... systemd just doesn't bring anything to the table that I've been asking for. Instead, it's brought a whole new toolset I have to now learn, and a ton more complexity and opacity.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by JdeBP on Sunday June 18, 2017 @07:02AM (#14580113)
beefhash's explicitly stated rationale was reuniting the community. By attempting to derail this into yet another massive thread about the merits/demerits of systemd, rather than a discussion of the desired future and already present capabilities of the Debian installer, and putting words into beefhash´s mouth that xe did not say as you have done here, you are instigating exactly the opposite.

* http://uselessd.darknedgy.net/ProSystemdAntiSystemd/

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by ZenoArrow on Sunday June 18, 2017 @08:59AM (#14580456)
>"you are instigating exactly the opposite"

Not really.

In order to 'reunite the community' you need to understand what that will take. Every init system that is supported adds an additional support burden onto the developers and maintainers that work on Debian. In order to minimise that work, it's important to understand the issues with the status quo.

At one end of the spectrum, perhaps a few tweaks to systemd would be enough to satisfy most who had issues with it in the past. On the opposite end of the spectrum you have the distro needing to support 5+ init systems if there's little consensus about what a strong alternative to systemd would look like.

The questions I asked previously are useful in understanding how much work would be required to 'reunite the community'. Feel free to answer them if you think this is a worthwhile line of inquiry.

Re:Ask HN: What do you want to see in Debian 10 (“buster”)? by pwdisswordfish on Sunday June 18, 2017 @10:57AM (#14580907)