Switching init systems in Devuan

I have been running a hard install of Devuan for about 4 years.
I started as Devuan3 and it has survived inline upgrades to Devuan 4 and then 5.
I stated with the sysVinit init system… That is Devuan’s default. All the packages are geared to work with sysVinit.

Then I added runit to Devuan (without removing sysVinit).
All that happened was the init process (PID#1) was now started by runit. All the user services were still managed by sysVinit.
If I wanted a service to be managed by runit, I had to write a set of runit scripts for that daemon, and use the runit link farm technique to start/stop it.

So Devuan does not fully support runit. Its packages do not install any runit scripts, the user has to do it.
I decided therefore to remove runit, and just use sysVinit, but to add OpenRC so that I had some easy commands for starting/stopping daemons.
The swapover is quite easy

apt-get purge runit-init
apt-get purge runit-services
cold boot
apt-get install openrc
reboot using a special script

It now boots with OpenRC starting the init process, and
all the packages have their startup scripts in /etc/init.d
and it is easily managed with the OpenRC commands.

OpenRC is the default init system of Gentoo and Alpine.
My Devuan now looks like Gentoo, at least as far as init is concerned.

So two conclusions

  • switching init systems in Devuan is easy
  • if you are going to use Devuan, use the init system(s) that
    is best supported - ie sysVinit alone or sysVinit with OpenRC.

It is interesting to note where the term RC comes from.
There used to be a command in Unix called rc… it stood for ‘run commands’.
What rc used to do was take a file containing a list of commands, and run them one at a time in sequence… rather like a shell script, but without starting a new shell to run them in.
The BSD distros still use rc . OpenRC is not the same as the
original primitive rc it is a new version made in Gentoo by a person who worked on the Gentoo/FreeBSD project. OpenRC
is a suite of commands which enhance sysVinit rather than replace it.

So the original concept of running a list of commands from a file, without opening a shell, is what drives sysVinit and OpenRC, and most other init systems ( certainly runit and S6, I am not sure about systemd). … one does not want a shell running for every daemon that you start.

If you start a daemon by hand at the CLI ( eg you can just type sshd & and it will run as a background process. You start it in a shell… so that is different
and
that is the basic reason why init systems exist… to avoid starting daemons by hand.

Excuse me, I am getting carried away by the history of it.

4 Likes

@nevj
Interesting!!!
I have been experimenting witk Arch (systemd) Artix (openrc) and Gentoo (openrc)!!
Arch and Gentoo I can get to work but Artix Linux is a different animal.
Been trying to find a replacement for Gentoo, Arch has so far been the best. Might give Devuan a try.

3 Likes

What was the issue with Artix?
I have done 2 installs, one in a VM with runit, and just this week one hard install with S6. I had no problems

You are not confusing it with Antix are you? That can be tricky.

No not confused with Antix!!! It is just Artix installs, using a lot of Arch commands, and Artix and Arch do not play well with each other.

1 Like

I used a graphic installer. It may have improved since you looked at it.
https://wiki.artixlinux.org/Main/Installation
Did you do a base install?

I plan to use Artix to learn about S6. … and it is sort of my version of Arch… so I have it on HD and it is controlling grub on that disk and all is well so far.

1 Like

That is what I have now “artix-base-openrc-20230814-x86_64 ISO” I was hoping it would work as well as Gentoo.

Right, now I see the difference.
I did a full install… that was easy.
I can see that a base install might require some commands.


I have Arch and Artix in a Vbox VM.

Did you put that Artix in using a base iso?
Is it OpenRC?
How do you get along with pacman? I have trouble remembering
pacman commands.
Do you use AUR? How do you access that?

I am a raw beginner with Artix… trying to pick up hints.

Yes I did the base install, just like Arch, using the Artix installation guide, with the Mate DE and SDDM as the display-manager.

It is OpenRC, even used some of Gentoo nano commands.

I knew most of the basic pacman commands, so no trouble with pacman.

I will have to investigate AUR, and see if Artix supports AUR, Artix uses different repositories than does Arch, and the AUR would have to be added to the repository list. You must remember packages from the AUR are not supported by Arch or Artix.
Trying to put Artix on one of my laptops but am having issues running the media, I know Arch will run. Am trying to use GPT and UEFI.
I was wrong about the Arch AUR helper YAY!!! I just installed the YAY helper in my Arch VM, will try Artix later on!!! I used this website for reference!!!

2 Likes

Thanks that is a good reference.

Rosika is using yay… see her topic “Archlinux…”
There were some difficulties… your reference would have helped.

I am still learning here. I dont understand AUR or whether I even need any of its packages. It is a bit like PPA’s in Ubuntu… best avoided but you may be forced to use it.

That is what I have. … It worked, but I discovered that with UEFI the Calamares installer goes and writes grub without asking
my permission… whereas with Legacy boot, it asks.

2 Likes

Most packages can be obtained through normal repositories!!! I used yay to install gparted and the Arch AUR offers, something like 80000 packages!!! Still not sure on where and how Artix will use AUR.

You would think gparted would be in the official repo.

I do not care for Calamares, that is why I use the base ISO, about as fast as using Calamares!!!

It is, I just wanted to try yay!!!

So some packages are in both repos?

I have been building Artix today!!! First thing I did was to install the yay helper for AUR, and to get Artix or Arch built, with the packages I need, I had to install some packages from the AUR, especially packages concerning fonts.
The big difference between using Artix and Arch, is the difference between using OpenRC and Systemd or systemcll to enable packages. The rc-update does not always work with OpenRC as well as systemctl works for Arch.
This is not my first rodeo with running Arch, I ran Arch for several years before I started running Gentoo.
I may even dual boot my laptop with Gentoo and Arch. Getting tired of W10, so why not something different.
Bottom line is that Arch, Artix or Gentoo is no picnic to build but with time all can be built to a decent Linux platform.

2 Likes

Why are you fiddling with runlevels?. All I ever do is start or enable daemons. I always use the same normal multiuser runlevel. So I only use rc-service or rc-status. Never used
rc-update.

I can be quite primitive the way I do things.

Because some apps are in need of running at boot?