News for hackers. Stuff that matters.
Re:Systemd, ten years later: a historical and technical retr... by acdha on Sunday May 03, 2020 @07:22PM (#23062725)
I think this really sums this article up:

> One thing I’m certain of is that this shift cannot emerge from dilettantes, outsiders and proverbial basement hackers. One does not unseat a platform without already being part of the patriciate that calls the shots on what gets integrated where across the largest nodes in the ecosystem.

It’s a long, turgid “why wasn’t I consulted?” complaint which really just comes back to the question of how open-source projects work. An init system is harder than it might seem at first and requires buy-in from an unusually large number of parties since it affects the OS, everyone shipping daemons, and the operators. If you’re not going to invest that level of engineering time, I don’t see how it’s reasonable to expect an equal voting share with those who do.

Re:Systemd, ten years later: a historical and technical retr... by throw0101a on Sunday May 03, 2020 @08:39PM (#23063202)
> An init system is harder than it might seem at first […]

systemd-as-init-system is not the problem. systemd-as-kitchen-sink is the problem.

It's the tight coupling that annoys many people.

Does udevd really need to be in the same repo? While there may be some nice things about journald, does it really have to be in the same source package? (And why can't it support remote logging with the industry standard syslog protocol? Now I have to run journald and rsyslog. And why doesn't it have an ACID file format that doesn't self-corrupt at times? Why couldn't they just use SQLite or OpenLDAP's LMDB?)

What does systemd 245's systemd-homed have to do with an init replacement?

* https://www.techrepublic.com/article/linux-home-directory-ma...

Re:Systemd, ten years later: a historical and technical retr... by blibble on Sunday May 03, 2020 @11:54PM (#23064403)
> So, for the simple act of logging in, three mechanisms are required (systemd, /etc/shadow, /etc/passwd). This is inefficient, and Poettering has decided to make a drastic change. That change is homed. With homed, all information will be placed in a cryptographically signed JSON record for each user.

10 years ago this would have been considered satire

Re:Systemd, ten years later: a historical and technical retr... by kuschku on Monday May 04, 2020 @05:37AM (#23066074)
homed is a purely optional, independent tool, for use in situations where you’d use roaming home directories on windows, or similar technology.

No one is forcing you to change your broken buggy 30-year old shell scripts, you can always continue using them.

Re:Systemd, ten years later: a historical and technical retr... by throw0101a on Monday May 04, 2020 @11:24AM (#23069123)
> No one is forcing you to change your broken buggy 30-year old shell scripts, you can always continue using them.

How about usernames that start with a digit? Am I still allowed to use those?

* https://ma.ttias.be/giving-perspective-systemds-usernames-st...

Re:Systemd, ten years later: a historical and technical retr... by kuschku on Wednesday May 06, 2020 @01:29PM (#23093829)
POSIX says that any tool should always translate usernames into userids at the earliest possible point, and pass UIDs to children it spawns.

Now assuming I have a user called 1000 with UID 2000, and a user called 2000 with UID 1000.

Now what do you think is gonna happen if multiple POSIX-compliant tools call each other?

This is clearly broken, and the reason why BSDs don’t actually implement POSIX cleanly, instead allowing all their tools to take unambiguous identifiers on the CLI, with the # prefix to mark a UID, and have all their tools call all their children with this format.

The POSIX standard is clearly suboptimal here, and the set of valid usernames, and the set of valid UIDs should never have been allowed to overlap.

Re:Systemd, ten years later: a historical and technical retr... by throw0101a on Friday May 08, 2020 @01:26PM (#23117216)
The weblog post has an user called '0day', i.e., "zero day". This breaks systemd as outlined in the post. This is a WONTFIX per the systemd folks.
Re:Systemd, ten years later: a historical and technical retr... by kuschku on Friday May 08, 2020 @02:55PM (#23118138)
That’s one of the possible options, the other would be replacing chown, chmod, ls, etc (as the BSDs do)
Re:Systemd, ten years later: a historical and technical retr... by jcynix on Monday May 04, 2020 @03:34AM (#23065446)
This must be satire, not? Because soon my .forward won't work, my .procmailrc won't work, my crontab scripts won't (etc pp) unless my encrypted home directory (planned to be decrypted on login) is decrypted. Or all these are moved to other locations.
Re:Systemd, ten years later: a historical and technical retr... by vidarh on Monday May 04, 2020 @05:49AM (#23066158)
Or you opt to not encrypt your home separately.

But how large a proportion of machines do you think have mail delivery rely on .forward or .procmailrc in $HOME these days?

In any case, procmail can be executed directly rather than from .forward in most cases, and can be configured to take the rc file to be a file in /etc/procmail-rcs/ as an alternative to $HOME/.procmailrc (at least the version of procmail in Ubuntu; unlike /etc/procmailrc, the files in /etc/procmail-rcs/ will take on the user id of the user the file is named for, like $HOME/.procmailrc).

User crontabs on my system at least (Ubuntu) are in /var/spool/cron/crontabs/[username], not in $HOME anyway. I can't remember the last system I had with user crontabs in $HOME.

People have had systems where relying on accessing the home directory of a logged out user has been undesirable or impossible for a very long time.

Re:Systemd, ten years later: a historical and technical retr... by throw0101a on Monday May 04, 2020 @11:29AM (#23069181)
> But how large a proportion of machines do you think have mail delivery rely on .forward or .procmailrc in $HOME these days?

I help run a 500 node HPC cluster that leverages procmail. Do I count?

> User crontabs on my system at least (Ubuntu) are in /var/spool/cron/crontabs/[username], not in $HOME anyway.

The crontab(5) may be there, but where is the script that is actually executed? Probably in $HOME/scripts/ or some such.

> People have had systems where relying on accessing the home directory of a logged out user has been undesirable or impossible for a very long time.

I have daily experiences indicating otherwise. I would hazard to guess that many other syadins in academia & research would agree. Even assuming $HOME is in /home breaks a bunch of stuff:

* https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu2004Sna...

Re:Systemd, ten years later: a historical and technical retr... by vidarh on Monday May 04, 2020 @12:36PM (#23070119)
> I help run a 500 node HPC cluster that leverages procmail. Do I count?

You do, but you're a tiny minority, and as noted /etc/procmail-rcs/ provides an alternative to putting them in /home. If that doesn't work for you, all you need is to not configure encrypted home directions and nothing changes.

> The crontab(5) may be there, but where is the script that is actually executed? Probably in $HOME/scripts/ or some such.

So don't configure encrypted home directories, then. Nobody is forcing you to enable it. Or you can provide an alternative location, and let your users protect their data better and still be able to use cron jobs. It does not take any flexibility away from you, but it adds capabilities for those who want them.

> I have daily experiences indicating otherwise. I would hazard to guess that many other syadins in academia & research would agree. Even assuming $HOME is in /home breaks a bunch of stuff:

Your experiences with systems that are fine with accessing $HOME does not mean that there aren't plenty of systems where it has been an issue, hence why plenty of software supports alternatives.

Your point of not assuming $HOME is in /home is irrelevant to this issue. The point is that software have had to deal with a subset of users with setups where a users home directory is not necessarily accessible when the user is not logged in for many years. As such most software has options to avoid relying on a users home directory being present already, which reduces this to a relatively simple choice of whether or not you consider the ability to encrypt home directories to be worth making those changes for.

Re:Systemd, ten years later: a historical and technical retr... by jcynix on Monday May 04, 2020 @09:36AM (#23067863)
Maybe my point wasn't stated clear enough: the crontab itself is in spool, obviously, but the scripts started from crontab entries reside in my home directory. And while a procmailrc can live in some spool too, the files to be delivered into are in my home directory too.
Re:Systemd, ten years later: a historical and technical retr... by vidarh on Monday May 04, 2020 @12:37PM (#23070137)
So then you have two choices: Move them elsewhere, and be able to encrypt the rest of $HOME, or don't encrypt $HOME. This gives you additional options for protecting your home directory if you want it. Noone is forcing you.
Re:Systemd, ten years later: a historical and technical retr... by ArchD on Sunday May 03, 2020 @09:21PM (#23063551)
Yeah, don't get me started on the fragile glass test tube called systemd-resolved that fails in mysterious ways when I use wicd on Ubuntu and the WiFi gets momentarily disconnected. I don't see the sense behind treating name resolution as something so special that it has to be part of an init system.

I like the overall theoretical concept of systemd but it has ugly implementation details like this.

Re:Systemd, ten years later: a historical and technical retr... by Spivak on Sunday May 03, 2020 @09:48PM (#23063745)
But systemd-resolved is such an odd complaint since it’s only connection to systemd is the name and that it’s in the same repo. It’s not connected to the init system at all.
Re:Systemd, ten years later: a historical and technical retr... by hedora on Sunday May 03, 2020 @09:53PM (#23063774)
The entire repo is a big ball of mud. No one knows which parts can be removed without breaking things.

Heck, the author of this article couldn’t even find a design doc or adequate manual for the init part of the train wreck, and it’s been in development for ten years.

Re:Systemd, ten years later: a historical and technical retr... by Spivak on Sunday May 03, 2020 @11:30PM (#23064282)
Just set ENABLE_RESOLVE=0 when compiling and resolved is gone?
Re:Systemd, ten years later: a historical and technical retr... by epistasis on Monday May 04, 2020 @12:13AM (#23064485)
You use the word "just" as if this were a simple thing to understand and know. Is this magic incantation communicates in a way that the usual people who compile this package can understand to use it without being intimately familiar with the code?

I ask not rhetorically, just out of curiosity. It's not a typical type of suggestion for other packages I've encountered with open source, and it feels far more difficult to discover than typical decisions at compile time.

Re:Systemd, ten years later: a historical and technical retr... by oefrha on Monday May 04, 2020 @01:50AM (#23064948)
> this magic incantation communicates in a way that the usual people who compile this package can understand to use it without being intimately familiar with the code?

Define “usual people who compile this package”. In my books those are distro maintainers who indeed should be familiar with options provided by the init system they choose. If you decide to include oddballs who compile everything themselves (Linux from scratch?) then again, yes, they are expected to know a thing or two or dig into options or even code from time to time.

Re:Systemd, ten years later: a historical and technical retr... by Spivak on Monday May 04, 2020 @08:59AM (#23067451)
I mean the parent was talking about the source code being a ball of mud and it being difficult to determine what components can be removed without breaking things.

In this case it should be assumed we’re talking about someone who’s compiling systemd and familiar with the source. And yes, these are flags that anyone who builds systemd from source would be familiar with and know how to set.

It’s the same as when you run a configure script and pass —-disable-feature.

Re:Systemd, ten years later: a historical and technical retr... by JoeAltmaier on Monday May 04, 2020 @09:05AM (#23067509)
So common with open source - flags that once worked are now tangled up with subsequent code/flags and won't even compile if not part of some common configuration. Because its not fun to exhaustively test all combinations, it doesn't get done.
Re:Systemd, ten years later: a historical and technical retr... by pas on Monday May 04, 2020 @07:09AM (#23066598)
It seems exactly as difficult as with any other stuff written in C. Let's say uWSGI. systemd uses meson, and there's a file listing all the options, and the first match for "resolve" seems to be that flat: https://github.com/systemd/systemd/blob/master/meson_options...

Furthermore, even if you compile it, you don't have to use it. Even if you install it, you don't have to use it. (After all it has 2-3 APIs, one of them is the /etc/resolve.conf symlink, if you instead just put 1.1.1.1 in that file, libc will not go through resolved. And similarly for the other entry points.)

It's possible to accidentally compile, install and have systemd-resolved set up on your computer, but it still seems rare that someone can compile and install systemd, yet not know what they're doing.

Re:Systemd, ten years later: a historical and technical retr... by yrro on Monday May 04, 2020 @04:00AM (#23065561)
Yes it is.
Re:Systemd, ten years later: a historical and technical retr... by zeveb on Monday May 04, 2020 @08:52AM (#23067366)
> Just set ENABLE_RESOLVE=0 when compiling and resolved is gone?

From HHGTTG:

"But the plans were on display …"

"On display? I eventually had to go down to the cellar to find them."

"That's the display department."

"With a flashlight."

"Ah, well, the lights had probably gone."

"So had the stairs."

"But look, you found the notice, didn't you?"

"Yes," said Arthur, "yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of the Leopard.'"

Re:Systemd, ten years later: a historical and technical retr... by Spivak on Monday May 04, 2020 @09:11AM (#23067584)
This is a config option that you pass when compiling systemd in the same was as --enable-feature in a ./configure script. If you are familiar with the systemd source you would be aware of these options. They’re not hidden.
Re:Systemd, ten years later: a historical and technical retr... by throw0101a on Monday May 04, 2020 @11:32AM (#23069214)
> [...] and that it’s in the same repo. It’s not connected to the init system at all.

And that's exactly the problem.

For all the complaining I do about systemd, I'd be much less annoyed with it if all it did was PID 1. It's all the other stuff that gets tightly coupled for no discernibly-good reason that poisons the well for me.

Re:Systemd, ten years later: a historical and technical retr... by terrywang on Monday May 04, 2020 @02:59AM (#23065280)
Funny you mentioned systemd-resolved, it generated so many coredumps across the machines I use at home (Arch, Manjaro, Fedora), its stability / reliability improved over time but still not up to standard.

Unfortunately, currently systemd-resolved is the only OS level DNS-Over-TLS solution that works for my use cases: roaming laptops and desktops running Linux. At home it's fine because the core router runs AsusWRT-Merlin which does DNS over TLS for all clients using it as resolver.

I don't have a strong opinion against systemd (initially I disliked it moving from Arch's BSD style rc.d). Trend is that systemd is taking over more and more *ctl, seem like its goal is the entire user-space?. Most distros choose to accept and adopt it, and overall (at some point) it eliminated distro differences and lowered the barrier for new Linux users (desktop) and sysadmins.

Personally I started systemd when it rolled into Arch Linux, after which point, rolling upgrade has never gone broke (workstation use case - Desktop Environment / WM), could be skill levelled up after gaining experience though lol...

BTW: I watched `reinventing home directories` by Lennart Poettering (recording @ All System Go! 2019), interesting one. Personally I like to see reinventing wheels to solve legacy problems (people get used to them, sometimes confused, question but don't know how to solve) others don't even consider problems. These helped open my mind and look at things from a different PoV.

[1]: notes on systemd-homed https://sites.google.com/site/imterry/aboutme/profiles/skill...

Re:Systemd, ten years later: a historical and technical retr... by crazy_hombre on Monday May 04, 2020 @05:40AM (#23066083)
systemd isn't just an init system. It's a suite of tools that provides a system and service manager. It's not handling everything in one monolithic process. This has been said thousands of times before. I don't know why people don't get this.
Re:Systemd, ten years later: a historical and technical retr... by pas on Monday May 04, 2020 @07:20AM (#23066672)
systemd is not an init system. That it has one, it out of necessity. To manage a system you have to manage what runs on it, to manage that you have to manage what gets started and stopped, and so you have to manage boot and shutdown. And now, here's your nametag, there's the counter, don't forget to smile, you're the new init system!

udev doesn't have to be there, but when a handful of people maintain critical parts of the Linux ecosystem and they saw ways to make their maintenance work more effective, they went ahead and made their work more efficient.

I mean, criticizing systemd/udev/Debian/Ubuntu/Arch on how they did stuff, and the technical merits of how things are is completely fair, but criticizing "why" is strange. They did because they saw that it will help them, their projects, their users. (And they probably understood very well that it won't please all of their users.)

Re:Systemd, ten years later: a historical and technical retr... by gens on Sunday May 03, 2020 @07:57PM (#23062910)
Voting share ? There is no vote unless you work for RH. And even then.

An init system is harder then it seems ? You and Jonnax seem to think that unless you made it you have no right to say anything. Have you ever made an init system ? Researched what exactly goes into it ? Sure, there's more then just starting programs. But not much more. The only really complicated thing about getting a [linux] computer from kernel boot to firefox is setting up devices. And even that [udev,"hotplug"] is not complicated as much as it is.. obscure. I know about these stuff, do you ?

I'l defend a newbies right to say anything. Nobody was born with all the knowledge of the world. I will not have compassion for your kind of ignorance.

SystemD is about as much an init as my foot is me. That is the problem that most of those you so casually dismiss have with it. That and that it wants to become mandatory. Could they have just extended udev instead of integrating it ? An i wrong to say that ? Is my opinion wrong because i don't have "Red Hat senior engineer" next to my name ? Programming is just a hobby for me. I don't even have a degree in it. So i'm ignorant on the subject ?

Funny thing.. most of those on teh internets who are vehement in favor of systemD don't know much about how a computer system boots and what goes into that.

edit: Never mind. I see feelings and fancy words are still more valuable then knowledge or thinking. Maybe one day, when computing is not as young of a science as it is now.

Re:Systemd, ten years later: a historical and technical retr... by acdha on Sunday May 03, 2020 @09:10PM (#23063460)
> An init system is harder then it seems ? You and Jonnax seem to think that unless you made it you have no right to say anything. Have you ever made an init system ? Researched what exactly goes into it ? Sure, there's more then just starting programs. But not much more. The only really complicated thing about getting a [linux] computer from kernel boot to firefox is setting up devices. And even that [udev,"hotplug"] is not complicated as much as it is.. obscure. I know about these stuff, do you ?

I know enough to know that you left out networking and authentication, network service dependencies, filesystems, volume encryption, etc. – not to mention automatic restarts, conditional behavior based on the network or other devices (stuff needs to happen when I leave the office), and the various edge cases which I’ve seen in three decades running Unix systems. Every other operating system Linux is competing with has a much better model than SysV init (Windows has since the early 1990s!), and the world changed from static servers which rarely changed to most systems needing dynamic behavior – what worked in an old server room isn’t a good fit for a laptop!

Again, I’m not saying that systemd is perfect but that most of the complaints tend not to acknowledge the many problems it solved and a decade of angry forum threads doesn’t seem to have resulted in any concerted effort to build a serious competitor. The Debian community had a deep examination of the alternatives and picked systemd because it made sense, not because Red Hat has some brainwashing program.

Re:Systemd, ten years later: a historical and technical retr... by sergeykish on Sunday May 03, 2020 @10:03PM (#23063831)
There is no competitor because there was no problem. For most of use cases SysV, rc.d worked. Just like ifconfig.

Arch Linux switched to systemd earlier than Debian. And I have not noticed. Arch community accepts breaking changes. Debian? I believe they value stability.

Systemd should have matured, proved its citizenship and qualities. And it would have been accepted. Instead it usurped. People had no choice but to abandon their platforms. Decade of angry forum thread shows that there is a problem. Just like with python3, it's better to learn. And it is especially painful that there was PulseAudio just before. Same pointless change. Removed it and never looked back. ALSA works for me, still.

Re:Systemd, ten years later: a historical and technical retr... by theamk on Monday May 04, 2020 @01:43AM (#23064921)
Usurped how? Who and how forced Debian and Arch to switch to systemd?
Re:Systemd, ten years later: a historical and technical retr... by sergeykish on Wednesday May 06, 2020 @04:06AM (#23088862)
You're missing a point. It's about feelings. Not my feelings at all. But empathy.

Replacement for "no problem" should run without problems.

python2 had no problems - there was a clear transition path:

    1. "str" => b"str"
    2. wait some time
    3. "str" is u"str"
ALSA had no problems - just wait till PulseAudio is ready.

SysV, rc.d had no problems - just wait till systmed is ready.

If SysV was as bad there would be same amount of outcry as with systmed

Was it really necessary to make it painful?

Who? Somehow systemd defenders has no empathy and Lennart Poettering is a prime example. No matter right them or wrong they are perceived as threat.

Just be nice. It may hinder innovation but it helps community.

Re:Systemd, ten years later: a historical and technical retr... by kelnos on Monday May 04, 2020 @04:05AM (#23065595)
GNOME, essentially. If you want to run a fully-functioning GNOME on your distro, you have to be running systemd. Or have the time and patience to maintain a large patch set to work around the systemd dependencies.
Re:Systemd, ten years later: a historical and technical retr... by theamk on Monday May 04, 2020 @09:50AM (#23068040)
This became this way only once systemd has won. At least during Debian systemd debate, both sysvinit and upstart could run Gnome just fine.

(also, what were the alternatives? I don't run GNOME myself, but given what GNOME wants do to, it does need a solid session management. I have seen ConsoleKit, it was worse than systemd.)

Re:Systemd, ten years later: a historical and technical retr... by dane-pgp on Monday May 04, 2020 @05:14PM (#23073346)
Debian's tech committee had their infamous vote about the default init system for Jessie in February 2014. Earlier, in October 2013, Josselin Mouette, a GNOME packager for Debian, wrote this:

"GNOME in jessie will need systemd as the init system to work with all its features, just like it needs the network configuration to be handled by NetworkManager."

Re:Systemd, ten years later: a historical and technical retr... by arpa on Monday May 04, 2020 @02:05AM (#23065026)
Debian used to value stability. Nowadays - not so much.
Re:Systemd, ten years later: a historical and technical retr... by hedora on Sunday May 03, 2020 @10:04PM (#23063836)
> you left out networking and authentication, network service dependencies, filesystems, volume encryption, etc. – not to mention automatic restarts, conditional behavior based on the network or other devices (stuff needs to happen when I leave the office), and the various edge cases which I’ve seen in three decades running Unix systems.

I’ve been running Unix systems for 25 years. All of the things you mentioned were already solved adequately in the Linux 0.9 days, and the BSD’s still use old fashioned shell based inits, and work fine in my experience.

In fact, the only time I’ve had issues with any of this stuff has been in the last ten years, and only on systemd-based distros.

The genius of init systems is that they factor all this stuff out, and just handle starting and stopping daemons.

Re:Systemd, ten years later: a historical and technical retr... by theamk on Monday May 04, 2020 @01:54AM (#23064962)
> All of the things you mentioned were already solved adequately

really?

Let's say (not entirely hypothetically) that you have a daemon. This daemon has a config file, which is large and complex. This daemon's /etc/init.d file builds command-line dynamically, then passes it to start-stop-daemon as usual.

Puzzle level 1)

You made a typo in init file, so that daemon does not start. The "start" command succeeds, but there is no output anywhere, and process does not start. How do you debug it in the sysvinit world?

Puzzle level 2)

Turns out this daemon used LC_ALL (PATH? HOME?) when parsing config, so it works fine when started or restarted from command line, but fails when started as an part of startup process. How do you debug this?

Puzzle level 3)

One day, you happened to be in the server room, watching server boot (you normally reboot it remotely). You have noticed a red message scroll up the screen. This looks important! Too bad it already scrolled off the screen and out of the scrollback buffer too. How do you see it?

The problem of all the init systems is they could be great, but their development just stopped at some point -- and instead of fixing the real annoyances in a general way, they were just saying "this is all fine". Until systemd came and ate their lunch.

Re:Systemd, ten years later: a historical and technical retr... by dijit on Monday May 04, 2020 @05:09AM (#23065906)
Not sure if joking (since, sysvinit is very old and was in need of replacement) so I'll answer in good faith.

> You made a typo in init file, so that daemon does not start. The "start" command succeeds, but there is no output anywhere, and process does not start. How do you debug it in the sysvinit world?

"oh my process failed; let's add `-x` to the invocation."

> You made a typo in init file, so that daemon does not start. The "start" command succeeds, but there is no output anywhere, and process does not start. How do you debug it in the sysvinit world?

as above.

> One day, you happened to be in the server room, watching server boot (you normally reboot it remotely). You have noticed a red message scroll up the screen. This looks important! Too bad it already scrolled off the screen and out of the scrollback buffer too. How do you see it?

`dmesg` or /var/log/messages (or /var/log/dmesg)

Re:Systemd, ten years later: a historical and technical retr... by theamk on Monday May 04, 2020 @10:23AM (#23068400)
Puzzle level 1) ini file:

you mean, "add -x to the invocation, get back a few screenful of text, wade through that looking for "export" lines and copy them to your terminal, find "start-stop-daemon" line, copy the part of the line and remove irrelevant parameters, and paste into your terminal as well?

I would not call this "easy" or "solved". Possible, yes. Pleasant, no.

Puzzle level 2) inherited env -- I think you made copy-paste error? You just copied the same paragraph again.

Puzzle level 3)

Surprise! Neither dmesg or /var/log/messages or /var/log/dmesg usually contain startup problems! Sometimes the nice daemon might log stuff there, but it is no way universal or required.

The sysvinit recommended way is to call things like "log_failure_msg" and "log_warning_msg", and those only print to stdout, which is the console. That's it. Gentoo's OpenRC does claim to have boot console logger, but it was broken every time I tried to use it.

Are you running any servers? If so, you might want to connect to the monitor, reboot and see if any service has error messages. Or you can use console scrollback after the server is booted, but you might need to recompile your kernel to increase is size, it is pretty small. Or just install systemd, it has full boot logging fully integrated with primary logging. And even a special command which lists all daemons which failed to start.

Re:Systemd, ten years later: a historical and technical retr... by dijit on Monday May 04, 2020 @01:21PM (#23070744)
> you mean, "add -x to the invocation, get back a few screenful of text, wade through that looking for "export" lines and copy them to your terminal, find "start-stop-daemon" line, copy the part of the line and remove irrelevant parameters, and paste into your terminal as well?

I mean, yes? Granted I'm not a developer but printing out exactly what's happening line by line with all variables expanded and all logical conditions printed is awesome, it's something we try to reverse engineer into programs with tools like bpftrace and strace.

Conversely an opaque C application which fails has much less tooling in the way of debugging failures. Especially if your package maintainers have stripped symbols.

> Surprise! Neither dmesg or /var/log/messages or /var/log/dmesg usually contain startup problems! Sometimes the nice daemon might log stuff there, but it is no way universal or required.

Actually, that's the opposite. A "bad" daemon might not print anything to stdout when invoked (which goes to dmesg) but regardless, this whole comment just reeks of someone who hasn't actually dealt with systems before 2014.

> Are you running any servers? If so, you might want to connect to the monitor, reboot and see if any service has error messages. Or you can use console scrollback after the server is booted, but you might need to recompile your kernel to increase is size, it is pretty small. Or just install systemd, it has full boot logging fully integrated with primary logging. And even a special command which lists all daemons which failed to start.

Console scrollback is "nice to have", personally I'm very thankful that it does not use memory keeping things there because there is the odd regression when you configure something (like when you tell IPtables to log deny's: that also gets printed to console.)

re----gardless. I think we're talking passed each other. I had no real issue as a sysadmin with a fully fledged bash, because I can debug it. I get that there's issues with that and most people do not like it- I'm not advocating for it, just saying that what you presume to be "impossible" was somehow solved for decades, and quite competently. It may not be pleasant to you but the alternative is not pleasant for me.

The larger issue I have is that "the alternative" is embedded and entangled itself to everything- there can never be anything better produced.

With old init's, it was a small process with well defined functionality so replacing it was easy. (as evidenced by the many init's among unices.).

Anyway, I'm getting ahead of myself.

If you want to see what systemd could have been, I invite you to look at Solaris' SMF. Please ignore the XML-ness of it, it's "very old" in comparison to systemd. :)

Re:Systemd, ten years later: a historical and technical retr... by theamk on Monday May 04, 2020 @10:36PM (#23075802)
Are you perhaps confusing something?

> A "bad" daemon might not print anything to stdout when invoked (which goes to dmesg) but regardless, this whole comment just reeks of someone who hasn't actually dealt with systems before 2014.

The daemons never print to dmesg -- they may print to syslog, but not all do. The only daemon that I know of that prints to dmesg is systemd :)

To be specific, let's do a simple example. Here is an actual sysvinit file, /etc/init.d/hwclock.sh . It contains:

                if /sbin/hwclock --rtc=/dev/$HCTOSYS_DEVICE --hctosys $HWCLOCKPARS $BADYEAR; then
                    #   Announce the local time.
                    verbose_log_action_msg "System Clock set to: `date $UTC`"
                else
                    log_warning_msg "Unable to set System Clock to: `date $UTC`"
                fi
This version has been around since at least 1998 [0]. Old school enough for you?

So here is a simple question: let's say my hwclock chip/driver is unreliable and it did not work on startup for some reason, so that "hwclock" call is failing. My kernel timezone is not set right, the clock is off, and the system does log_warning_msg to warn you about it. How do I find out about this warning?

To make your job simpler, here is how the how this function is defined on my system:

    if log_use_fancy_output; then
        YELLOW=`$TPUT setaf 3`
        NORMAL=`$TPUT op`
        echo " $YELLOW*$NORMAL $@" || true
    else
        echo " * $@" || true
    fi

Note no dmesg here, no syslog, no other loggers. You can say "bootlog", but it has been broken every time I tried to use it.

Now, nothing is impossible! I can hack this script so it writes to a temporary file. I can re-execute it again, and hope it fails again. But this gets old, you know? I can spend all day debugging early boot shell, but I did it for a long time already, so now I just want to type "systemctl show --failed", see all the failed services, fix it quickly, and move on to more interesting stuff.

[0] https://www.mail-archive.com/[email protected]...

Re:Systemd, ten years later: a historical and technical retr... by dijit on Tuesday May 05, 2020 @06:15AM (#23078370)
log_warning_msg is a function which is wrapping 'echo'.

if you 'echo' it will go to the console.

Your distro can/does log everything that goes to the boot console.

The function 'log_warning_msg' is provided by the sourced bash file: /lib/lsb/init-funtions ; you can find a copy here: http://www.linuxfromscratch.org/lfs/view/7.0/scripts/apds02....

It's just doing echo.

If you add "echo" it will print. I promise.

And anything printed goes to whatever your distro is using to log tty0 console output. (usually /var/log/dmesg or /var/log/messages)

Re:Systemd, ten years later: a historical and technical retr... by theamk on Wednesday May 06, 2020 @06:36PM (#23097210)
Which distro logs tty0 console output from echo ? Debian does not. Fedora does not. Gentoo used to, but it broke.

Both /var/log/dmesg and /var/log/messages log printk output from inside the kernel. They do not log echo output from userspace.

Are you sure you are an admin?

Re:Systemd, ten years later: a historical and technical retr... by dijit on Thursday May 07, 2020 @11:46AM (#23104330)
> Which distro logs tty0 console output from echo ? Debian does not. Fedora does not. Gentoo used to, but it broke.

None, anymore, that's a little bit the point.

Devuan does, so does Debian 7 and RHEL6.

I just tested it on all three in a VM.

yes, I'm sure I'm an admin.

Re:Systemd, ten years later: a historical and technical retr... by gens on Sunday May 03, 2020 @10:01PM (#23063824)
udev was the biggest step towards "dynamic systems". Or should i say "hotplug" was, since it is more or less the same thing. I completely agree that the init should be an event based system. I'm not arguing that. I never argued that. I did not in fact argue much other then the statement that nobody should say their opinion about anything.

You say i left out stuff. I did. A lot more stuff then you wrote here. It would be a looooooong list of things, all of them simple (including "networking" and encrypted filesystems). I mentioned udev as an example of something slightly more complex, but even it is not.

> .. much better model than SysV init ..

You talk as a user, as in an admin. I talk as someone who was once interested in how all these stuff actually work. What i played with (read about, coded, and researched in general) includes init, udev, network hardware management (how ip and iw actually do stuff, excluding wpa), and more. What have i learned ? That almost all of it is done by the kernel. SystemD is not the only.. program that responds to events and goes over a graph and such. In fact, it is not even that hard to do what it does. Remember how i asked why udev doesn't have a generic event.. protocol ? You can scrap udev if you don't use systemD. And why ? For better integration ? The kernel tells udev when a device appears. So why doesn't udev just send a message of some sort ? It could even have a "mode" where it doesn't do anything unless it receives a message telling it to. So why not ? Oh, i don't think it's malice.

> The Debian community had a deep examination of the alternatives and picked systemd because it made sense, not because Red Hat has some brainwashing program.

The debian debate was a clusterfuck of grand proportions. There was one (1!) post on the whole debate that addressed the technical aspects. In the end the conclusion was that it is easier to just use systemD as stuff depends on it more and more (GNOME, notably, funny). RH is a huge company, they are not altruistic in their goals. I wouldn't say malice, but i wouldn't say innocence either.

And again, nothing of substance was said. Just fancy words and feelings. Brainwashing..

PS Fun fact: Xorg depends on udev to send it events over dbus when you plug something related to it. It still works without it, until you re-plug your mouse.

Re:Systemd, ten years later: a historical and technical retr... by hedora on Sunday May 03, 2020 @10:10PM (#23063877)
Wasn’t the debian vote stacked by a bunch of Canonical employees that voted on party lines, since Ubuntu had already decided on systemd?
Re:Systemd, ten years later: a historical and technical retr... by dralley on Sunday May 03, 2020 @10:23PM (#23063951)
I thought it was exactly the opposite, that Canonical employees were fighting for Upstart and Ubuntu only switched to systemd after losing the war in Debian-land.
Re:Systemd, ten years later: a historical and technical retr... by nine_k on Sunday May 03, 2020 @09:28PM (#23063605)
Weren't Debian maintainers affected by the fact that it was... problematic to run Gnome without systemd? (Which might be entirety not systemd's fault.)
Re:Systemd, ten years later: a historical and technical retr... by dane-pgp on Sunday May 03, 2020 @09:50PM (#23063760)
Correct. By the time the question of default init system was being decided by the Technical Committee, the tentacles of systemd were so entrenched that its relative merits or detriments as an init system were of little importance. As Russ Allbery (a committee member) pointed out at the time:

"We’re not really talking about choosing between two competing ecosystems. Rather, we’re talking about whether or not to swap out a core component of an existing integrated ecosystem with a component that we like better."

Also (to try holding back the tide of historical revisionism) let me highlight that Debian's decision was in no way unanimous and the process was not without its own controversy. In reality, the Tech Committee was divided down the middle when it came to their vote on the default init system, and the tie was only decided by the double vote of Bdale Garbee, the chairman of the committee.

Re:Systemd, ten years later: a historical and technical retr... by tapoxi on Sunday May 03, 2020 @09:45PM (#23063728)
GNOME didn't have any significant systemd integration until well after Debian had decided to go ahead with it.

I remember this being a strong supporter, among others: https://lists.debian.org/debian-ctte/2014/01/msg00287.html

Re:Systemd, ten years later: a historical and technical retr... by dane-pgp on Sunday May 03, 2020 @09:53PM (#23063778)
Then why did Josselin Mouette, a GNOME packager for Debian, write this in October 2013:

"GNOME in jessie will need systemd as the init system to work with all its features, just like it needs the network configuration to be handled by NetworkManager."

Re:Systemd, ten years later: a historical and technical retr... by esoterae on Monday May 04, 2020 @01:52AM (#23064951)
> Again, I’m not saying that systemd is perfect but that most of the complaints tend not to acknowledge the many problems it solved

It solved nothing but the problems made up to justify its existence. And the ones those faux solutions created downstream. Boot ordering problem? Feh. What a gaslight fest. All caused by chasing 1.2s faster boots. What a colossal waste of everyone's time. This is the same cancer that Shuttleworth tried to foist on everyone with that UI abomination. Servers are desktops are laptops are tablets are phones!

Re:Systemd, ten years later: a historical and technical retr... by Accacin on Monday May 04, 2020 @08:46AM (#23067268)
> Funny thing.. most of those on teh internets who are vehement in favor of systemD don't know much about how a computer system boots and what goes into that.

Why can't you have a discussion without childish insults?

Re:Systemd, ten years later: a historical and technical retr... by bsder on Sunday May 03, 2020 @09:28PM (#23063600)
As a FreeBSD and Mercurial user, I get more than a little schadenfreude when Linux users complain about something being foisted on them by someone with a more dominant mindshare or marketshare.

Linux users spoke and set the system up to do exactly what it does--use a dominant position to drive out alternatives. They only complain when they suddenly wind up on the receiving end.

Perhaps if you don't like getting the pointy end of the stick, maybe you shouldn't sharpen it in the first place?

Re:Systemd, ten years later: a historical and technical retr... by nisa on Sunday May 03, 2020 @10:22PM (#23063941)
> It’s a long, turgid “why wasn’t I consulted?” complaint which really just comes back to the question of how open-source projects work.

I've read it more as a quirky history writup with some technical and idiology discussions.

FWIW I still think the technical criticism in the article has a lot of merit and what seems "turgid" to you is a nice link collection to learn about systemd minutiae...

Re:Systemd, ten years later: a historical and technical retr... by sergeykish on Sunday May 03, 2020 @09:28PM (#23063608)
Syntax wars are harder than it might seem at first. If you're not going to invest that amount of time, I don't see how it’s reasonable to expect an equal voting share with those who do.

Sometimes vocal minority is just that.

Re:Systemd, ten years later: a historical and technical retr... by cat199 on Sunday May 03, 2020 @10:32PM (#23063997)
> how open-source projects work

they work differently depending on the project.

so this statement:

> requires buy-in from an unusually large number of parties since it affects the OS, everyone shipping daemons, and the operators.

is only true in some cases.

c.f. rcng, which was developed by a very small few people, and is a generally sane improvement on previous BSD init that i've really never heard any complaints against vs the previous method.

same could have been true here. it was not - and the need for 'consensus' was largely sidestepped by the 'market pressure' of gnome being dependent on systemd features, and the leading core desktop environment that people had already attached themselves to, esp in the enterprise market.

Re:Systemd, ten years later: a historical and technical retr... by pas on Monday May 04, 2020 @07:25AM (#23066706)
Debian voted on the issue, and there was a very lengthy discussion. I don't think the Gnome dependency was the linchpin, at all. Debian developers wanted to get rid of thousands of silent but deadly shell scripts shipped in every package doing service management (rc scripts), they wanted nice cgroup integration, and that's it. At least this was my impression.