Skip to content

Installation

Léo MERCIER edited this page Aug 19, 2024 · 42 revisions

Replace /dev/sdX with your actual disk in the following instructions as well as doas with sudo if your system is using sudo.

Download the Void ARM image and extract it using

xz -d <filename>

Next, you want to use and run this command on your local Linux machine to flash it onto the SD card or any other storage

doas dd if=<image>.img of=/dev/sdX bs=4M status=progress

Once it's done, you should resize the root partition using fdisk to use the available space.

doas fdisk /dev/sdX # Press Eethen select the root partition then ENTER then W
doas resize2fs /dev/sdXproot # Make sure to select the root partition

You can then start your server. You should be able to SSH to it, if not, plug a keyboard and a screen.

Login

The default username and password for the root account of Void Linux is root:voidlinux. First, we'll configure the timezone

ln -sf /usr/share/zoneinfo/<timezone> /etc/localtime

Then, we'll start chrony to get the correct date

ln -s /etc/sv/chronyd /var/service/
sv start chronyd
date

Optional: Connect to wifi

https://wiki.archlinux.org/title/Wpa_supplicant

wpa_supplicant -B -i <interface> -c /etc/wpa_supplicant/wpa_supplicant.conf

Prevent the DNS from being edited

chattr -i /etc/resolv.conf

Optional: Install iwd

xbps-install iwd
ln -s /etc/sv/dbus /var/service/
ln -s /etc/sv/iwd /var/service/
sv start dbus
sv start iwd
iwctl --passphrase <passphrase> station <interface> connect <SSID> # Connect to a wifi station directly

Update the system

xbps-install -Su

Create a new user account

You'll need to create a non root user account. Keep in mind that this username is going to be used by the Ansible playbooks.

useradd -m -G wheel -s /bin/bash <new_username>
passwd <new_username>

Replace sudo with doas

xbps-install opendoas
echo "permit keepenv :wheel" > /etc/doas.conf
echo "ignorepkg=sudo" > /etc/xbps.d/10-ignore.conf
xbps-remove sudo

Install Ansible dependencies

To run our our Ansible playbooks, we need to install the managed node requirements

xbps-install python3 python3-pip

Restart SSH

For some reasons, you'll have to restart the SSH service to prevent a key exchange error

sv restart sshd

Your server is now ready to be used by our Kubernetes cluster!