How to install Arch linux with Uefi

arch linux Arch Linux is a GNU / Linux distribution that uses a rolling-release package model and is developed independently. The default installation of the Arch Linux system is based on a minimum, which means it is configured according to user needs. What makes Arch Linux unique and it uses the Pacman package management system. This distribution is from Canada. Arch Linux is one of the best distribution of Linux because of the simplicity it provides on each and every part of the operating system, I am day to day user of Arch Linux and I recommend other Linux users and distro hoppers to switch to Arch Linux as soon as it is possible and I am 100% sure if you install it once you will never want to your last o another Linux distro and you will stop distro hopping.
Installation of Arch Linux is not as difficult as people have made it difficult for others to install you just have to follow few steps correctly and need to read wiki when you face any problem. In this guide I will further trim down installation process for you and make it easy for you to install without reading Arch wiki but remember arch wiki is your best friend in installation procedure if you face any problem/issue during installation if you are unable to find answers to your questions then you can ask questions on Arch Linux community. I have installed Arch Linux many times on my laptops and desktops, finally, now I can remember all step by step processes of building a perfect Arch Linux.
Warning:Before proceeding to install it is recommended to backup your important data and files I will not be responsible for any data loss and also make sure that you are following all steps correctly for the successful installation.



Requirements for Install Arch Linux

First, you have to make a live USB of the Arch Linux installation using a USB Flash-disk or CD /DVD. If you haven't made it then make it first using Rufus or another boot-able USB creating software. If you don't have the Iso Arch Linux file, then download latest ISO from the official website. After creating a bootable USB you have to reboot your system to prepare partitions for this installation.

Example of my partition :

512 MB, /boot/efi
50 GB, /
200 GB, /home

Explanation of my partitioning scheme

512 MB, /boot/efi = To save Boot file UEFI
50 GB, / = To partition root (place to store) backgrounds, fonts, icons, themes)
200 GB, /home = To partition home (place to store) video, music, downloads, pictures)
I am on SSD drive there is no need for swap and I have plenty of ram which means swap is useless for me if you are on older systems then I will recommend you to create swap half of your ram size.
If everything is complete, proceed to the installation process.

The process of installing Arch Linux

Boot from the live USB of your Arch Linux installation. Then as usual, after entering the command line type below to connect Wi-Fi
wifi-menu
Test the connection by sending ping
ping www.manzoorsblog.tk
if you start receiving packets it's mean you are connected to the internet
Ctrl+C to stop.
Update system clock
Run the below command to update the accuracy of time
timedatectl set-ntp true
To check the status service, use it timedatectl status.

Create Partition

Please check the partition /dev/sdaX that you have created, to make sure you are on target, run the following command
fdisk -l
Create partitions with example partition formats as above or if you have made the partition skip this way
cgdisk /dev/sda
Warning: pay close attention to which partition you have created and specified to install Arch Linux. Pay attention/dev/sdaX Look carefully at my partitions ( example ):

/dev/sda1 to partition swap
/dev/sda2 to partition /boot/efi
/dev/sda3 to partition / (root)
/dev/sda4 to partition /home

Format partitions

Format 4 partitions that you have specified with the commands below
WARNING Don't format it wrongly!
make swap
mkswap /dev/sda1
format efi partition as fat32
mkfs.fat -F 32 /dev/sda2
format root partition as ext4
mkfs.ext4 /dev/sda3 -L "ArchRoot"
format root partition as ext4
mkfs.ext4 /dev/sda4 -L "ArchHome"

Mount

After formatting the 4 partitions above, then mount everything and activate the swap.
WARNING Do not Mount! partitions on the wrong directory
Turn on swap
swapon /dev/sda1
Mount root partition
mount /dev/sda3 /mnt
make new directories home & boot on /mnt
mkdir /mnt/{boot,home}
make efi folder in boot folder
mkdir /mnt/boot/efi
mount your efi partition
mount /dev/sda2 /mnt/boot/efi
mount your home partition
mount /dev/sda4 /mnt/home

pull installation files from online servers

