Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions about Switching to Runit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Tue Jun 13, 2017 2:21 am    Post subject: Questions about Switching to Runit Reply with quote

Hi,
I've been looking into other init systems partially out of an interest in seeing how some of the other ones work (runit, systemd, et al have some interesting ideas in implementation). I'm not a big fan of systemd (I see why it exists, but have issues with how the developers act towards bug reports and have issue with the fact that it kind of spits in the face of Unix design), but runit has caught my eye. I managed to get it working with OpenRC (pretty easy to do, but it seems kind of pointless to be honest). I've seen a couple of posts on it where people have switched over to runit only, but I haven't seen any real documentation on actually switching. Before I make the switch, I also want to know what pitfalls others have come across when switching over. I have both the powerman and Ant P.'s overlays set up on my system, with Ant P.'s version of runit installed currently (from what I've read, the version in the Portage tree isn't being handled very well) and Ant P. seems to be the most well versed in making this switch from what I've seen, so if you're reading this I'd be interested in any advice you might have. When I last attempted to switch over completely as per the instructions in the Wiki (which are really more of a side note, understandable since OpenRC is the default) using Ant P.'s version it would get stuck switching to runlevel 2. I'm wondering if I'm missing some packages or something. It seems like an interesting project, but I'd like to see some more documentation on it. I don't mind tinkering with it to get it working, I just need to understand what exactly I'm looking at lol. Maybe if we can get some basic documentation up for it, more users will be interested in it and development in the main Portage tree will actually start moving along.


EDIT: Okay well I did a little more looking. I am using the latest version of runit in Ant P.'s flussence overlay. Boot up immediately stops when it tries to check if /proc/cmdline and /proc/mount (may be a slightly different name) exist. In /etc/runit/1 I did an ls on /proc and that directory is empty. I suspect it's not mounting the filesystems so I need to add that into /etc/runit/1. I found this an article on setting up runit (it's on my laptop, if anyone wants to see it, I'll post it next time I get a chance), but it has you write runit-init (I assume that's what it's supposed to be, it sits in /sbin/init). That file has you mount the file systems, so I wonder if I can just take the mounting part and add it into /etc/runit/1. Once I have this figured out, I'll write a post that goes through the steps of replacing openrc with runit.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jun 15, 2017 12:55 am    Post subject: Reply with quote

Odd that it freezes there, /proc/ should have been mounted by openrc sysinit at that point. Are you using the /etc/runit/1 that the ebuild installs, an upstream script, or something else?
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Thu Jun 15, 2017 1:21 am    Post subject: Reply with quote

Sorry, I must not have worded that well.

Runit works fine with OpenRC, but my goal is to completely switch to runit.
I'm using the /etc/runit/1 that came with the ebuild in your overlay. To get it to work with OpenRC I just needed to add
Code:
RUNLEVEL=S /bin/openrc default
or something like that (it had 2/3 of them).

Based on what I saw in the wiki, using only runit requires you comment out those 3 lines (makes sense, since they call openrc), and it's when I remove those that I run into that issue.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jun 15, 2017 5:10 am    Post subject: Reply with quote

To get rid of OpenRC you'll have to reimplement the parts that are used - everything in `rc-status sysinit boot`. There isn't a good standalone RC system yet and runit doesn't have a good way to do one-shot scripts itself.
Back to top
View user's profile Send private message
lcronos
n00b
n00b


Joined: 09 Jun 2014
Posts: 74

PostPosted: Thu Jun 15, 2017 10:06 am    Post subject: Reply with quote

Oh okay. I may end up just using openrc-init since that's just recently become available.

I may still do it with runit at some point, just to learn how all of that is implemented (I'm taking an operating systems class after this summer, so it would be helpful to see how Linux start up works). Hopefully runit by itself will be more feasible in the future. I'm tempted to install Void Linux to a flash drive so I can see how they set it up.

Thanks for your contribution to running runit though, your overlay and your scripts repo have some helpful stuff. I'm not sure if you've considered it, but I think it would be helpful if you tarred the contents of your scripts repo, and made that a package in your runit overlay.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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