lsblk
gdisk /dev/sda #(Can be sdb, sdc, etc)
Then enter options:
x
z
y
y
cgdisk /dev/sda
1. Boot Partition:
First Option: Blank Always
Size: 1024MiB
Hex Code: EF00
Name: boot
2. Swap Partition:
Size: 8GiB #(It's enough but can be increased if needed)
Hex Code: 8200
Name: swap
3. Root Partition:
Size: Blank #(Rest of the space in the drive)
Hex Code: Blank
Name: root
Then select 'write' and then 'quit'.
1. mkfs.fat -F32 /dev/sda1
2. mkswap /dev/sda2
3. mkfs.ext4 /dev/sda3
1. mount /dev/sda3 /mnt
2. mkdir /mnt/boot
3. mount /dev/sda1 /mnt/boot
pacstrap -i /mnt base linux linux-firmware sudo nano
genfstab -U -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash
1. nano /etc/locale.gen
2. Press Ctrl+W and search for en_US.UTF-8. Do it again, remove # and exit nano
3. locale-gen
4. echo LANG=en_US.UTF-8 > /etc/locale.conf
5. export LANG=en_US.UTF-8
1. ln -s /usr/share/zoneinfo/Asia/Kolkata > /etc/localtime #(This is for me but the region can be changed after searching for it a bit)
2. hwclock --systohc --utc
3. echo host_name > /etc/hostname #(Replace host_name with whatever hostname is desired)
4. sudo systemctl enable fstrim.timer
1. nano /etc/pacman.conf
2. uncomment out the ones you like (For example: multilib, etc)
1. passwd
2. enter the root password
useradd -m -g users -G wheel,storage,power -s /bin/bash user_name #(Replace user_name with desired username)
passwd user_name
1. EDITOR=nano visudo
2. Press Ctrl+W, search for wheel, uncomment and add at the end: Defaults rootpw
pacman -S bash-completion
1. pacman -S grub efibootmgr intel-ucode
2. mkdir /boot/efi
3. mount /dev/sda1 /boot/efi
4. lsblk (To check if it mounted correctly.)
5. grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --recheck
6. grub-mkconfig -o /boot/grub/grub.cfg
1. pacman -S os-prober
2. fdisk -l /dev (To check in which partition Windows boot EFI file is located. It should be located in a partition of size ~260MB called Windows EFI boot or EFI system or something)
In my case the partition turned out to be /dev/nvme0n1p2 but it may be different for everyone.
3. mount /dev/nvme0n1p2 /mnt
4. os-prober
5. Backup existing grub config: cp /boot/grub/grub.cfg /boot/grub/grub.cfg-origin
6. grub-mkconfig -o /boot/grub/grub.cfg
1. pacman -S networkmanager
2. systemctl enable NetworkManager.service
First do an lspci to check for the Graphic cards attached.
For Intel:
1. pacman -S xf86-video-intel libgl mesa
For NVIDIA:
1. pacman -S nvidia nvidia-lts nvidia-libgl mesa
1. exit
2. umount -R /mnt
3. reboot
sudo pacman -S dkms linux-headers xf86-input-libinput xorg-xinput mesa xorg-server xorg-apps xorg-xinit xorg-twm xorg-xclock xfce4-terminal plasma sddm ccache ntfs-3g
#(Here plasma and sddm can be replaced with gnome and gdm for GNOME desktop environment)
sudo systemctl enable sddm.service