[HN Gopher] OpenRC is a dependency-based init system for Unix-li... ___________________________________________________________________ OpenRC is a dependency-based init system for Unix-like systems Author : mariuz Score : 111 points Date : 2023-06-27 17:18 UTC (5 hours ago) (HTM) web link (wiki.gentoo.org) (TXT) w3m dump (wiki.gentoo.org) | nickstinemates wrote: | I really love OpenRC, and Gentoo in general. It's my favorite | linux distro by far. | contingencies wrote: | Me too. It has the best and only package management system with | the required configurability for many complex but real | situations that make other distros a non-option. The biggest | drawback of course is if you don't update a box for awhile you | have to redo from stage3 - rolling releases are a double-edged | sword. In theory, portage solves this. In practice, it just | gets to a certain level of ungrokkable problems and you have to | pull the parachute. Currently battling with ZFS root (stage3 | and portage snapshots on same filesystem) as a workaround. It's | nontrivial getting that up and running again. But once I do | it's probably going to be a stable workhorse for 5+ years. I'm | done with Apple. | VTimofeenko wrote: | That parachute even comes with a spare for some open heart | surgery on a system. Migrating no-multilib -> multilib is | totally doable with some careful chrooting and a rebuild from | stage1. | redog wrote: | Zfs root on my daily driver machine is held together by... | blood sacrifice .,built it's first kernel in Feb 2014 and | have rescued it at least three times from catastrophic update | neglect | | I finally killed a fedora install 2years unupdated...I quit | trying to restore it after an hour and just took my data off | wkat4242 wrote: | Try FreeBSD. ZFS on root is like a concrete foundation <3 | contingencies wrote: | 'zfs root on gentoo': _The way that can be named is not the | way._ But it 's damn close. | redog wrote: | A zfs root implementation on a Gentoo system(which builds | the zfs system it depends upon)... | pxc wrote: | When I was a teenager adventuring through the GNU/Linux userland | and all its interchangeable components (including on Gentoo!), | OpenRC was awesome compared to what I was used to (SysV). | Beautiful colorized output, fast startup with parallel execution | of jobs... all before Upstart (RIP, though I don't miss it) and | Systemd. | | I'm pretty happy with Systemd these days, and in some ways I | don't mind the way it has 'standardized' (read: dominated) Linux | stacks. But I'm glad that people are still doing the work to keep | OpenRC viable and integrating it into a full-featured, long- | lived, relatively popular distro. | skldjfhskdfgh wrote: | i was fine with systemd for a few years, even truly enjoying | getting rid of hacky docker workflows in place of machined. | | then i start to find out it is full of rando backdoors intended | for VMs, which will run just the same on your bare metal. For | example, just to list the very last one, you can inject smbios | data that will be parsed to create files in your system. very | convenient to drop passwords and keyfiles around a vm... unless | it is the firmware on your actual bios doing the same. And we | know how common persistence via bios is. sigh. | | but as you mention correctly, it have crushed and dominated | linux. so i guess i just waste a week or some working around | those things later, as usual. | Asooka wrote: | The unit and service file formats are honestly fine, it | should be possible to have a second implementation. We have | several varieties of SysV init already. | dv_dt wrote: | It may shift to a different community balance seeing how | RedHat employs a lot of the main contributors to systemd and | more recently are showing signs of acting in a more closed | manner. | gary_0 wrote: | The main systemd guy, Lennart Poettering, recently left Red | Hat to go work for Microsoft. Hmm... | dv_dt wrote: | Oh I didn't realize that. Maybe similar teeth, different | dragon. I'm cautious about Microsoft, but recently I'd | have to say they've been a reasonable Linux community | member - though if there are fewer larger balancing orgs | - who knows. | inetknght wrote: | > _about Microsoft, but recently I 'd have to say they've | been a reasonable Linux community member_ | | All it takes is to look around at what Microsoft is doing | to _gestures vaguely_ to see the writing on the wall for | how Microsoft sees Linux. | | Advertisements on the home screen? Advertisements on the | every screen? Login darkpatterns? Configuration resets on | updates? Forceful browser choices? Forced updates? UEFI | shenanigans? Boot manager shenanigans? | hawski wrote: | Being now run increasingly more and more by IBM mothership | I guess systemd may become a very profitable cow to fatten | for them. | wkat4242 wrote: | How though? How will they make money off it? | | I do think they had commercial aspirations work systemd, | but more about "being the company that invented..." Than | a direct cash cow. | | This is in contrast to the play canonical makes with | snaps that has 30% app store tax written all over it. | Eduard wrote: | > then i start to find out it is full of rando backdoors | intended for VMs, | | Do you have some links to share? | avhception wrote: | Gentoo was the first distro that lead to me really | understanding what was going on. | | So OpenRC was "normal" for me, and when the systemd debate came | around I didn't think about the fact that OpenRC wasn't the | norm and folks hat been using SysV init all that time. | | I'm still a Gentoo user these days (although not as heavily, | the laptops are running Fedora nowadays), but running systemd. | The unitfile format is really great. | alerighi wrote: | I also remember it, first time I installed Gentoo for it, it | was very nice compared to the alternatives. Also very | configurable, easy, and did also have an interactive boot mode | to debug a system that didn't start. | PrimeMcFly wrote: | How does it compare to Runit[[0] used by Void Linux? | | [0]http://smarden.org/runit/ | euclaise wrote: | Runit is way more minimal, the difference between them is | extreme even on that alone | arp242 wrote: | I wouldn't say it's "more minimal", it just operates on an | entirely different set of principles and assumptions. | felixgallo wrote: | finally, a modern alternative to systemd. | bitwize wrote: | Systemd is a complete solution to a variety of problems with | system services under Linux, including user sessions, non-racy | session termination, etc. | | Other init systems, not so much. | | There are no alternatives to systemd, kinda like there are no | alternatives to Excel. Some packages solve many of the same | problems, but none solve all of them as thoroughly. | timw4mail wrote: | Systemd is a hydra, gradually strangling more and more | existing functionality with replacements of questionable | utility. | ape4 wrote: | And it uses Linux native services like cgroups for isolation. | blablabla123 wrote: | > non-racy session termination | | I've seen a lot of dangling sessions with systemd actually | although I'm not sure what the root cause is. | anthk wrote: | >non-racy session termination | | The irony it's hard there. SystemD it's the only init system | which gave me errors trying to shutdown a machine... | | >alternatives to Excel | | You are right. Both systemd and Excels are turds. Excel | mangled genomics data making it unusable and forcing | _scientists_ to rename sequences in order to not clash with | Excel 's internal names. That's utterly crap and a severe | step backwards from scientists from the 90's used to be | around Unix/GNU-Linux envs where they were utterly free to | name whatever thing in almost any way they wanted. | chaxor wrote: | What scientist would ever even consider excel in the first | place? | bombela wrote: | Same systemd often hang at shutdown and I cannot be | bothered to understand why. | | My biggest issue with systemd is the log system. It is so | stupidly slow, that I don't think it is possible to make it | that slow without purpose. It literally takes minutes to | grep though logs on any of my machines with journalctl. | | In fact it is so slow. It is faster to first eat the few | minutes to extract the logs into a text file. Which I can | then grep through in milliseconds. | | Oh and the raw text file takes less space than the systemd | log database! | jandrese wrote: | [flagged] | rkeene2 wrote: | Yes, I have a software watchdog specifically because | systemd sometimes fails to reboot correctly :-) | krzyk wrote: | Systemd is a solution to problems that exist in rare corner | cases. | | We had a nail and all we needed was a hammer, instead we got | a hydraulic press. | wener wrote: | Systemd is a complete solution to a variety of problems may | not exists. :P | hackcasual wrote: | OpenRC predates systemd I believe | hedora wrote: | That doesn't mean its initial design didn't learn from the | mistakes systemd made. | edgyquant wrote: | How could that be possible if it predates systemd? | Arnavion wrote: | It's also not a complete alternative, because it doesn't have | anything for user session services like `systemd --user`. I | use postmarketOS which is based on Alpine which uses OpenRC, | and desktop session daemons currently have to be started by | the compositor via XDG autostart files. So services start | fine but they're not restarted if they crash, they have ad- | hoc logging, etc. | | One of the pmOS devs wrote a user session service manager [1] | but pmOS doesn't use it (yet?). And Alpine as a whole is | planning on moving away from OpenRC anyway. | | [1]: https://git.sr.ht/~craftyguy/superd | jabl wrote: | Oh, what is Alpine planning to move to? | Arnavion wrote: | https://news.ycombinator.com/item?id=36496431 | jmclnx wrote: | And it is portable to the BSDs, what a concept, writting | portable applications :) | | To bad that is now out of fashion. If the BSD software was not | portable Linux would not have gotten off the ground. | Arnavion wrote: | If there was a portable implementation of namespaces that was | implemented by both Linux and BSDs, then sure systemd could | be made more portable. Otherwise the only reason OpenRC is | more portable is that it does not isolate services in the | first place (as systemd does using namespaces). | PlutoIsAPlanet wrote: | It's a system service manager, it being portable is not a | requirement nor any benefit when BSD has nearly no traction | in the desktop or server space other than a few cases. | jmclnx wrote: | Some complex applications are starting to require systemd | components. So yes, portability may become important to the | BSDs. | Gud wrote: | Which applications? | bmacho wrote: | GNOME since more than 10 years | yjftsjthsd-h wrote: | > it being portable is not a requirement nor any benefit | when BSD has nearly no traction in the desktop or server | space other than a few cases. | | Is your argument that portability is irrelevant because | nothing but (systemd/)GNU/Linux matters, or that service | manager in particular don't need to be portable? | lockhouse wrote: | BSD is used in a lot more than you think due to solid | engineering and a non-viral commercial friendly license. | redog wrote: | Daemontools for maximum minimumness | throw7 wrote: | Didn't know there was a standalone logind. Reminded me of how | they broke vnc sessions. Still kind of annoyed at that one. | jpgvm wrote: | Loved OpenRC when I was still a Gentoo daily driver. | | These days on I'm systemd like almost everyone else but I will | never forget how advanced it felt for it's time. | | It predated Upstart and systemd by several years but was already | fully event-based with parallel execution etc BUT it didn't | sacrifice the best parts of sysv to get there. At the end of the | day you still had a bunch of relatively easily to debug shell | scripts. Running Gentoo with OpenRC meant booting in a fraction | of time of other distros out of the box. | | I appreciate the format of systemd unit files but they result in | much of the complexity, corner cases etc being baked into systemd | itself reducing debugability. systemd has it's own killer | features ofc like systemd-nspawn and friends. | messe wrote: | You should try Gentoo+systemd these days. I'm running KDE | Plasma on my gaming PC, and it works pretty smoothly. Wayland | still has a few rare hiccups, as I'm on NVIDIA, but for the | most part works without issue. | srgpqt wrote: | It's been the default (only?) init system for Alpine Linux since | forever. | Arnavion wrote: | Alpine is hoping to replace it with s6. | Pet_Ant wrote: | For those who haven't heard of s6 before (like myself) here | is the homepage: https://www.skarnet.org/software/s6/ and the | repo: https://github.com/skarnet/s6 | wener wrote: | Not by s6, but s6 author may introduce a new init for alpine | generalizations wrote: | Either way, I've been watching that s6 project for a couple | years now and am looking forward to when that happens. Is | there any progress on that front? I hadn't heard that the | replacement might not actually be s6. | jiripospisil wrote: | Not really. | | https://old.reddit.com/r/AlpineLinux/comments/ug3ipr/any_ | new... | systems_glitch wrote: | Yup, we use Alpine on all of our hypervisors, the init system | has never been a problem :P | puzzlingcaptcha wrote: | Few might remember that Alpine was originally based on Gentoo. | You can still find some old references (like mkinitcpio hooks | for fbsplash). | klardotsh wrote: | Possibly the biggest hint is /etc/apk/world, the "worldfile", | or the list of explicitly installed packages. It's even the | same verbiage Gentoo uses (albeit a different location - | Gentoo stores it somewhere under /var) | slicktux wrote: | Oh, yes, OpenRC...my choice init when I was using Gentoo! I | recall the controversy of OpenRC vs Systemd and the flame wars in | IRC... | bamfly wrote: | I've used several Linux init systems over the years. | | OpenRC is the only one I've ever _liked_ using. Not sure why it | never seemed to catch on with any of the major distros, even | before Systemd made itself nigh-unavoidable. | agumonkey wrote: | it's strange that "liked using" isn't the goal in general | zh3 wrote: | Probably not a popular opinion in a systemd world (and being | responsible for a lot of critical systems where things don't | change much but absolutely have to work every day), the nice | thing about sysv is all you need to know a little bit about | shell commands and every day is groundhog day (i.e. not getting | any calls because X has broken after touching Y). Not great for | companies selling support, but great for those selling high- | rel. | linksnapzz wrote: | I agree; not so much that I've found systemd to be | unreliable, so much as that it is far more opaque than even | the most involved SXX/KXX SysV shell script; I can debug a | shell script, but when systemd does do something unexpected, | it's utterly inscrutiable. | taneliv wrote: | I have serious dislike for what I perceive as (unnecessary) | complexity of Systemd. I made a quick analysis of different | init systems when that nigh-unavoidability had not yet | happened. OpenRC seemed then the most reasonable of the ones I | read about (for qualities I have since forgotten), and your | comment stirred this memory. | | So, a question: why did/do you like using it? | bamfly wrote: | Found the ergonomics of rc-update and other commands | exceptionally decent, and consistent enough that I could | usually guess the correct invocation even if I hadn't used it | in a while. Never saw it break or tie itself in knots (which, | on Gentoo, at least as I managed _my_ Gentoo systems, was an | accomplishment). I find the config syntax non-awful. Every | other init system I 've tried is worse (IMO, obviously) on | one or more of those fronts, and not enough-better on any | others to make up for it. | arp242 wrote: | I use OpenRC to start runit on my Alpine systems, and use runit | to manage everything else. | | I had some trouble getting the OpenRC script "just right", and | figured this was easier. The systemd people really were right | about SysV init being not-so-great (which, of course, doesn't | automatically mean systemd is the answer). | | The overall principles and usage of runit (e.g. just keeping | stdout/err attached) is significantly simpler than the whole | "daemonize" dance. | timw4mail wrote: | Last I checked, OpenRC is still the default init system | recommended in Gentoo setup. | Arnavion wrote: | Gentoo setup involves completely different downloads depending | on whether you want OpenRC or systemd. It's not like there's a | single installer that you run which lets you choose between the | two and has OpenRC as the default choice. They're both | equivalent and the installation handbook doesn't suggest either | one over the other. | | Of course I have no doubt that there are more Gentoo users that | use OpenRC than systemd, and I wouldn't be surprised if outing | yourself as a systemd user will get you flamed in tech support | channels :) | Zambyte wrote: | I don't think there is anything really stopping you from | standing up a Gentoo system with OpenRC from the systemd | installer or vice versa though. It seems really more like a | convenience than a requirement to have both installers. | Arnavion wrote: | To be precise, there is a single installer image that you | boot and use to create the partition layout. Then you pick | a stage 3 tarball and unpack it into the root partition, | and this tarball is either OpenRC-specific or systemd- | specific. | | Yes it is possible to change your mind and switch from one | to the other after installation, but it's not | straightforward. | djbusby wrote: | IIRC the Kernel needs to know which one you use too. | Flowdalic wrote: | The kernel usually just needs to know which binary to | execute as init, which is often provided as kernel | command line argument by the bootloader. | djbusby wrote: | I use syslinux, which is manually updated, no init is | passed in. | | In the Gentoo kernel make menuconfig there are options | for Systemd vs OpenRC - not entirely sure what they do. | djbusby wrote: | I lurk the Gentoo IRC & mail (15+ years). I've never seen any | systemd flames (not that they never happened). Gentoo IRC has | always been helpful - even when I want to do stupid things. | drbawb wrote: | I tried to setup a Gentoo system for fun last weekend. | (Crazy idea of a "fun weekend," I know.) I got to selecting | a profile and wondered why there was no `systemd-hardened` | profile. I was googling to try and understand what the | hardened profiles do and found this thread[1] which said: | "My personal opinion, having read many of the threads I've | referred you to is that systemd and security go together | like windows and security. That is, its an oxymoron." | | Maybe we have different ideas of what constitutes flaming, | but to me comparing somebody's choice of operating software | to the "W-word", in a linux distro support forum, is about | as inflammatory as it gets. Saying that systemd is | insecure-by0definition is also quite rude. This is several | years old, and I'm sure things have changed in the | intervening years, but as a perfectly happy systemd user I | can say that thread definitely left a sour taste in my | mouth, at least initially. | | [1]: | https://forums.gentoo.org/viewtopic-t-1029642-start-0.html | timw4mail wrote: | Apparently it's been a while since I've had to go through | that section of the manual. | wkat4242 wrote: | I don't like systemd, but I'm not too convinced by openrc. | | I know alpine has the inventor of s6 working on a service manager | based on that and I have higher hopes for it. ___________________________________________________________________ (page generated 2023-06-27 23:00 UTC)