this post was submitted on 29 Jun 2023
132 points (96.5% liked)
Linux
48165 readers
710 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
As service manager systemd nice, but look all services:
That's look as overkill. I use only systemd, journald, systemd-boot, systemd-networkd, systemd-resolved and systemd-timesyncd, but that a lot systemd. Feel like system make monolith.
systemd-nspawn for example. Systems manager for containers. Seriously. Why than exists? I don't understand. Really, someone use that daemon?
I think that's a bad argument. If you go out of your way to install and configure all of these, then yes, they exist and you can do that - but that doesn't automatically mean they're bad.
But in most operating systems they're not installed, not configured, and you'll never have to deal with any of that.
I actually use systemd-boot because it's very easy to install and configure and systemd-resolved, but for a lot of those I haven't even heard about.
And furthermore even if more of them (I think it's highly unlikely that any OS would use all of those services by default) were preinstalled, they'd only be an issue if they'd cause trouble. If your system is running systemd-whatever and it works well then what's the issue? The name itself?
As I wrote below, the problem is that this does not comply with the principle of K.I.S.S. One application should solve one task and can be replaced. Even now it is quite difficult to remove systemd-logind, for example. Because, although these are different services, they have long merged into a huge tangle.
you can use EFISTUB If you don't have dual boot. This literally load kernel from UEFI. I don't know more simple way. https://wiki.archlinux.org/title/EFISTUB
That's not KISS, but the UNIX principle. And even that part is wrong, as in traditional UNIXes applications were certainly not replaceable.
can't you replace UNIX applications in user space? Why, besides the fact that some simply have nothing to replace?
How you would replace those in non-SystemD setup? Asking for learning purposes.
In fact, this is a difficult question.
In Linux, it is usually customary to use the K.I.S.S. methodology, In any case, it was once customary to use it. This in some way meant that there were a huge number of applications performing exactly one task. For example, chron only started timers, ntpd only adjusted the time, grub only loaded the system and nothing else. It also allowed you to change the components at your discretion. With systemd this principle was somewhat lost, since one service with a huge number of its own daemons absorbs more and more functions. This is what causes concern. In some sense, if systemd at some point becomes even more monolithic, it will no longer be possible to change only part of its functionality. For example, I'm not sure if it's possible to disable journald and leave only rsyslog.
On the other hand, the now-forgotten init.V fully adhered to the principle of K.I.S.S. since he was literally the initiator of a set of scripts that could contain anything. If you want, change the user at startup via exec, if you want via su. Isolate the application with any available program. It was as flexible as possible, but on the other hand, the entry threshold was quite high. The complexity of writing scripts for init.V was much higher than systemd.
Therefore, there is no single answer. On the one hand, init.V have maximum modularity, on the other hand, systemd have ease of use.
Sys V init systems were really not K.I.S.S. since it was anything but simple to write an init script in a way that worked without e.g. having the environment of the calling user leak into your script and influence its behaviour or breaking things when called by the wrong user,... Not to mention all the re-implementations of the same functionality and the difficulty of writing an init script that worked on more than one exact OS, distro and version.
Right. But on something more complicated than initializing the usual daemon, systemd has all the same problems. For example, if you have a java application and you want to dynamically manage java parameters and application parameters, the script will look like a pain. something like bash -c 'java ...' or you will have to call a separate script in the initiator. And then to turn off the shell and switch to the application itself, there will be a whole adventure with pid generation.
But sure systemd really more easy then system V.
If you mean you want to auto-detect appropriate values that is no more complicated than the init script was before. You just call that wrapper script.
If you mean you want to turn those on and off as part of your local configuration that is actually quite easy with drop-ins in systemd, much easier than modifying the init script and then having issues with the package overwriting your script with a new copy.
I don't deny that systemd is easier than SysV. I say that on complex configurations it is not slightly simpler. Moreover, what I could do just in the sysV script, I now have to divide by tmpfiles.d and systemd. And sometimes even include processing both there and there, because depending on the version systemd has different behavior with parameters LogsDirectory= and RuntimeDirectory=. As a result, the dependence on the system has not completely disappeared for the package maintainer. Although of course there are a little less problems with systemd.
On other side as a user, I don't really like to guess exactly how a folder was created in /run, via tmpfiles or via systemd.
UPD: On SysV I have one complex, heavy script. Now I have the systemd service, the tmpfiles configuration, the /etc/conf.d parameters file and there is still a shell script to run. But if user wants reconfig something he need look 4 files instead one.
It's never been customary to adhere to KISS in Linux. This whole explanation reads like it came out of a game of Chinese whispers.
or maybe I didn't understand the question. If you about that change daemons to non systemd, then:
systemd-boot -> grub, lilo, efistub
systemd-networkd -> some system scripts (different for different distributions), netplan, NetworkManager
systemd-resolved -> dnsmasq, bind, set directly on 8.8.8.8
systemd-timesyncd -> chrony, ntp
journal -> rsyslog
systemd -> init.V, openRC
AFAIK, nspawn is mostly a debugging tool for working with the init system without having to actually boot a live system/VM. At least that's all I've ever used it for.
It also a use case. =)
The documentation for systemd-nspawn itself says:
The developers themselves position the daemon as a simple alternative to LXD containers.
you do know what the linux kernel is, right?
Spoiler: It's a monolithic kernel
In the end your distro packager decided to not split systemd into different packages, I believe only Gentoo does actually guide you to this
so you actually barking on the wrong tree
I know that the core is monolithic.
I installed these services myself, not all of them, of course, but those that I listed at the end. I know about the rest simply because I prefer to read the documentation for the services I work with. I'm not particularly happy with the systemd system as a whole. however, since there is no better alternative, the choice is small.