Check if your boot with UEFI
ls /sys/firmware/efi/efivars
Check internet conection
ping -c 4 archlinux.org
Update system clock
date && timedatectl set-ntp true && date
Check the disk to partition
lsblk
Partitioning disk
cfdisk
Select the partition table type (recommended GPT) (If the disk has a partition table, this don't appear)Partition table example
Device | Size | Type |
---|
/dev/sdx1 | 550M | EFI |
---|
/dev/sdx2 | 2xRAM | SWAP |
---|
/dev/sdx3 | Remaining (at least 20GB) | Linux filesystem |
---|
When finish, select WriteFormatting partitions created
# EFI
mkfs.fat -F32 /dev/sdx1
# SWAP
mkswap /dev/sdx2
swapon /dev/sdx2
# Root
mkfs.ext4 /dev/sdx3
Mount filesystem
# Root
mount /dev/sdx3 /mnt
# Efi
mkdir /mnt/boot/efi -p
mount /dev/sdx1 /mnt/boot/efi
Add custom repo to mirrorlist
cat <<\EOF > /etc/pacman.d/mirrorlist
Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = https://mirrors.mit.edu/archlinux/$repo/os/$arch
EOF
Install base packages
pacstrap /mnt base linux linux-firmware neovim git
Generate filesystem tab
genfstab -U /mnt >> /mnt/etc/fstab
Change root path
arch-chroot /mnt
Configure timezone
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime && hwclock --systohc && date
Example: America/HavanaConfigure language
In /etc/locale.gen uncomment languages to uselocale-gen && echo LANG=lang_Country.UTF-8 > /etc/locale.conf
- Spanish: es_ES
- English: en_US
Configure hostname
echo your_hostname > /etc/hostname
Configure hosts
cat <<\EOF > /etc/hosts
127.0.0.1 localhost
::1 localhost
EOF
Install and enable NetworkManager
Configure custom repo server againpacman -S networkmanager && systemctl enable NetworkManager
Set a root password
passwd
Configure bootloader
pacman -S grub efibootmgr && grub-install --target=x86_64-efi --efi-directory=/boot/efi
Configure grub
neovim /etc/default/grub
# Change this key
GRUB_CMDLINE_LINUX_DEFAULT="text"
grub-mkconfig -o /boot/grub/grub.cfg
Reboot
exit && umount -R /mnt && reboot