This guide presumes your computer is x86_64 & has UEFI, but details on what to do for BIOS are given.
UEFI was made to try (& failed) to prevent people from installing GNU/Linux.
Download Artix Linux (runit), then download Rufus (Windows) or Rufid (Android). Artix is an Arch-based Linux distro but without systemd. Rufus/Rufid can flash the install image to a USB drive, which we will then boot from to actually install Artix onto the computer.
Installation
Partitions
Make the partitions:
fdisk /dev/sda
d # Delete prior partition, do this until no partitions are left
n # Create new partition, press enter three times and enter:
+1G
n # Create second partition, press enter through the rest
w # Write changes
Ignore entering d if there’s no previous partition on the disk. Enter y if
it asks to remove a signature.
Format the first partition, encrypt & format the second:
mkfs.fat -F32 /dev/sda1 # For BIOS, change 'mkfs.fat -F32' to 'mkfs.ext4'
fatlabel /dev/sda1 ESP # For BIOS, skip this
cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 main
mkfs.btrfs /dev/mapper/main
If the password is lost, so is all the data (it can be changed later).
Mount the partitions:
mount /dev/mapper/main /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
Packages
Connect to the internet & install the base packages:
# For BIOS, omit efibootmgr
basestrap /mnt base runit elogind-runit linux linux-firmware grub cryptsetup lvm2 lvm2-runit networkmanager networkmanager-runit neovim efibootmgr
Configuration
Change root into the new system:
artix-chroot /mnt bash
Set time zone, but replace Region/City with your region & city (e.g.
America/New_York):
ln -s /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
Open locale.gen with nvim:
nvim /etc/locale.gen
Then uncomment (delete the #) for your locale, e.g. en_US.UTF-8.
The basics of vim are:
i– enter insert (typing) mode.:– enter commands, e.g.::w– write (save).:q– quit (exit).
Esc– escape any mode (insert/command/visual)./– enter search:n/N– go to next/previous match.
Generate the locale:
locale-gen
Open /etc/locale.conf with nvim:
nvim /etc/locale.conf
Then type in:
export LANG="en_US.UTF-8" # Change this to your locale.
export LC_COLLATE="C"
Name the computer, but replace NAME with what you want to name it:
echo "NAME" >/etc/hostname
Open /etc/hosts with nvim:
nvim /etc/hosts
Input this, replace NAME with the previous name:
127.0.0.1 localhost
::1 localhost
127.0.1.1 NAME.localdomain NAME
Set the root (/) password, you can make it the same as the encryption
password or different:
passwd
Enable network manager at boot:
ln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/current
Auto-decrypt
Open /etc/mkinitcpio.conf with nvim:
nvim /etc/mkinitcpio.conf
Edit the HOOKS= line at the bottom (G) to read:
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck)
Re-run mkinitcpio, exit the system, generate the filesystem table, output the
mount points:
mkinitcpio -p linux
exit
fstabgen -U /mnt >>/mnt/etc/fstab
lsblk -f >>/mnt/etc/default/grub
Change root into the system again:
artix-chroot /mnt bash
If you want to mount /tmp as tmpfs, open /etc/fstab with nvim:
nvim /etc/fstab
Add this line to the bottom (be sure to use tabs instead of spaces, & replace
4G with half of your available RAM):
tmpfs /tmp tmpfs nosuid,nodev,strictatime,size=4G,mode=1777 0 0
Open /etc/default/grub with nvim:
nvim /etc/default/grub
Delete the mess at the bottom except for the UUIDs, copy & paste them at the top
below the line GRUB_CMDLINE_LINUX_DEFAULT=, but change it to read (sda2 &
main standing for each of their UUIDs):
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet cryptdevice=UUID=sda2:cryptlvm root=UUID=main"
Some more basics of vim:
gg/G– go to top/bottom.yy– yank the line (copy).p– paste yanked content.
You can also set GRUB_TIMEOUT to 0 to skip the delay in booting. If you do
this later, just re-run the grub commands below.
Set the bootloader:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
Run grub-install /dev/sda if using BIOS instead of UEFI. Still run
grub-mkconfig.
Completion
Shutdown, remove the USB drive, & on reboot you should be at a login prompt for a new Artix Linux system:
exit
reboot
Post-Installation
Use LARBS to automate making a user & setting up a window manager &c. Login as root & run:
curl -LO larbs.xyz/larbs.sh
sh larbs.sh
Internet
If you cannot use ethernet, then use WiFi. The Artix installer has vim
available, so open the WPA supplicant conf with it:
vim /etc/wpa_supplicant/wpa_supplicant.conf
Enter interactive mode (i) then type:
ctrl_interface=/run/wpa_supplicant
update_config=1
Exit the mode (Esc) then write & quit (:wq).
Now make sure rfkill is not active, start the WPA supplicant, & open its CLI:
rfkill unblock wifi
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
wpa_cli
Enter the following (replace NETWORK with the name of your WiFi network,
displayed after scan_results, & PASSWORD with its password):
scan
scan_results
add_network
set_network 0 ssid "NETWORK"
set_network 0 psk "PASSWORD"
enable_network 0
save_config
quit
Now start dhcpcd, & you should connect to your Wifi:
dhcpcd