The officially official Devuan Forum!

You are not logged in.

#26 2020-10-24 14:52:53

thierrybo
Member
Registered: 2017-11-11
Posts: 74  

Re: [HowTo] runit-init as PID1

By the way I was wondering which Debian packages already provides runit scripts in testing:

apt-file search /etc/sv | grep -o ".*:" | sort | uniq
acpid:
axfrdns:
bcron:
dnscache:
dnsmasq:
getty-run:
git-daemon-run:
irqbalance:
mini-httpd-run:
mongrel2-run:
opendnssec-enforcer:
opendnssec-signer:
openssh-server:
rbldns:
remotetrx:
socklog-run:
svnkit:
svxlink-gpio:
svxlink-server:
svxreflector:
tinydns:
tor:
walldns:

Offline

#27 2021-02-09 09:51:11

Lorenzo
Member
Registered: 2020-03-03
Posts: 14  

Re: [HowTo] runit-init as PID1

If someone wants to experiment with additional runscripts, see
https://dev1galaxy.org/viewtopic.php?id=3716
post #7

Lorenzo

Offline

#28 2021-03-05 11:49:07

Geoff 42
Member
Registered: 2016-12-15
Posts: 403  

Re: [HowTo] runit-init as PID1

On a fresh install of Chimaera in a VM under Xen,
https://dev1galaxy.org/viewtopic.php?pid=27870#p27870
I tried switching to runit-init.

apt install runit-init

It was still running with the old init so I wanted to reboot it. From Dom0 I tried to shutdown via Xen

xl shutdown chimaera

which had no effect, so I hit it with a bigger hammer

xl destroy chimaera

which did stop it!

On booting it again it recovered the disk from the journal, but did come up.
It gave no login prompt, which was due to my not having set up the virtual console for Xen, hvc0.
However, reconnecting to Chimaera via ssh and VNC worked as normal.

The only services running under runsvdir are getty and ssh.
To set up hvc0 as the console, I copied the set up for tty1.

cd /etc/sv/
cp -rp getty-tty1/ getty-hvc0
cd getty-hvc0

edit run and finish to change tty1 to hvc0

rm supervise
ln -s /run/runit/supervise/getty-hvc0 supervise
cd /etc/sv
runsv getty-hvc0

This does not return, which I believe is correct, and the login prompt now appears on the console (the window on Dom0)

To set it up to work automatically needs it linked in to /etc/service

cd /etc/service
ln -s /etc/sv/getty-hvc0/ .

The other glitch is shutting it down.

Using LXQt to shutdown closes the LXQt window but I was still logged in on the console.

shutdown -hH now

did not shut it down.
Coming back to Dom0 I was able to give the command to Xen to shut it down

xl shutdown chimeara

which did work.
Having booted it up again, I was able to shut down with

init 0

I noticed that /sbin/shutdown is a link to /lib/runit/shutdown

Geoff

Offline

#29 2021-03-08 06:28:24

calibius
Member
Registered: 2021-03-08
Posts: 1  

Re: [HowTo] runit-init as PID1

john2009w wrote:

When I ran `# apt install runit-init`, it said:

...
dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:
 init depends on sysvinit-core | runit-init: however:
  Package sysvinit-core is to be removed.
  Package runit-init is not installed.
...
Unpacking runit-init (2.1.2-36) ...
Setting up runit-init (2.1.2-36) ...

And there was no question asked like, "To continue type in the phrase" etc. Is this normal?

However I ran `reboot` and it said at the end:

Will now restart.
Give root password for maintenance
(or press Control-D to continue):

New to Devuan, but I finally got fed up with Systemd on my Raspberry Pi, so I just installed Beowulf on my Raspberry Pi 3B (rev1.2). I used the images supplied at https://arm-files.devuan.org/ which are super easy to use, but do not offer options to install runit during install. So I just switched following the OPs instructions and I had this same error message:

sudo apt install runit-init
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fgetty getty-run runit runit-helper sysuser-helper
The following packages will be REMOVED:
  sysvinit-core
The following NEW packages will be installed:
  fgetty getty-run runit runit-helper runit-init sysuser-helper