Pactrap is the command and process of installing a package base from Arch Linux.
For this guide I am downloading grub-efi-x86_64 efibootmgr as a boot loader, os-prober to automatically detect boot partitions in addition to the Arch Linux boot partition (for example the Windows partition if you apply dual boot), ntfs-3g to set the NTFS partition (Windows), bash-completion to expand the bash function. type
pacman -Syy 
then
pacstrap /mnt base base-devel grub-efi-x86_64 efibootmgr os-prober ntfs-3g bash-completion
Wait until it's finished downloading and installing Arch Linux

Genrate Fstab

I want all of my partitions to be exactly mounted as they are now after completing installation so here I am generating my fstab for my mounted volumes to make the permanently as they are right now.
genfstab -U /mnt >> /mnt/etc/fstab
you can check the file generated in /mnt/etc/fstaband edit if an error occurs.

Chroot Session

Now change to root mode to set up a new system installation type.
arch-chroot /mnt

Set Time zone

I am setting my time zone to PAKISTAN set your time zone according to your location or country.
Karachi is my timezone so i am using below command to set my time zone
ln -sf /usr/share/zoneinfo/Asia/Karachi /etc/localtime
to check other time zones type
ls /usr/share/zoneinfo
After selecting a time zone set clock according to your timezone
hwclock --systohc --utc
WARNING change Karachi and Asia according to your time zone

Language setup

type
nano /etc/locale.gen
Then uncomment (remove the # sign) below from you desired system language
in my case I want to use the english US as my local language I am removing the hash sign from
en_US.UTF-8 UTF-8
en_US ISO-8859-1
Press Ctrl+O to save & Ctrl+X to exit from the nano text editor.
type below command to generate your local language
locale-gen

Hostname

Make a hostname file change manzoor from below command to your desired host name
echo Manzoor-pc > /etc/hostname

Create user name & password for your users

type below command for the root password
passwd root
enter your password and confirm it & create the new user account for computer user/ secondary user with sudo or root user priveledges. enter below command and change manzoor with your user name
useradd -m -g users -G sudo,power,storage manzoor
create password for your new user
passwd manzoor
enter your password and confirm it once again for the new user.

Initramfs

Make new initramfs using below command
mkinitcpio -P linux

Install grub

For Intel CPU users, you must install this intel ucode before installing grub if you are on amd you do not need intel ucode for installation type
pacman -S intel-ucode
Now install grub with this command
grub-install
WARNING SdX is your drive letter change it according to your drive latter in my case my drive is sda and also install it on your hard disk not on a partition if you do something wrong here you won't be able to boot in to you system.
/dev/sdX is a disk where GRUB will be installed (for example, disk is /dev/sda and partition is /dev/sda1).
if you are on dual boot you need os-prober install it by typing
os-prober
Now generate grub.cfg file
grub-mkconfig -o /boot/grub/grub.cfg

Install packages for network

dialog wpa_supplicant networkmanager network-manager-applet

install display server

I am using xorg because it is the best display manager but you can use wayland as well
pacman -S xorg xorg-server xorg-xinit mesa

Install Desktop Environment

I am a user of KDE plasma so for this guide, I am going to install KDE Plasma desktop environment
pacman -S plasma plasma-nm sddm kde-applications

VGA

Detect your VGA first by typing and entering lspci | grep VGA.
Intel

Note

I recommend not to install xf86-video-intel, because it can cause problems with Chromium and it is heavy as well.

pacman -S xf86-video-intel
VGA Standard
pacman -S xf86-video-vesa mesa mesa-demos
Nvidia
pacman -S xf86-video-nouveau
ATI
pacman -S xf86-video-ati
Now enable few services before exit
systemctl enable NetworkManager.service 
systemctl enable sddm.service 
exit from root mode and reboot your system
exit
reboot

Eject USB from your system and if you have followed my guide properly you do not need to read arch wiki for installation of Arch Linux on UEFI enabled system I had simplified process of installation a much as I can I hope for your success and below in comments tell me what kind of adventures you had for installation of Arch Linux.