Archlinux Install

Guide to install archlinux with minimal configuration
Connect to wifi
Enter iwd console
1iwctl
Inside the iwd console
1device list
2station wlan0 scan
3station wlan0 get-networks
4station wlan0 connect "SSID_value"
Partiion
Use fdisk or cfdisk to partition the drives
fdisk options
for FAT32 partiton set the type to 1. EFI
using t
Assign filesystem types
1mkfs.fat -F32 /dev/sda1
2mkfs.ext4 /dev/sda2
After partitioning is complete the directory structure should look like this
1.
2โโโ mnt
3 โโโ boot
4 โย ย โโโ efi
5 โโโ etc
6 โย ย โโโ fstab
7 โโโ home
Use genfstab command to generate /etc/fstab
1genfstab -U /mnt >> /mnt/etc/fstab
2
3# Check using
4cat /mnt/etc/fstab
Keyring
For archlinux keyring use pacman-key
command
To refresh some or all keys
1pacman-key --refresh-keys
To reinitialize all keys
1pacman-key --init
2pacman-key --populate archlinux
Chroot
Install base packages
1pacstrap -i /mnt base vi
Chroot
1arch-chroot /mnt
Uncomment the following line /etc/pacman.conf
using vi editor
1ParallelDownloads=5
Install Packages
1sudo pacman -S --needed base-devel
2sudo pacman -S --needed nano neovim
3sudo pacman -S --needed linux linux-headers
4sudo pacman -S --needed linux-lts linux-lts-headers
5sudo pacman -S --needed linux-firmware sof-firmware
6sudo pacman -S --needed sudo # Should be in base-devel
7sudo pacman -S --needed openssh networkmanager wpa_supplicant wireless_tools netctl
8sudo pacman -S --needed ntfs-3g btrfs-progs exfatprogs lvm2
9sudo pacman -S --needed dialog
10sudo pacman -S --needed intel-ucode
Graphics Drivers
1sudo pacman -S --needed mesa
2# sudo pacman -S --needed nvidia nvidia-lts
Build Linux Image
1mkinitcpio -p linux linux-lts
Locale
Set locale
Edit /etc/locale.gen
Uncomment the following line
1en_US.UTF-8 UTF-8
Generate locale
1locale-gen
Create users
Set root passwd
1passwd
Create user
1useradd -m -G wheel name_of_user
2
3# Can also do
4# useradd -m -g users -G wheel name_of_user
Set the user's password
1passwd name_of_user
Edit /etc/sudoers
1EDITOR=nano visudo
Uncomment or add the following line
1%wheel ALL=(ALL) ALL
GRUB
Installing grub
1sudo pacman -S --needed grub os-prober dosfstools mtools
2sudo pacman -S --needed efibootmgr
Create /boot/efi/EFI
directory and mount the FAT32 filesystem in it
1mkdir -p /boot/efi/EFI
1# mount /dev/sda1 /boot/efi/EFI
Now, for UEFI install
1grub-install --target=x86_64-efi --bootloader-id="archlinux_grub_uefi" --recheck
2
3# Verify using
4ls -l /boot/grub
Copy
1cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
Build /boot/grub/grub.cfg
1grub-mkconfig -o /boot/grub/grub.cfg
Now, exit the chroot environment
1exit
Post install
List timezones
1sudo timedatectl list-timezones
Set timezone
1sudo timedatectl set-timezone Asia/Kolkata
Set hardware clock running in UTC
1sudo timedatectl set-local-rtc 0
Check current timedate settings
1sudo timedatectl status
Set hostname
1sudo hostnamectl set-hostname archlinux_hostname
Edit /etc/hosts
1127.0.0.1 localhost
2127.0.1.1 archlinux_hostname
Now, you may install xorg and window manager or a full blown desktop environment
Experimental
Reflector
1reflector -c "India" -a 6 --sort rate --save /etc/pacman.d/mirrorlist