0 upgraded, 6 newly installed, 1 to remove and 0 not upgraded.
Need to get 199 kB of archives.
After this operation, 418 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.devuan.org/merged beowulf/main arm64 runit-helper all 2.8.6 [4,900 B]
Get:2 http://deb.devuan.org/merged beowulf/main arm64 sysuser-helper all 1.3.3 [3,844 B]
Get:3 http://deb.devuan.org/merged beowulf/main arm64 runit arm64 2.1.2-25 [109 kB]
Get:4 http://deb.devuan.org/merged beowulf/main arm64 getty-run all 2.1.2-25 [18.3 kB]
Get:5 http://deb.devuan.org/merged beowulf/main arm64 runit-init arm64 2.1.2-25 [40.1 kB]
Get:6 http://deb.devuan.org/merged beowulf/main arm64 fgetty arm64 0.7-5 [22.2 kB]
Fetched 199 kB in 2s (114 kB/s)
Selecting previously unselected package runit-helper.
(Reading database ... 65737 files and directories currently installed.)
Preparing to unpack .../runit-helper_2.8.6_all.deb ...
Unpacking runit-helper (2.8.6) ...
Selecting previously unselected package sysuser-helper.
Preparing to unpack .../sysuser-helper_1.3.3_all.deb ...
Unpacking sysuser-helper (1.3.3) ...
Selecting previously unselected package runit.
Preparing to unpack .../runit_2.1.2-25_arm64.deb ...
Unpacking runit (2.1.2-25) ...
Selecting previously unselected package getty-run.
Preparing to unpack .../getty-run_2.1.2-25_all.deb ...
Unpacking getty-run (2.1.2-25) ...
dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:
 init depends on sysvinit-core | runit-init; however:
  Package sysvinit-core is to be removed.
  Package runit-init is not installed.
...

BEFORE I restarted, I noticed it hadn't completely removed sysvinit, so manual removed it:

sudo apt remove sysvinit init

then reinstalled runit-init:

sudo apt install runit-init

which completed without errors, and then did as Head_on_a_Stick said and

gpasswd -a $USER input 

because I'm running headless over SSH.  Not sure if this is strictly necessary?
Not sure what you would have to do if you had restarted already... glad I caught it beforehand.

Last edited by calibius (2021-03-08 06:40:27)

Offline

#30 2021-03-11 20:21:39

Geoff 42
Member
Registered: 2016-12-15
Posts: 403  

Re: [HowTo] runit-init as PID1

Having reported some problems with shutdown, I have just discovered that the version supplied with runit-init does work, but with no arguments!

shutdown

Offline

#31 2021-03-13 16:35:26

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,873  
Website

Re: [HowTo] runit-init as PID1

calibius wrote:

then did as Head_on_a_Stick said and

gpasswd -a $USER input 

because I'm running headless over SSH.  Not sure if this is strictly necessary?

No, it isn't. Don't add users to the input group unless you have to.


antifa ftw!

Offline

#32 2021-03-29 14:03:55

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,959  

Re: [HowTo] runit-init as PID1

Back in June I posted in this thread and said there needs to be a live-config-runit package. Well, now there is. I forked live-config. The version currently in ceres includes live-config-runit. (11.0.2-1+devuan2). It will move into chimaera soon.

IMPORTANT NOTE:  If you have live-config installed, when you try to install runit-init, apt will want to remove live-config (and refractasnapshot, if that's installed.) The way to get around this is to include live-config-runit in the command to install runit-init.

For beowulf, I just made an easy single live-config-runit package that isn't in the repo. You can get that here: http://distro.ibiblio.org/refracta/file … u1_all.deb  Install it before you try to install live-config and after you install runit. (i.e. stuff might get put on the autoremove list. Just reinstall things if you need to.)

Another note: I did not replace the live-config init script with a run script. That's a project for a later date.

Offline

#33 2021-04-23 16:11:31

siva
Member
Registered: 2018-01-25
Posts: 245  
Website

Re: [HowTo] runit-init as PID1

Also worth noting that the beowulf installer lets you select runit as the system init.


the thomos project
thomos support thread
cynwulf wrote: "You should get some more sleep and spend less time on forums."

Offline

Board footer