Note: If you are going to do dual boot with Windows, then you should first install Windows and then archlinux just without creating an EFI partition.
-
Setup pacman-key (fixing this problem)
pacman-key --initpacman-key --populatepacman-key --refresh
-
Ping some site on the Internet to verify connection:
ping archlinux.org
-
Update system clock:
timedatectl set-ntp truetimedatectl set-timezone Zone/SubZone(America/Los_Angeles, Canada/Eastern, etc.)timedatectl status
-
Download mirrorlist:
curl -o /etc/pacman.d/mirrorlist https://archlinux.org/mirrorlist/all/- Uncomment the mirrors you need (the higher, the higher the priority of the mirror)
-
Create EFI partition:
fdisk /dev/sda- g (to create a new partition table)
- n (to create a new partition)
- 1
- enter
- +300M
- t
- 1 (for EFI)
- w
-
Create
/rootpartition:fdisk /dev/sda- n
- 2
- enter
- +30G
- w
-
Create
/homepartiton:fdisk /dev/sda- n
- 3
- enter
- enter
- w
-
Create the filesystems:
mkfs.fat -F32 /dev/sda1mkfs.ext4 /dev/sda2mkfs.ext4 /dev/sda3
-
Mount the
/rootand/homedirectories:mount /dev/sda2 /mntmount --mkdir /dev/sda3 /mnt/home
-
Install Arch linux base packages:
pacstrap -i /mnt base linux linux-firmware
-
Generate the
/etc/fstabfile:genfstab -U -p /mnt >> /mnt/etc/fstab
-
Chroot into installed system:
arch-chroot /mnttimedatectl set-ntp true
-
Set the timezone:
ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
-
Update the Hardware clock:
hwclock --systohc
-
Install some packages:
pacman -S nano sudo networkmanager refind gdisk
-
Setup hostname
nano /etc/hostname(write you PC name)
-
Setup host:
nano /etc/hosts- And write this:
127.0.0.1 localhost::1 localhost127.0.1.1 pcname.localdomain pcname
-
Setup users:
useradd -m usernameusermod -aG audio,video,wheel,storage usernamepasswd(Change the password for root)passwd username(Change the password for username)
-
We allow the wheel group to execute commands via sudo
EDITOR=nano visudo(uncomment %wheel ALL=(ALL:ALL) ALL)
-
Enabling NetworkManager
systemctl enable NetworkManager
-
Set and generate a locale:
nano /etc/locale.gen(uncomment en_US.UTF-8)locale-gen
-
Create swap file:
fallocate -l 2G /swapfilechmod 600 /swapfilemkswap /swapfileecho '/swapfile none swap sw 0 0' | tee -a /etc/fstab
-
Install refind
refind-install
-
Edit refind.conf
nano /boot/efi/EFI/refind/refind.conf- Press Ctrl+W and find "Arch Linux", then replace this line:
options root=PARTUUID=someuuid rw add_edi_mcmmap- on this:
options root=PARTUUID=/dev/sda2 rw add_edi_mcmmap
-
Edit refind-linux.conf
nano /boot/refind-linux.confDelete the first two lines that mention "archiso"
-
Exit, unount and reboot:
exitumount /mnt -lreboot