品η•ͺ

#002

12th May 2022 /

Install Artix Linux easily: complete guide in English

Tips / Installation / Artix

πŸ‘‰ Note: Artix / dinit ISO

Language Configuration

πŸ”… To check available layouts:

ls -R /usr/share/keymaps

πŸ”… Now type the layout name without the extension. For example, I use the Latin American layout.

loadkeys la-latin1

Partitioning

πŸ”… Let’s check which disk we’ll install to:

fdisk -l

πŸ”… Partition the disk:

πŸ‘‰ Note: In my case my disk is NVME, so replace NVME with sda, sdb or whichever you have.

cfdisk /dev/nvme0n1
      Start                  Size
/dev/nvme0n1p1               512M         # 512M / 1GB recommended

/dev/nvme0n1p2               60G          # 40/60GB

/dev/nvme0n1p3              405.3G        # Rest of space

πŸ‘‰ Note: This installation is exclusively for UEFI, and also consider that I’m not using dual boot. Just artix.

πŸ”… Format the partitions:

mkfs.ext4 -L ROOT /dev/nvme0n1p2        # Root partition
mkfs.ext4 -L HOME /dev/nvme0n1p3        # Home partition (optional)
mkfs.fat -F 32 /dev/nvme0n1p1           # EFI/boot partition
fatlabel /dev/nvme0n1p1 EFI

πŸ”… Mount the partitions:

mount /dev/disk/by-label/ROOT /mnt
mkdir -p /mnt/boot
mkdir -p /mnt/home
mount /dev/disk/by-lable/HOME /mnt/home
mount /dev/disk/by-label/EFI /mnt/boot

πŸ”… Connect to the internet:

πŸ‘‰ Note: In my case, I use Cable. So not much configuration is needed.

ping artixlinux.org

Install the base:

πŸ”… Install the base using basestrap:

# In my case I'll choose DINIT.
basestrap /mnt base base-devel dinit elogind-dinit

πŸ”… Install the kernel:

basestrap /mnt linux linux-firmware

πŸ”… Generate /etc/fstab. For this I use -U for UUIDs. And -L for the partitions.

fstabgen -U /mnt >> /mnt/etc/fstab

# Don't forget to verify everything is ok with:
cat /mnt/etc/fstab

# Inside you should have the Root, Home and boot partitions

πŸ”… Now enter as root with:

artix-chroot /mnt

Configuring the system

πŸ”… Configure the clock:

ln -sf /usr/share/zoneinfo/America/Argentina/Buenos_aires /etc/localtime  # Here we need to put region/city.

πŸ‘‰ Note: With hwclock we generate /etc/adjtime

hwclock --systohc

πŸ”… Configure Localization:

pacman -s nano
nano /etc/locale.gen

πŸ‘‰ Note: In locale.gen I choose en_US. (If you want the system in Spanish choose es_ES.

# generate locales
locale-gen

πŸ”… Install the bootloader:

pacman -S grub efibootmgr

πŸ‘‰ Note: My configuration is intended for UEFI systems. Pay attention…

πŸ”… Install grub:

# If using MBR and not UEFI:
# grub-install --recheck /dev/sda
grub-install --target=x86_64-efi --efi-directory=/boot --recheck

grub-mkconfig -o /boot/grub/grub.cfg

πŸ”… Set ROOT password:

passwd # when you press enter, type the password.

useradd -m -G wheel -s /bin/bash yourusername # Obviously, type your username here!

passwd yourusername

πŸ”… Add WHEEL to sudoers file:

EDITOR=nano visudo
# uncomment: (removing the #)
%wheel ALL=(ALL:ALL) ALL

πŸ”… Configure hostname:

nano /etc/hostname
# hostname is giving a name to the host:
# I like "aesthetic" So it can be like your nickname.

πŸ”… Add it to hosts:

nano /etc/hosts
127.0.0.1               localhost
::1                     localhost
127.0.1.1               yourhostname.localdomain yourhostname

# replace "yourhostname" with the hostname you chose.

πŸ”… Install DHCPCD (internet client):

pacman -S dhcpcd dhcpcd-dinit

πŸ”… Unmount and reboot:

exit                    # To exit su
exit                    # To exit chroot
umount -R /mnt          # To unmount
reboot                  # To restart

πŸ”… Enable DHCPCD for internet:

sudo dinitctl enable dhcpcd
sudo dinitctl start dhcpcd

πŸ”… Enable Archlinux repositories:

sudo pacman -S artix-archlinux-support

# Add repos to /etc/pacman.conf (with nano /etc/pacman.conf)

[extra]
Include = /etc/pacman.d/mirrorlist-arch

[community]
Include = /etc/pacman.d/mirrorlist-arch

[multilib]
Include = /etc/pacman.d/mirrorlist-arch

πŸ”… Enable repos and regenerate them:

sudo pacman-key --populate archlinux

# Update repos
sudo pacman -Syy

πŸ”… Install paru: If we don’t have git, we need to install it sudo pacman -S git wget.

git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

πŸ”… Finally, some packages that will be useful:

# Handle zip, rar files.
sudo pacman -S zip unzip unrar

# Alsa and pipewire for handling audio
sudo pacman -S pipewire pipewire-alsa pipewire-pulse alsa-utils

# To be able to view external disks
sudo pacman -S ntfs-3g dosfstools exfat-utils

# Intel / amd drivers
paru -S xf86-video-amdgpu vulkan-radeon mesa-libgl mesa-vdpau libvdpau-va-gl libva-mesa-driver #AMD
paru -S xf86-video-intel mesa-libgl libvdpau-va-gl #Intel