Posts tagged with: #void_linux

New series of posts: "Void Linux for beginners"

2024-07-29

Void Linux is one of the best Linux distributions out there: It's not maintained by a company and doesn't even have or want sponsors, so it'll stay on the side of users forever. It doesn't use systemd (that many users hate) as its init system, its package manager is very fast (maybe the fastest around), and it's extremely minimal in the amount of software installed by default (good for CPU & disk, the environment, and user-choice of alternatives), and it's a rolling stable distro.

The downside is that it's not for beginners. You'll often need to read documentation (Void's official documentation does a great job) to get things done, and also end-up asking questions in Void's IRC channel to Void's more experienced users.

I did (and still do) a lot of the asking, so I'm providing the most important information I learned there in this series of blog posts tagged #void_linux.

How to run Incus on Void Linux

2024-07-23

Incus is the replacement of LXD one should use. For some reason it won't work well on Void out of the box after a while, and incus start <container-name> might stop doing anything. How do we fix it?

Looking at /usr/share/doc/incus/README.voidlinux it suggests the following:

Some container configurations may require that the `CGROUP_MODE`
variable in `/etc/rc.conf` be set to `unified`.

One way to solve it is that. I did another solution however, which I found at this github issue. I did the following:

I created this Perl script, called enable_incus somewhere:

#!/usr/bin/env perl

use v5.38;

! -d '/sys/fs/cgroup/systemd' or say("Incus already enabled. Skipping."), exit;

system('sudo mkdir /sys/fs/cgroup/systemd');
system('sudo mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd');

say 'OK';

Then I edited /etc/sv/incus/run and added this line near the top:

/path/to/enable_incus

...so that my script gets executed just before incus is launched.

This fixed the problem.