The officially official Devuan Forum!

You are not logged in.

#1 2020-06-22 17:45:47

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 767  
Website

[HowTo] runit-init as PID1

This guide shows how to use runit-init as PID1 in Devuan, it is primarily aimed at Jesse from Distrowatch smile

First, instal the runit-init package:

# apt install runit-init

APT will ask for a specific confirmation for the operation because replacing the init system is far from trivial, type in the required authorisation to install the package.

Next, reboot into runit-init. Check it has worked with

cat /proc/1/comm

The output should be runit.

That's it!

Last edited by Head_on_a_Stick (2020-06-22 19:41:04)


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#2 2020-06-22 18:57:27

golinux
Administrator
Registered: 2016-11-25
Posts: 1,951  

Re: [HowTo] runit-init as PID1

Thanks for doing this.  smile Did you send him a link to this post? IIRC, runit will not be officially supported until the Beowulf point release.

Online

#3 2020-06-22 19:04:21

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 767  
Website

Re: [HowTo] runit-init as PID1

golinux wrote:

Did you send him a link to this post?

I left a comment on the Distrowatch weekly page.


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#4 2020-06-22 19:32:38

minute27
Member
From: Venezuela
Registered: 2020-06-18
Posts: 1  

Re: [HowTo] runit-init as PID1

I just did it, and everything's working out fine.

minute27@dev1local:~$ cat /proc/1/comm
runit

I was already hoping that with Devuan I could make the switch to runit, but now it's possible. Thank you very much!

P.D.: The output of cat /proc/1/comm is runit, not runit-init

Offline

#5 2020-06-22 19:35:29

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 767  
Website

Re: [HowTo] runit-init as PID1

minute27 wrote:

P.D.: The output of cat /proc/1/comm is runit, not runit-init

Corrected, thanks!

Debian has had very good integration with runit for a long time now but it's much trickier to switch to runit-init because of the systemd-logind entanglement, Devuan solves that problem nicely.


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#6 2020-06-22 21:24:45

andyprough
Member
Registered: 2019-10-19
Posts: 4  

Re: [HowTo] runit-init as PID1

That did the trick, thanks! runit on Devuan 3 with Linux-libre (with other non-libre software and firmware removed), and with KDE 5.18.5 from Norbert Preining's repos. All working together well so far.

Offline

#7 2020-06-24 15:03:50

macondo
Member
From: Central America
Registered: 2017-06-11
Posts: 47  

Re: [HowTo] runit-init as PID1

bobo@foo:~$ 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:
  init sysvinit sysvinit-core
The following NEW packages will be installed:
  fgetty getty-run runit runit-helper runit-init sysuser-helper
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  init sysvinit-core (due to init)
0 upgraded, 6 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B/202 kB of archives.
After this operation, 413 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say
Abort.
bobo@foo:~$

Desktop Celeron 4 GB RAM - Devuan Beowulf - Slackware Current - Grub - IceWM
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22

Offline

#8 2020-06-24 18:07:46

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 767  
Website

Re: [HowTo] runit-init as PID1

macondo wrote:
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say

The trick is to type in the requested phrase — prepending the phrase with a question mark and a square bracket will not work wink

EDIT: and you missed the exclamation mark.

Last edited by Head_on_a_Stick (2020-06-24 19:31:45)


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#9 2020-06-29 15:06:46

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

Re: [HowTo] runit-init as PID1

The question mark and square bracket are the prompt. I got the same. And it did what I said!

And more...

This required some minor hacking to get around dependency issues. When sysvinit gets removed, live-config-sysvinit and refractasnapshot go with it. I copied all the files into place and it works. There needs to be a live-config-runit package.

user@refracta:~$ cat /proc/1/comm 
runit
user@refracta:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            480M     0  480M   0% /dev
tmpfs            99M  392K   99M   1% /run
/dev/sr0        965M  965M     0 100% /run/live/medium
/dev/loop0      927M  927M     0 100% /run/live/rootfs/filesystem.squashfs
tmpfs           494M  440K  493M   1% /run/live/overlay
overlay         494M  440K  493M   1% /

System was installed in a VM, and the live-iso was made with refractasnapshot.
The iso boots in qemu and also isohybrid usb boots on hardware. Stuff works.
This is in beowulf. I think aitor may have done this already. I'm surprised at how easy it was.

Offline

#10 2020-06-29 15:12:27

brocashelm
Member
Registered: 2020-06-29
Posts: 7  

Re: [HowTo] runit-init as PID1

This worked for me. Runit is a lot faster than all the other inits I've tried, so it's great to see this option finally available on a Devuan base!

Offline

Board footer