The officially official Devuan Forum!

You are not logged in.

#1 Re: Installation » Running QEMU/KVM with runit » 2026-02-14 20:17:03

Hi,

When I try to install libvirt-daemon-driver-qemu it complains:
...
Is there any way I can run QEMU/KVM while using runit?

I just filed a bug in Debian (it seems the package is not forked because it's installable with sysvinit-core)

https://bugs.debian.org/cgi-bin/bugrepo … ug=1127985

let's hope that the maintainer accepts my suggestion for a fix

Best,
Lorenzo

#2 Re: Documentation » An unofficial Guide to runit on Debian-derived distros » 2026-02-14 16:23:34

Hi Mercury,

thanks for the guide! as it was said in other posts I haven't found yet the time to write a comprehensive guide/documentation to runit, for several reason:
time constrains of course, but also parts of the runit debian integration are still under development and I prefer to finish before writing a guide (it will be obsolete soon otherwise).
I try to keep manpages up to date though, so I suggest reading

man invoke-run
man update-service
man cpsv

Also I try to keep README files in runit and runit-servics packages up to date

/usr/share/doc/runit/README-*
/usr/share/doc/runit-services/README.gz

If not installed by default (not sure), I suggest to install apt-listchanges package
to read the NEWS during the upgrade (I do write NEWS when there are important changes)

that said let me add few comments on top of your guide:

/etc/sv/
Contains installed (but not necessarily enabled) local services. Services installed and managed by the local admin and/or manually converted from other init systems (systemd, sysVinit) should exist here. Enabled services should be the targets of symbolic links in /etc/runit/runsvdir/default/ (see above)

this is correct and is the desired end state, however there are still packages (getty-run, openssh-server, acpid, tor, irqbalance and few others)
that are using the legacy layout and install the service directory directly in /etc/sv/ (without metafiles, the legacy runit-helper is used instead of trigger_sv): I still have to organize the transition.

This important behavior lacks official documentation. At boot time, a service sync occurs.

be aware that, as the name may suggest, trigger_sv run as a dpkg trigger at the end of each apt operation (install/remove/upgrade), so the sync happens at runtime; then a sync was added to stage 2 to ensure that the first time you boot runit after an init-switch (sysvinit --> runit-init) the state of services is synched with defaults.
At runtime the trigger loop takes care of enable/disable services, but it also runs the second ("upgrade") loop that make sure that running services are restarted (or reloaded) when their binary is upgraded.
The upgrade loop is very important for security: if the running instance is not upgraded it may still be affected by CVEs while the package changelog claims the issue is fixed..

There is no intended configurable way to override this behavior globally for all services, and there is no intended configurable way to prevent the runtime copies from being created. However, the following methods will work:

To disable all service sync and auto-enable behavior, edit /etc/runit/2 and comment out the call to /usr/lib/runit/trigger_sv. Be aware that a future update of runit is likely to erase this change and it will have to be re-applied.

/etc/runit/2 is a conffile so dpkg will ask at upgrade if you want to keep your version or want to use the package version, no automatic overwrite will happen: but this wont stop the runtime dpkg trigger invocation.

If you want to override something (including metafiles) inside a service directory that is in /usr/share/runit/sv.current , the intended way is
create a copy in /etc/sv/ and maintain it by yourself (it won't be automatically overwirtten at upgrades, and there is no dpkg prompt so you have to import bugfixes by yourself).

(better if runit >= 2.2.0-7 is used for this)
As example for cron, you can do
(make sure there is no /etc/sv/cron dir first)

#cpsv p cron

than you can remove any symlink and replace it with a real file that includes your changes
to inspect the diff later you can do

#cpsv d cron

if you want to override *all* services dir in /usr/share/runit/sv.current then writing copies in /etc/sv/ is no longer practical: the metafiles interface and cpsv are designed to allow to roll your local/private collection in place of services provided by packages, but I haven't tested this myself yet and the operation is dangerous if done at runtime (if a directory disappear from runsvdir directory, the service is stopped, so guess what can happen if you switch the target of symlinks in /usr/share/runit/ the wrong way..) so I won't document it here for now.

Best,
Lorenzo

#3 Re: Hardware & System Configuration » Daedalus 5.01 desktop, Runit version, logrotate error spotted » 2025-06-09 23:26:35

if you are going to fix it by yourself (instead of upgrading to unstable) the following two-step fix should work:

1: copy this file (rsyslog-rotate-runit)
https://salsa.debian.org/debian/runit-s … type=heads
into /usr/lib/rsyslog
and make it executable;

2: in file /etc/logrotate.d/rsyslog

replace the code in line 16

/usr/lib/rsyslog/rsyslog-rotate

with the following

for f in /usr/lib/rsyslog/*; do "$f" ; done

Hope it helps,
Lorenzo

#4 Re: Hardware & System Configuration » Daedalus 5.01 desktop, Runit version, logrotate error spotted » 2025-06-09 14:30:47

what verison of runit and runit-services do you have?
Your first post says you are using Daedalus, the fix is in Excalibur (runit-services 0.9.1, runit 2.2.0-3).

(see also my comment in https://bugs.debian.org/cgi-bin/bugrepo … 1092031#84
as you may want to rename the file to avoid harmless but spamming errors in log file)

Lorenzo

#5 Re: Devuan » Devuan runit system pauses during first boot at net connect manager. » 2025-01-11 18:54:46

Hi!

services in /etc/sv/ are available but not necessary enabled:
to get the list of services managed by runit use

# sv s /etc/service/* 

that said, there is a bad bug[1] in runit-services package that may be relevant here, so it's worth a try:

dhclient is automatically enabled as service but usually it should not be, as it clashes with other services that
are trying to manage network connections (network-manager, connman, wicd, etc..).

At OP: please try to disable the dhclient service, with

# update-service --remove /etc/sv/dhclient

then reboot.
I'm not sure this is enough to fix your problem with KDE network applets, but it's sure a necessary step.
It may also improve the boot sequence performance as network-manager clashing with dhclient may
slowdown the boot process. Sorry for the inconvenience.

Hope this helps,
Lorenzo

[1] fixed in unstable, stable update pending, but it still requires manual fixing as described above on upgrading installations hmm

#6 Re: Hardware & System Configuration » Excalibur, runit's supervision tree inherits tty1, misbehavior » 2024-10-25 15:33:22

Hi Alverstone,

I redirected runsvdir output to /dev/tty10 on my system and  tested  <sysrq>+K on tty1 and it brings down the system;
tested again, and it's actually the

exec <>

that does the trick and shields runsvdir from <sysrq>+K

I would like to address them all, and keep a log or runsvdir if possible..

I should have been more precise, apologise if this wasted your time in search of a solution with a proper log:
what I mean is that it's preferable to not discard completely the runsvdir output by default; it doesn't have to be necessary a proper log file.

since output to tty and exec <> does the trick I think I prefer that to proper fifo.

Issue with the fifo is what happens if the buffer is full and there is nothing reading on the other side, I'm not sure if that can affect runsvdir in a bad way, that would be a problem.
What I fear (more than the race between lines written and runsvdir-log startup) is that a user can disable the runsvdir-log service because he doesn't care and then, due to some service malfunction later, the buffer slowly fills up.
Runsvdir output 1 line per second for each non functional service (example run not executable or not found); how many line it takes before the fifo buffer is full?

On the other hand is hard to predict if a ttyN is available in a system; only thing that is granted to be there is /dev/console (reason why runit outputs there, I think) but /dev/console is connected with tty1, so we are at the starting point..

I agree with the logic you proposed for stage 2 but I prefer something more simple; your proposed code could be fine if I roll runit specific bootscripts but for now I prefer to keep stage 2 more simple. I'm thinking of an hardcoded list of  /dev/* with a fallback on /dev/console;
I think standard system (desktop, laptop, server) have plenty of tty; less sure about embedded hardware (raspberry, arduino or even more essential hardware); there is also the container case to cover.

Something like (recycling you code, simplified)

for out in tty12 ttyS1 tty1 console; do
  if [ -c /dev/"$out" ] ; then
     PIPE="/dev/$out"; break
  fi
done
exec <>"$PIPE" >"$PIPE" 2>"$PIPE"
exec env - PATH="$PATH" runsvdir -P "${SVDIR}"

your code is certainly more configurable from user point of view,
but unfortunately I fear is also more fragile if the user is not aware of the fifo.
let me know if you  see shortcomings or you have more thoughts on this; I intend to
add a fix for this in the next runit upload to unstable.

Thanks for your ideas!
Lorenzo

#7 Re: Hardware & System Configuration » runit: exim4 is broken » 2024-10-21 21:26:02

Hi,
regardless how bad it's exim4, either it need to be fixed or dropped from runit-services package.
I'll have a look, thanks for reporting

Lorenzo

#8 Re: Hardware & System Configuration » Excalibur, runit's supervision tree inherits tty1, misbehavior » 2024-10-21 21:22:47

Hi!

<sysrq>+K on tty1 brings the system down

One solution I am aware of is
exec </dev/null >/dev/null 2>/dev/null

but this discards all output from runsvdir right? Or are you able to get it in some other way?

anyway, clutter tty1 is a known issue, <sysrq>+K is new to me. And there is also this other issue
https://github.com/void-linux/runit/issues/14
reported at Void.

I would like to address them all, and keep a log or runsvdir if possible..

Could you test the following in stage 2

PIPE=/run/runit/runsvdirpipe
mkfifo "$PIPE"
exec <> "$PIPE"

exec env - PATH=$PATH  runsvdir -P "${SVDIR}" >"$PIPE" 2>"$PIPE"

note that the log arg for runsvdir (the dots) is removed.

and a log of runsvdir could be catched with a simple service like (run file)

#!/bin/sh

NAME="runsvdir-log"
LOG=/run/runit/runsvdir-log
test -d "$LOG" || mkdir "$LOG" && chown -R _runit-log:adm "$LOG"

exec 2>&1

exec < /run/runit/runsvdirpipe
echo "Starting runsvdir-log"

exec chpst -u _runit-log svlogd -tt "$LOG"

I tested quickly and it seems to do the job, please let me know if it works for you

Lorenzo

#9 Re: Hardware & System Configuration » Daedalus 5.01 desktop, Runit version, logrotate error spotted » 2024-10-06 17:54:25

Hi!

do you have rsyslog and anacron or cron installed in your runit system?

I believe this is the result of
(some cronjobs are skipped due to invoke-rc.d actions not effective on some runscripts)
https://bugs.debian.org/cgi-bin/bugrepo … ug=1071395
and
(rsyslogd maintainer sabotaging alternative inits, affecting runit-services)
https://bugs.debian.org/cgi-bin/bugrepo … ug=1079268

fix will be available in next stable release (already have commits in git, still need to do some testing though)
Apologies for the inconvenient, I didn't catch this before current stable was released hmm

Lorenzo

#10 Re: Other Issues » OpenSSH fails to start with the latest update in Devuan 6 Excalibur » 2024-08-21 20:59:30

Hi!

Is this is a side effects of the fix for #1038789 ? (not sure)
https://bugs.debian.org/cgi-bin/bugrepo … %231038789

Where should I file a ticket — in bugs.devuan.org or in bugs.debian.org?

the openrc package is not forked in Devuan, so please report directly to Debian!

Cheers,
Lorenzo

#11 Re: Other Issues » How do I stop apt deleting stuff from /etc/service? » 2024-07-05 21:30:39

Hi,

I'm running Devuan Excalibur with runit as the init, and apt keeps deleting /etc/service/elogind (normally a symlink to /etc/sv/elogind). This results in runit killing elogind, which terminates the desktop session.

this is likely a runit trigger combined with a bug in runit-services (elogind bin recently changed path); you can check this by looking inside the elòogind service directory, there should be a .meta directory with inside a 'bin' file and the path inside the file is wrong; because of this, the trigger thinks that elogind is not installed and disable the service.

if you have the elogind service in /etc/sv try do (as root)

# echo /usr/libexec/elogind > /etc/sv/elogind/.meta/bin
# /lib/runit/trigger_sv setup

the symlink in /etc/service should persist

if you don't have the service in /etc/sv/ then you should update the runit-services package,
in the latest version the bug is fixed

There is a non-functional /etc/init.d/elogind which I have replaced with a symlink to /bin/sv. This also keeps getting reverted.

this one is not runit fault, dpkg doesn't consider symlinks as conffile, so they are not preserved and can be overwritten by packages; anyway,
I know what's the symlink for (restarting the service on upgrade) and the runit trigger provides the same functionality, so I suggest using the trigger.

the trigger is not documented anywhere, but basically it uses a 'bin' file inside a .meta directory that should contain the path that is exec'd in the runscript, and does the following:

* if the path in bin file can't be found on the system, the service is considered uninstalled and so the runit service is disabled/stopped

* if the path in the bin file can be found in the system and the service is disabled, the runit service i enabled/started
   (there are exceptions, like when the local admin marked the service as disabled)

* it also takes care of restarting the service on upgrade

to completely disable the trigger on one service that is in /etc/sv/ you can empty/ or remove the bin file

Hope this helps,
Lorenzo

#12 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-05-04 09:17:34

From Lorenzo's bug report:

    Note that recently debhelper started to chmod -x initscripts when a package is
    removed but not purged, (...)

That sounds terrible!

Why? in any case the sysv script is not usable if the binary is not installed. The chmod - x is done for heuristics, for example to be able to tell if the binary is installed and avoid to unecessary call the script if it's not (I'm talking about automatic start/restart that happens in maintainers script during package upgrades)

Is the consequence, that any sysv initscript needs to be updated to fix this behavior?
(Or: If you have such a "helper" you don't need enemies.)

Not really: the script is automatically chmod +x as soon as you reinstall the package, you don't need to worry about this.  Other tools around initscript (invoke-rc.d, runit's /lib/runit/run_sysv_scripts) were changed to cope with non executable initscripts, openrc was just lagging behind.
Note that debhelper is used at build time to help pkg maintainers to automate the build process, it affects build-time, it doesn't affects runtime.

Lorenzo

#13 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-05-01 21:34:18

A file that is not executable on /etc/init.d/ breaks openrc installation for some reason, needs to make executable first or move to another directory

Please, next time, report bug like this! Nobody reports = nobody fixes.
It's now fixed in unstable/openrc 0.54-2
https://bugs.debian.org/cgi-bin/bugrepo … ug=1070167

#14 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-04-30 21:45:15

it looks like there is a problem with openrc postinstall script, likely a bug. As already mentioned, I know very few about openrc so I don't have an explanation. I suggest you open a bug report on openrc package linking this page

Lorenzo

#15 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-04-28 23:24:34

Thanks, reinstall only openrc? Why you mentioned +sysvinit-core?

Originally openrc used to run on top of sysvinit, so you need sysvinit-core + openrc;
recently openrc got it's own init, so it can run without sysvinit.
I'm not sure what the openrc deb package does, if you install openrc without sysvinit-core
just make sure that /sbin/init points to somewhere that make sense for openrc, like
maybe

/usr/sbin/openrc-init

I never used openrc so I'm more or less guessing the above.

#16 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-04-25 23:20:10

it seems to have worked smile But i not feeling any difference, only boot log looks another.
its was easy.

did you installed also runit-services package?

And to move back i must uninstall runit-init and make dpkg-reconfigure openrc or reinstall openrc?

I don't think dpkg-reconfigure has any use here; reinstall openrc + sysvinit-core should do it.
Then, to reboot from runit into openrc call

/lib/runit/runit-init 6

#17 Re: Installation » [SOLVED] Daedalus. Can i switch from openrc to runit without reinstall os? » 2024-04-11 20:51:20

Hi,

If it possible, how do this?

try the following

apt-get install runit-init

and then reboot the system

reboot

if plain 'reboot' doesn't work you may have to call
/usr/sbin/openrc-shutdown with appropriate options to reboot into runit

I tested sysv --> runit and going back to sysv, never tested from
openrc but it should work.

Best,
Lorenzo

#18 Re: Installation » Upgrading to Daedalus running runit-init » 2023-12-18 13:58:33

Maybe that should be 'chown -R "$USER:$GROUP" "$LOG"' to sort out the log files themselves, as well as the directory?

it was like that (chown -R) but the recursive option was removed due to symlink attacks [1] risk. But anyway I think the underlying issue is that I can't force a change in the log runscript (it's a conffile under /etc/) so there will always be a chance of a mismatch.
I'll drop an entry as NEWS file for runit to warn users.

Lorenzo
[1] For example https://github.com/OpenRC/opentmpfiles/issues/4

#19 Re: Installation » Upgrading to Daedalus running runit-init » 2023-12-14 19:18:09

Hi Geoff,

in /var/log/runit current and lock were both owned by "_runit-log adm" in the subdirectories acpid/ and ssh/
This was probably some historic set up error, but :-

cd /var/log/runit
chown runit-log:runit-log acpid/current
chown runit-log:runit-log acpid/lock
chown runit-log:runit-log ssh/current
chown runit-log:runit-log ssh/lock

soon had that fixed and after the next reboot the runsvdir command line contains the expected, clean line of dots.

Actually, 'runit-log' is being dropped and the '_runit-log' user is the right one. According to Debian policy users created by
packages should begin with _ to avoid confusion with real (uman) users. I thought I got this right but evidently I've missed
something, sorry sad
I recommend to update the log/run script of acpid and ssh with the one that is currently shipped (instead of changing permission
of current/lock), for example

cat /etc/sv/ssh/log/run

#!/bin/sh
chown _runit-log:adm '/var/log/runit/ssh'
chmod 750 '/var/log/runit/ssh'
exec chpst -u _runit-log svlogd -tt '/var/log/runit/ssh'

and then do

sv e ssh

to fix the error

#20 Re: Installation » [SOLVED] service ssh not running » 2023-10-05 21:49:20

Hi Fabien,

Using service ssh <whatever> does not do anything on daedalus.

There is no support for runit in the service wrapper, but what you are reporting
only happens if
* you have runit installed
* a runit definition for the service exists for example /etc/sv/ssh
* the service is enabled with runit ( /etc/service/ssh link exist )
otherwise the service wrapper should work

My workaround was doing touch /etc/runit/lsb.runit.sysv .

I don't recommend this unless you fully understand what it does: it will run the sysv script even if you have an active instance of the same service already managed with runit; possible side effect are:
- crash of the runit instance
- you get two instance running (only one is supervised by runit)
- the reported status of the service may be inconsistent with the one you get with 'sv status'
it also can break the upgrade of few packages - I think it was mariadb ..

The real fix would be to add runit support to the service wrapper, hopefully will happen in this cycle; for the time being I recommend to use the sv command to control services that are managed by runit.

Lorenzo

#21 Re: Hardware & System Configuration » Default dhcp client floods my syslog » 2023-09-18 14:35:30

This is a bug in dhclient script shipped with runit-services package

https://bugs.debian.org/cgi-bin/bugrepo … ug=1033542

is fixed in testing and unstable, but stable will have to wait untill the next point release hmm

To fix it, both methods suggested by Geoff will work

The version started from runit has now been removed

update-service --remove /etc/sv/dhclient

and the VM (under Xen) where I am testing it, still boots ok with just the one copy of dhclient.

Interestingly, the runit copy was earlier complaining even more about not being able to find eth1. I then spotted that the new runit setup for dhclient had a config file in conf/interfaces which contained

INTERFACES=eth1

Changing this to eth0 soon solved that.

basically disable the service or replace 'eth1' in /etc/sv/dhclient/conf/interfaces
with an interface that exists in your system (look at the output of ifconfig)

The commit that fix it is here
https://salsa.debian.org/Lorenzo.ru.g-g … e19d826ded

Said that, I see that this service is annoying a lot of people for several reason, I wonder if (for the future) it will be better to ship the dhclient service as disabled-by-default: opinions are welcome

Regards,
Lorenzo

#22 Re: Other Issues » runit-services: new package available ! » 2023-06-30 19:23:02

Hi,

As a suggestion, you may consider using

sv check dbus || exit <some_value>

instead of

sv start dbus || true

(sv start)  is equal to (sv up + sv check), so the subtle difference is that I'm forcing the wanted status to be 'up' before the check;
as for true vs exit <some_value> I'm using the latter for hard dependency and true for soft dependency. Of course I may have wrongly set a dependency as soft instead of hard..
Do you have a script that doesn't work for your use case? If yes please report it and I'll have a look again.

#23 Re: Installation » [SOLVED] Switching between init choices » 2023-06-27 19:33:55

It worked on my desktop, too.  The only problem is that I could not reboot afterwards and had to power cycle the machine.

Next time do the following:

1. install sysvinit-core (it will remove runit-init package), but don't remove the runit package (yet);
2. tell runit to reboot the system with

# /lib/runit/runit-init 6

(see man runit-init for details)

After you reboot into sysvinit you can safely remove the runit package too

Lorenzo

#24 Re: Hardware & System Configuration » [SOLVED] rsyslog, logrotate » 2023-06-21 11:32:03

Edit: I am using runit as init in case this matters.

yes it does: are you running rsyslog with a runit service or as sysv script?

If you use a runit service you may have to add a cronjob with
(assuming that your service is called 'rsyslogd')

sv hup rsyslogd

if you are using the old sysvscript, have a look at /usr/lib/rsyslog/rsyslog-rotate;
recent version of the Debian package are using code that is a noop on non-systemd systems.
if that's the case, you need to create a cron job with

if [ -x /etc/init.d/rsyslog ]; then
    invoke-rc.d rsyslog rotate > /dev/null
fi

I'm not sure if Devuan has it's own version of rsyslog package, but still worth a check

#25 Re: Hardware & System Configuration » [SOLVED][Daedalus] Laptop lid open/close issue » 2023-05-13 10:37:45

I ran all my tests also without xfce4-power-setting enabled, but I still got the striped screen

what about replacing xfce4-screensaver package with xscreensaver?

yes I am exactly him...

Ha! I remember you! I used to be on that forum too (Ombra) years ago, nice to meet you again smile

Board footer

Forum Software