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/mirrorlist
file. Server = https://mirror.yandex.ru/archlinux/$repo/os/$arch
(Russia)
- Add the mirrors on top of the
-
Create EFI partition:
lsblk or fdisk -l
to find the designation for the HDD. (Most likely/dev/sda
)fdisk /dev/sda
- if partition(s) already exist, type
d > enter
- use
p
to 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
/root
partition:- n
- 2
- enter
- +30G
-
Create
/home
partiton:- n
- 3
- enter
- enter
- w
- (THIS WILL REMOVE EVERYTHING and write made changes! Make sure you selected the right drive before pressing
w
by pressingp
, check the model number of your drive, it's size, etc. If you made a mistake, just pressq
and 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/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda3
-
Create the
/root
and/home
directories:mount /dev/sda2 /mnt
mkdir /mnt/home
mount /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/fstab
file: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-8
anden_US ISO-8859-1
for US English - uncomment any other line you need, to enable your language
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf && export LANG=en_US.UTF-8
-
Create EFI boot directory:
mkdir /boot/EFI
mount /dev/sda1 /boot/EFI
-
Install GRUB on EFI mode:
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
-
Mount Windows EFI partition:
lsblk
to locate Windows 100M partition (for example,/dev/sdb1
)mkdir /win && mount /dev/sdb1 /win
-
Enable
os-prober
to detect Windows installation:vim /etc/default/grub
- uncomment line
GRUB_DISABLE_OS_PROBER=false
-
Write GRUB config:
grub-mkconfig -o /boot/grub/grub.cfg
efibootmgr -v
make sure both Arch and Windows are in your boot options
-
Unmount Windows partition:
umount -R /win
rm -r /win
-
Create swap file (optional, but recommended):
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
-
Create a new user:
useradd -mg wheel user
(whereuser
is your username)passwd user
(can be equal to root password)vim /etc/sudoers
- uncomment either
%wheel ALL=(ALL)
or%wheel ALL=(ALL) NOPASSWD: ALL
to execute sudo commands - add
Defaults !tty-tickets
to do a passwordless sudo within the timeout period
-
Configure Ethernet connection:
pacman -S networkmanager
systemctl enable NetworkManager
to make it autostart
-
Exit, unmount and reboot:
exit
umount -a
reboot
-
Enjoy Arch Linux with dual-boot!