Yasin's Arch Linux Install Guide 1 - Basic

Sources

Install Media

Prepare

setfont latarcyrheb-sun32 #IF: 4k screen

wifi-menu -o #IF: Wifi

ping archlinux.org

timedatectl set-ntp true
timedatectl status

Disk

UEFI

BOOTPART=/dev/sda1 #IF:Asus /dev/nvme0n1p1
DISKPART=/dev/sda4 #IF:Asus /dev/nvme0n1p5
fdisk -l
mkfs.ext4 $DISKPART
mount $DISKPART /mnt
mkdir -p /mnt/boot
mount $BOOTPART /mnt/boot
rm /mnt/boot/vmlinuz-linux #IF: Already exists

BIOS

fdisk -l
fdisk /dev/sda # n -> Enter (x4) -> w
fdisk -l
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt

Base

nano /etc/pacman.d/mirrorlist # Move Finland to top
pacstrap /mnt base

genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab

arch-chroot /mnt

rm /etc/localtime
ln -sf /usr/share/zoneinfo/Europe/Tallinn /etc/localtime
hwclock --systohc
date

nano /etc/locale.gen # uncomment en_US.UTF-8
locale-gen
echo "FONT=latarcyrheb-sun32" >> /etc/vconsole.conf # If 4k screen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "FONT_MAP=8859-2" >> /etc/vconsole.conf

echo XXXXX > /etc/hostname
cat /etc/hostname
echo "127.0.1.1  XXXXX.localdomain  XXXXX" >> /etc/hosts
cat /etc/hosts

pacman -S net-tools
pacman -S iw wpa_supplicant dialog  #IF: Wireless
systemctl enable dhcpcd

passwd

Bootloader

BIOS+DOS

pacman -S syslinux
syslinux-install_update -i -a -m
nano /boot/syslinux/syslinux.cfg # rename sda3 to sda1, change timeout duration

UEFI

bootctl --path=/boot install

echo -e "default arch\ntimeout 0\neditor 0" > /boot/loader/loader.conf

echo -e "title   Arch Linux\nlinux   /vmlinuz-linux\ninitrd  /initramfs-linux.img" > /boot/loader/entries/arch.conf
param=`blkid -s PARTUUID -o value /dev/sdaX` # Change /sdaX with your drive
echo "options root=PARTUUID=$param add_efi_memmap" >> /boot/loader/entries/arch.conf

Exit

exit
umount -R /mnt
reboot

User

pacman -S sudo

useradd -m -G wheel -s /bin/bash yasin
passwd yasin
nano /etc/sudoers # uncomment wheel line

exit # Log-off and log-in again

(Optional) Pikaur

https://github.com/actionless/pikaur

sudo pacman -S --needed base-devel git
mkdir -p tmp
cd tmp
git clone https://aur.archlinux.org/pikaur.git
cd pikaur
makepkg -fsri
pikaur -Syu

(Optional) Multilib

https://wiki.archlinux.org/index.php/Multilib

sudo nano /etc/pacman.conf # Uncomment multilib
sudo pacman -Syu

Troubleshooting

Fix UEFI

(Optional) to reset EFI partition if needed:

BOOTPART=/dev/sda1 #IF:Asus /dev/nvme0n1p1
DISKPART=/dev/sda4 #IF:Asus /dev/nvme0n1p5
umount -R /boot /mnt
mkfs.fat -F32 $BOOTPART
mount $DISKPART /mnt
mkdir -p /mnt/boot
mount $BOOTPART /mnt/boot
arch-chroot /mnt
pacman -S linux

Then run Install.Bootloader steps.