Just skip steps 22, 23 and 25 if dual-boot isn't your use case scenario
-
Change keyboard layout (if needed, default is 'us')
- to see all avaliable layouts:
ls /usr/share/kbd/keymaps/**/*.map.gz loadkeys us
- to see all avaliable layouts:
-
Verify boot mode:
ls /sys/firmware/efi/efivars(If the directory exist your computer supports EFI)
-
Ping some site on the Internet to verify connection:
ping archlinux.org
-
Update system clock:
timedatectl set-ntp true- You can verify the status with
timedatectl status
-
Go to https://archlinux.org/mirrorlist and find the closest mirror that supports HTTPS:
- Add the mirrors on top of the
/etc/pacman.d/mirrorlistfile. Server = https://mirror.yandex.ru/archlinux/$repo/os/$arch(Russia)
- Add the mirrors on top of the
-
Create EFI partition:
lsblk or fdisk -lto find the designation for the HDD. (Most likely/dev/sda)fdisk /dev/sda- if partition(s) already exist, type
d > enter - use
pto list all partitions and other useful info - g (to create a new partition table)
- n (to create a new partition)
- 1
- enter
- +300M
- t
- 1 (for EFI)
-
Create
/rootpartition:- n
- 2
- enter
- +30G
-
Create
/homepartiton:- n
- 3
- enter
- enter
- w
- (THIS WILL REMOVE EVERYTHING and write made changes! Make sure you selected the right drive before pressing
wby pressingp, check the model number of your drive, it's size, etc. If you made a mistake, just pressqand repeat the steps 6-8)
- (THIS WILL REMOVE EVERYTHING and write made changes! Make sure you selected the right drive before pressing
-
Create the filesystems:
mkfs.fat -F32 /dev/sda1mkfs.ext4 /dev/sda2mkfs.ext4 /dev/sda3
-
Create the
/rootand/homedirectories:mount /dev/sda2 /mntmkdir /mnt/homemount /dev/sda3 /mnt/home
-
Install Arch linux packages:
pacstrap /mnt base base-devel linux linux-firmware(not a bad idea to include your editor of choice:vim,nano,emacs, etc)
-
Generate the
/etc/fstabfile:genfstab -U -p /mnt >> /mnt/etc/fstab
-
Chroot into installed system:
arch-chroot /mnt
-
Change root password
passwd
-
Edit the hostname of your machine
"arch" > /etc/hostname(you can use anything instead of arch)
-
Set the timezone:
ls /usr/share/zoneinfo/(to see possible timezones)ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
-
Update the Hardware clock:
hwclock --systohc --utc(make sure your Windows clock is set to UTC time for it to be synced with Arch)
-
Install boot manager and other needed packages:
pacman -S grub efibootmgr dosfstools os-prober mtools
-
Set locale:
vim /etc/locale.gen- uncomment
en_US.UTF-8anden_US ISO-8859-1for US English - uncomment any other line you need, to enable your language
locale-genecho LANG=en_US.UTF-8 > /etc/locale.conf && export LANG=en_US.UTF-8
-
Create EFI boot directory:
mkdir /boot/EFImount /dev/sda1 /boot/EFI
-
Install GRUB on EFI mode:
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
-
Mount Windows EFI partition:
lsblkto locate Windows 100M partition (for example,/dev/sdb1)mkdir /win && mount /dev/sdb1 /win
-
Enable
os-proberto detect Windows installation:vim /etc/default/grub- uncomment line
GRUB_DISABLE_OS_PROBER=false
-
Write GRUB config:
grub-mkconfig -o /boot/grub/grub.cfgefibootmgr -vmake sure both Arch and Windows are in your boot options
-
Unmount Windows partition:
umount -R /winrm -r /win
-
Create swap file (optional, but recommended):
fallocate -l 2G /swapfilechmod 600 /swapfilemkswap /swapfileecho '/swapfile none swap sw 0 0' | tee -a /etc/fstab
-
Create a new user:
useradd -mg wheel user(whereuseris your username)passwd user(can be equal to root password)vim /etc/sudoers- uncomment either
%wheel ALL=(ALL)or%wheel ALL=(ALL) NOPASSWD: ALLto execute sudo commands - add
Defaults !tty-ticketsto do a passwordless sudo within the timeout period
-
Configure Ethernet connection:
pacman -S networkmanagersystemctl enable NetworkManagerto make it autostart
-
Exit, unmount and reboot:
exitumount -areboot
-
Enjoy Arch Linux with dual-boot!