Archlinux UEFI Install Guide
SET KEYBOARD
loadkeys uk
ENABLE NETWORK
wifi-menu -o
if using wifi
ping achlinux.org
Ctrl+C to stop ping
CREATE & PARTITION THE DRIVE
lsblk
view available disks
gdisk /dev/sda
-x -z -y -y wipes the drive
cfdisk /dev/sda
gpt for UEFI
Create 2 new partitions:
- Size 512M - Type EFI System
- Rest of disk - Type: Linux Filesystem
- Select write - type
yes
- Quit out of cfdisk
FORMAT THE FILESYSTEM
mkfs.fat -F32 /dev/sda1
efi partition
mkfs.ext4 /dev/sda2
rest of disk
MOUNT THE FILESYSTEM
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
INSTALL ARCHLINUX BASE PACKAGES
pacstrap -i /mnt base base-devel linux linux-headers nano networkmanager linux-firmware
select option 1): mkinitcpio
CONFIGURE FSTAB AND CHROOT /MNT
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
arch-chroot /mnt
CONFIGURE LANGUAGE AND LOCATION
nano /etc/locale.gen
uncomment your locale e.g:
en_GB.UTF-8 UTF8
locale-gen
SET YOUR TIME ZONE
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
ENABLE THE MULTILIB REPOSITORY
nano /etc/pacman.conf
Uncomment the lines:
[multilib] and
include = /etc/pacman.d/mirrorlist
pacman -Sy
check multilib is enabled
SET HOSTNAME & NETWORK
echo yourhostname > /etc/hostname
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
SET ROOT PASSWORD AND CREATE NEW USER
passwd
useradd -m -g users -G wheel -s /bin/bash yourname
passwd yourname
ALLOW USERS IN WHEEL GROUP TO BE ABLE TO PREFORMANCE ADMINISTRATIVE TASKS WITH SUDO
EDITOR=nano visudo
Uncomment the line:
%wheel ALL=(ALL) ALL
INSTALL AND CONFIGURE BOOTLOADER
mkinitcpio -p linux
pacman -S grub efibootmgr dosfstools mtools
grub-install --target=x86_64-efi --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
UNMOUNT THE PARTITIONS AND REBOOT
exit
umount -a
reboot
CREATE A SWAPFILE recommended
as superuser:
su
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab