/ PROJECTS

Basic Arch Install

Download Arch ISO and create Live USB

Quite straight forward…

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Flashing to ISO to USB using dd

Partitioning Disks

Since this is a basic tutorial, we’ll only have two partitions (EFI and Root)

Create EFI partition

fdisk -l #List drives
fdisk /dev/sda #Select disk to use for Arch

Using fdisk to partition our disk

Ensure UEFI is enabled

Now create a new partition as Partition 1 of size 512M. Shown below.

Change this partition from Linux System to an EFI partition. Shown below.

Create root partition

This is a basic install so we’ll have a single root partition. No swap. No home.

Create another partition as Partition 2 which takes up the rest of the disk. Shown below.

Create filesystems on partitions

mkfs.fat -F32 /dev/sda1 #For EFI Partition
mkfs.ext4 /dev/sda2 #For Root Partition

Arch Install

Select pacman mirror

pacman -Syy #Sync pacman repo
pacman -S reflector #Install reflector to list mirrors
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak #Backup mirrors
reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist #Use good mirror list and use it with reflector

Install Arch base

mount /dev/sda2 /mnt #Mount root
pacstrap /mnt base linux linux-firmware nano #Install basic utils for install

Configure Arch

Generate fstab to mount devices on boot

genfstab -U /mnt >> /mnt/etc/fstab

Drop into root on your installed system for the next bits

arch-chroot /mnt

Setting Timezone

timedatectl list-timezones #List timezones
timedatectl set-timezone Europe/London #Set timezone

Setting Locale

Uncomment en_GB.UTF-8 from /etc/local.gen this sets format for the whole system.

Now generate the local with the commands below

locale-gen
echo LANG=en_GB.UTF-8 > /etc/locale.conf
export LANG=en_GB.UTF-8

Network Config

Set hostname and create hosts files

echo myarch > /etc/hostname
touch /etc/hosts

Add hosts to /etc/hosts

127.0.0.1	localhost
::1		localhost
127.0.1.1	myarch

/etc/hosts

Set root passwd

passwd

Install GRUB

pacman -S grub efibootmgr #Install install tool for GRUB
mkdir /boot/efi #Create EFI partition mountpoint
mount /dev/sda1 /boot/efi #Mount EFI partition
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi #Install GRUB
grub-mkconfig -o /boot/grub/grub.cfg #Generate GRUB config

Install i3

pacman -S i3 #Install i3
echo "exec i3" >> ~/.xinitrc #Set i3 as WM
pacman -S xorg-server xorg-xinit #Install XORG Server
pacman -S xf86-input-keyboard xorg-xkbcomp #XORG KDB Dependencies

Finish and finalise setup

pacman -S systemd dhclient networkmanager
systemctl enable NetworkManager.service #Enable NetworkManager
exit #Exit chroot
shutdown now #Shutdown, remove Live USB, boot

This article was shortened and written for personal use and access. May not work precisely for your own build

Debugging and extras

i3 Debugging

If you’re missing fonts and text shows up as dots or squares, install the most common fonts.

pacman -S ttf-dejavu ttf-liberation ttf-droid ttf-ubuntu-font-family noto-fonts

If i3 shouts at you for not having a terminal installed, or you need a GUI terminal, install one.

pacman -S konsole

If you want to use mod+D to launch apps in i3, install dmenu

pacman -S dmenu

Starting i3 on login

Add this to ~/.bash_profile

if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx
fi

Wireless Setup

Connect to WiFi using nmcli

nmcli d wifi connect <SSID> password <Password>

or interactively,

nmtui

Install bluetooth tools

yaourt -S bluez blueman
sudo systemctl enable bluetooth.service
sudo systemctl restart bluetooth.service

You should now be able to use “blueman-manager” and “blueman-applet”

Adding a user

Install sudo and add new user

pacman -S sudo
sudo useradd -m rohi
passwd rohi
EDITOR=nano visudo #Add your name to Sudoers here and enable wheel group

Now replicate your .xinitrc from root to your new user and use startx which will bring up default i3.

Installing yaourt

sudo pacman -S --needed base-devel git wget yajl #Get dependenices
git clone https://aur.archlinux.org/package-query.git #Package build tools
makepkg -si #cd into the repo and makepkg
git clone https://aur.archlinux.org/yaourt.git #Yaourt package and makepkg again

Audio with PulseAudio

sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol

Changing keyboard layout

setxkbmap gb