Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dinit on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
JonathanILevi
n00b
n00b


Joined: 23 Apr 2022
Posts: 1

PostPosted: Sat Apr 23, 2022 4:40 pm    Post subject: Dinit on Gentoo Reply with quote

Has anyone used Dinit on Gentoo? I cannot find any thing about it.

I am currently primarily using Artix, which recently added support for Dinit. When I had to decide on which init system to use, I did some research and was quickly pleased with how Dinit does things. I keep trying to lookup Dinit and Gentoo, but Google is giving me nothing. I was just wandering if anyone has done it?

I am loving what I am seeing about Gentoo, and I want to try it out. I am particularly thrilled with the package manager, and how packages can be configured and not just installed in the one default way! I keep trying to like OpenRC, but I am continually unimpressed.

When I get a chance, maybe I'll try setting it up all myself...I'll definitely learn something.

https://github.com/davmac314/dinit
https://wiki.artixlinux.org/Main/Dinit
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1530
Location: South America

PostPosted: Sat Apr 23, 2022 11:03 pm    Post subject: Re: Dinit on Gentoo Reply with quote

JonathanILevi wrote:
Has anyone used Dinit on Gentoo?
Not personally.

JonathanILevi wrote:
I cannot find any thing about it.
Not surprising, Dinit itself is not even packaged, so you can't do e.g. emerge dinit. And even if you could, using it as an init system would not be officially supported, in the sense that Gentoo developers are allowed to close any bugs that you file about it to the bug tracker, with resolution = "INVALID" :). But that said, it could likely be done with some effort. There are Gentoo users who are sucessfully running unsupported init systems.

JonathanILevi wrote:
I am currently primarily using Artix, which recently added support for Dinit.
On Gentoo you would have two problems to solve. The easy one is packaging Dinit itself. Looking at its GitHub repository, it seems that the package provides just a bunch of C++ programs, and its build system is just a set of makefiles, so it should be easy to write an ebuild for it and putting it in a local ebuild repository. The hard one, which is shared by any other unsupported init system, is writing / adapting / getting from somewhere all the Dinit service description files that your computer would need, especially the ones that boot and shut it down, i.e. a Gentoo equivalent of Artix' dinit-rc package (I think that's what it's called). For supported init systems, the distribution developers do that work for you.
Back to top
View user's profile Send private message
fictitiousexistence
n00b
n00b


Joined: 04 Oct 2022
Posts: 4

PostPosted: Mon Jan 09, 2023 11:35 pm    Post subject: Reply with quote

I set up dinit yesterday on gentoo and have been testing it.
I stole the dinit scripts from artix and modified them to work on my system.
Definitely boots faster than openrc now.
Back to top
View user's profile Send private message
sokhapkin
n00b
n00b


Joined: 13 Jan 2005
Posts: 45
Location: N Ft Myers, FL

PostPosted: Mon Jan 23, 2023 12:57 am    Post subject: Reply with quote

fictitiousexistence wrote:
I set up dinit yesterday on gentoo and have been testing it.
I stole the dinit scripts from artix and modified them to work on my system.
Definitely boots faster than openrc now.


How the boot speed compares to openrc with

rc_parallel="YES"

in /etc/rc.conf?
_________________
Sergey Okhapkin
http://www.callwithus.com
Back to top
View user's profile Send private message
fictitiousexistence
n00b
n00b


Joined: 04 Oct 2022
Posts: 4

PostPosted: Tue Jan 24, 2023 1:24 pm    Post subject: Reply with quote

I removed openrc but it used to take around 10 seconds or so. Now its about 3 seconds.

In addition to using rc_parallel, you can symlink /bin/sh to /bin/dash instead of bash to help it boot faster.

There was a package to do this with eselect (https://packages.gentoo.org/packages/app-eselect/eselect-sh) but that package was removed.

So if you used that package in the past to symlink it to dash then you might want to recheck.
After the package was removed my /bin/sh was symlinked back to bash and I had to manually link it to dash.


sokhapkin wrote:
fictitiousexistence wrote:
I set up dinit yesterday on gentoo and have been testing it.
I stole the dinit scripts from artix and modified them to work on my system.
Definitely boots faster than openrc now.


How the boot speed compares to openrc with

rc_parallel="YES"

in /etc/rc.conf?
Back to top
View user's profile Send private message
ArsenArsen
Developer
Developer


Joined: 16 Jan 2023
Posts: 2
Location: Serbia

PostPosted: Fri Jan 27, 2023 10:30 pm    Post subject: Reply with quote

fictitiousexistence wrote:
There was a package to do this with eselect (https://packages.gentoo.org/packages/app-eselect/eselect-sh) but that package was removed.


As the news item that talked about this change said, this mechanism was replaced with app-alternatives/sh.

https://www.gentoo.org/support/news-items/2022-12-27-alternatives-introduction.html

As for dinit, it is quite possible to run alternative inits. I ran runit for the better part of two years before switching to systemd, and the maintenance was rather simple. I imagine dinit would go about the same.

Happy hacking!

EDIT: Please remember to also not conflate "boot that does less" with "faster boot". It is quite easy to forget some crucial part of the boot process when switching to alternative inits. To not deal with that, I just reused openrc sysinit and boot targets. In either case, hic sunt dracones.
_________________
choose Free, choose GNU/Linux, build it with Gentoo :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum