Artix Installation

Table of Contents

This guide presumes your computer is x86_64 & has UEFI.

UEFI was made to try (and failed) to prevent people from installing GNU/Linux.

If you have BIOS, skip making & formatting a 1GB FAT32 partition, and change the grub-install options accordingly.

Preparation

Download Artix Linux (runit), then download Rufus. Artix is an Arch-based Linux distro but without systemd. This means it will boot faster. Rufus can flash the install image to a USB drive, which we will then boot from to actually install Artix onto the computer.

Installation

Make the partitions:

fdisk /dev/sda

Then:

d	# Deletes prior partition. No going back. Do this until no partitions are left.
n	# Creates new partition. Press enter three times, then enter:
+1G
n	# Creates second partition. Just press enter through the rest.
w	# Write changes.

Format the first partition, encrypt the second. If the password is lost, so is all the data (it can be changed later):

mkfs.fat -F 32 /dev/sda1
fatlabel /dev/sda1 ESP
cryptsetup luksFormat /dev/sda2

Format the second partition:

cryptsetup open /dev/sda2 artix
mkfs.btrfs /dev/mapper/artix

Mount partitions:

mount /dev/mapper/artix /mnt
mkdir /mnt/boot
mount /dev/dev/sda1 /mnt/boot

Connect to the internet, then synchronize the system clock:

sv up openntpd

Install base packages:

basestrap /mnt base runit elogind-runit linux linux-firmware grub networkmanager networkmanager-runit cryptsetup lvm2 lvm2-runit neovim efibootmgr

Change root into the new system:

artix-chroot /mnt bash

Set time zone. Replace Region/City with your region & city (i.e America/New_York):

ln -s /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Run nvim /etc/locale.gen & uncomment (delete the #) for your locale (i.e. en_US.UTF-8), then run locale-gen. Enter nvim /etc/locale.conf and type:

export LANG="en_US.UTF-8"	# Change this to your locale.
export LC_COLLATE="C"

The basics of vim is i to enter insert (typing) mode, : to run commands, in this case :w to write (save), and :q to quit (exit). ESC to escape any mode (i.e. insert, commsnd, visual) to enter another or input a command (i.e. :wq).

Name the computer. Replace "name" with what you want to name it:

echo "name" > /etc/hostname

Open /etc/hosts with nvim and input the following. Replace name with the previous name:

127.0.0.1	localhost
::1			localhost
127.0.1.1	name.localdomain name

Enable the network manager and ntp at boot:

ln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/current
ln -s /etc/runit/sv/openntpd /etc/runit/runsvdir/current

Set a system password. You can make it the same as the encryption password, or different:

passwd

Set bootloader:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

Shutdown, remove the USB drive, and upon reboot you should be at a login prompt for a new Artix Linux Installation.

Post-Installation

Login as root and run:

curl -LO larbs.xyz/larbs.sh
sh larbs.sh

This will automate making a user, &c.

Related
Linux · Technology