Home > Linux Knowledge > Void Linux Installation and Test
published 2021-01-18, updated 2024-11-12
Preface
In this article I describe how to setup a Void Linux Installation on a bare metal machine. After that I give it a thorough test drive and setup all important software to do some development and some gaming. Also I setup and integrate my network printer, my network storage and other important stuff. My general question is: Can Void Linux replace my existing Manjaro Linux installation with all my workflows? To answer that I list all my workflows so I can check them after successfully setting them up on my test machine.
My Workflow checklist:
- Most important: Can it run DOOM and Duke3D?
- Java development environment with JDK >= 11
- Docker container runtime
- Virtualization with QEMU / VirtualBox / Vagrant
- Go development environment
- Rust development environment with RustUp
- MP3 Conversion and tagging (audex, abcde, kid3)
- Run Steam and native / protonified games
- Run Wine games with Lutris
- Communication (IRC, Teamspeak, Discord)
- Printing with HPLIP
- Integration with my NAS (nfs, samba)
TL:DR: Modern software stacks for development and gaming! And printing! :D
Also for a distro to be worthy my precious time it needs to adhere to some common defaults, otherwise I won't spend time with it. Otherwise I could just stay with my systemd infested but otherwise very fancy Manjaro Linux. (Lots of otherwise)
My distro checklist is as follows:
- Independent distribution
- Rolling release model
- No systemd
- Modern desktop environments, at least KDE Plasma 5 (or XFCE 4)
- [Big software repositories]
- [Easy packaging system, so contribution is easy]
- [Good documentation]
Let's look at Void Linux in more detail:
Void Linux is a general purpose operating system build upon the Linux kernel. It's most prominent features are that it is an independent distribution, it is a rolling release distro and lastly it does not use systemd as init system and service supervisor. These three main features tick three very important boxes on my Linux distro checklist. The rest of my checklist is more or less optional except for the desktop part, either KDE oder XFCE must be present, otherwise I won't bother looking at it (Sorry Gnome folks :D ).
Live installation images come with a plethora of desktops including XFCE. After looking in the package database, KDE Plasma is also there. As the installation image is from 2019, I chose the base installation image to make a network install without graphical environment and install KDE Plasma from there. Should be fairly straight forward. Let's go!
Update: Since 2021-02-18 there is a new iso available in the download section of the project site with up-to-date packages.
Base Installation
Booting the base iso results in a terminal login promt. Login using the credentials root:voidlinux. This way we don't need to write sudo before every command which needs elevated privilidges. Additionally if you have a keyboard with a different than en-us, do a loadkeys your-locale to have the right keys (for me it is loadkeys de-latin1). If the hard disks are not partitioned you can do so now, there is fdisk (for those sadists out there), or the better usable cfdisk. I chose the later. I created five partitions (cause I have three SSDs in my system):
- sda1: vfat, 512MB, mounted on /boot/efi
- sda2: swap, 8GiB, mounted as swap
- sda3: ext4, rest of sda, mounted on /
- sdb1: ext4, mounted on /home
- sdc1: ext4, mounted on /opt
After this the installer is started with the command 'void-installer'. From here it is a pretty straight forward guided installation routine. Once you have done all setup points just hit install, accept, and there it goes. If something goes wrong while installing you can switch to TTY8 for the console output. But for me everything went fine.
After rebooting (don't forget to remove the thumb drive with the iso), you are greeted with a console login promt, again. But this time it's from your installed system and not the live system. Since I did a network install, packages are all up-to-date already. From here we need to setup a graphics stack, audio stack, some system utils and that's about it.
Installing necessary system utils
The first thing after a fresh install is a full system upgrade. For this just run
sudo xbps-install -Su
(-S meaning Synchronize and -u meaning update, like on Arch)
If you did a network install like me, this is not necessary.
Next thing todo is to install your CPU microcode updates, which is fairly important nowadays with all these shitty bugs in CPUs (I look at you Intel). The docs describe this very accuratly but here is what I need to do for my Intel system. First I need to enable the nonfree repo, and while I am at it also the multilib (32-bit support) and nonfree-multilib (32-bit support for nonfree software like Nvidia utils) repos. Luckily you don't need to edit package manager config files for that like on Arch, but just install these repos:
sudo xbps-install -S void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree
sudo xbps-install -S intel-ucode
sudo xbps-reconfigure --force linux5.12
After that one can install the Intel microcode update package, but afterwards it is needed to regenerate the initramfs to use these microcode updates. For this you run xbps-reconfigure for the appropriate kernel version.
For AMD things are even more easy:
sudo xbps-install -S linux-firmware-amd
No configuration needed!
Next things after a fresh install you need to setup time sync, otherwise you can run into some nasty problems because your system time is not in sync with the internet (not being able to update system because time stamps mismatch, yep I ran into this before). Luckily this is fairly trivial and described in the official docs (chapter 3.10 Date and Time). I opted to use openNTPD:
sudo xbps-install -S openntpd
sudo ln -s /etc/sv/openntpd /var/service
Now to setup your home directory to the common XDG defaults, install the following
sudo xbps-install xdg-utils xdg-user-dirs
After that, just log out and log in to automatically setup the directories in your home directory.
Installing the graphics stack
For the graphics stack I opted for X11 + KDE because it's what I know and like (Sorry chads, no cool dwm+dmenu or Wayland+Sway build).
I also needed the Nvidia drivers with 32-bit support, otherwise Steam won't work:
sudo xbps-install -S nvidia nvidia-libs-32bit xorg kde5 kde5-baseapps elogind dbus sddm polkit
sudo ln -s /etc/sv/dbus /var/service
sudo ln -s /etc/sv/sddm /var/service
After this you need to reboot and should be greeted by the ugly default SDDM theme and a graphical login screen. Be careful to select X11 in the upper left corner, as Wayland session is pre-selected. Congrats, we are now running a graphical session on top of Void Linux. Wasn't that difficult.
Installing audio stack
Although Pipewire is all the rage in the Linux audio world nowadays, I opted for PulseAudio case it's tried and works. Also Discord does not work correctly with Pipewire at the moment. So if you rely on Discord (as I do), take PulseAudio. The installation is super easy:
sudo xbps-install -S pulseaudio pulseaudio-32bit pavucontrol plasma-pa
I additionally add support for Pulse Audio to KDE Plasma via plasma-pa applet. That's it, no service configuration or whatsoever because PA will be started automatically by Plasma.
Ripping audio cds
In order to rip audio cds to compressed audio files, I use abcde. You need additional programs to complete the whole task.
sudo xbps-install -S abcde lame ffmpeg ImageMagick cdparanoia eyeD3
Running abcde the first time will generate a commented default config at ~/.abcde. Go through it and read the comments to configure it.
In order to burn cd's (yes I still do this, mostly audio cd's) you need a burn program and some libs. For KDE I use k3b
sudo xbps-install -S k3b libburn cdrskin
For k3b to work properly after installing you need to restart your computer, otherwise important kernel modules for cdrom access are not loaded.
Installing Day-to-Day tools
List of important apps to have a useful desktop (all in the Void repos):
- firefox - your goto browser
- plasma-browser-integration (if using KDE and Firefox)
- ark - Archive manager
- gwenview - Image viewer
- okular - Document viewer
- partitionmanager - what the name suggests
- spectacle - Screenshot utility
- krusader - KDE twin panel file manager
- calligra-words calligra-sheets calligra-stage
-- alternatively -- - libreoffice
- kdiff3 - Diff / Merge / Patch tool
- strawberry - awesome media player with great collection support
- dragon-player - Simple efficient video player
List of development and terminal tools:
- micro (best terminal text editor. Period.)
- git
- vscode (actually installs code-oss, the version without M$ telemetry and stuff)
- go
- zip
- unzip
- 7zip
- zola
Installing NFS support
In order to access my NAS from Void Linux, I needed some services to get it running. First install these packages here and then mounting is possible:
sudo xbps-install -S nfs-utils sv-netmount rpcbind
sudo ln -s /etc/sv/netmount /var/service
sudo ln -s /etc/sv/rpcbind /var/service
sudo ln -s /etc/sv/statd /var/service
sudo mount -t nfs <server>:/path/to/source /path/to/destination
It is also possible to mount nfs volumes during startup via fstab with something along the line like this:
<host>:/path/to/source /path/to/destination nfs rw,hard 0 0
Installing HP printer support
First we need the cups daemon and after it is installed and enabled one can install cups-filters and hplip packages. Additionally for KDE install the print-manager package, which adds a "Printer Settings" page to KDE system settings. Afterwards run the HP setup utility in the terminal, as the GUI just won't install printers correctly.
sudo xbps-install -S cups
sudo ln -s /etc/sv/cupsd /var/service
sudo xbps-install -S cups-filters hplip print-manager
hp-setup -i
For scanner support just install whatever scanner app your DE brings, e.g. skanlite for KDE.
Communication apps
For IRC (yes still live and alive) there is Konversation in the package repo. xbps-install -S konversation and we are good to go. For Discord and Teamspeak it is a bit more complicated. These apps are not allowed to be redistributed in pre-build binary form, one must build these apps yourself. But luckily Void has a super awesome system for such apps: xbps-src. More info is found in the documentation. Goto the github repo and follow the instructions there. Afterwards you can install Discord and Teamspeak from your own local build versions including all needed dependencies. Sadly the official package search does not include the restricted packages so you need to search manually.
git clone git://github.com/void-linux/void-packages.git
cd void-packages
./xbps-src binary-bootstrap
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf
./xbps-src pkg discord
sudo xbps-install --repository hostdir/binpkgs/nonfree discord
Also useful is the xtools package which contains the xi tool, which speeds up terminal installation process quite. sudo xi <pkg>
is the same as sudo xbps-install -S <pkg>
Running Doom / DUKE3D
GZDoom is in the void repos, so just install it via xbps-install. Place your WADs in ~/.config/gzdoom in order to select one of them after starting GZDoom.
DUKE3D is not available pre-compiled, so you need to build it yourself. But that is fairly straightforward nowadays. See this article for a quick run down.
System maintenance
From time to time you can update your whole system. Just run
sudo xbps-install -Su
If there is an update for xbps itself, you need to run the command a second time to actually do a full system upgrade.
With these system upgrades come kernel updates, and soon you will amass a lot of different kernel versions. In order to clean up this you can run from time to time
sudo vkpurge rm all
Additionally if you have DKMS modules installed (e.g. NVidia drivers), you will likely have some old Linux kernel sources and headers installed. If you do a full system update you will notice that (a lot) nvidia dkms will get build. If you uninstall old unused kernel sources and headers these modules wont get build anymore. Just uninstall the corresponding linuxY.Z and linuxY.Z-headers packages and these modules wont get build anymore. Just remember to update Grub afterwars so you don't end up with an unbootable system. E.G.:
sudo xbps-remove linux6.1 linux6.1-headers
...
sudo update-grub
Go development
Just install the 'go' package and use a decent editor like code-oss
Rust development
TODO rustup
Java development
First check the available JDK versions in the package database
As of time of writing this, OpenJDK17 is the latest LTS release and therefor I install this. On top install your favorite java project management software
sudo xbps-install -S openjdk17 apache-maven gradle
Running Steam games
TODO