Minimal Arch Linux UEFI Installation with i3-gaps
NOTE: This is Part 1 of a multi-part series.
Target Audience
Are you a keyboard lover looking for a solution to control everything on your pc with keyboard?
Are you are a person who likes minimalistic UI, bloat free and faster operating system?
Or you are simply looking to explore a new operating system? If so, keep reading!
This tutorial is strictly for laptops/computers which have UEFI Boot mode available. For Windows laptops you have disable secure boot and turn off fast startup.
It is assumed that you have previously worked with some linux distributions.
Disclaimer
Even after following the steps correctly you might face some problems, so make sure you have another device with internet connection so that you can search those errors and resolve them. If you haven’t worked on any Linux distribution before, I recommend that you should first try to install Arch on a VirtualBox and get familiar with the commands by reading up the documentation.
Since Arch Linux has no self explanatory GUI for installation this tutorial might not be suitable for beginners.
Motivation
RICE : “Rice” is a word that is commonly used to refer to making visual improvements and customizations on one’s desktop. It was inherited from the practice of customizing cheap Asian import cars to make them appear to be faster than they actually were — which was also known as “ricing”
Recently I found this video on youtube showing up the ricing up of linux distro : Manjaro and that’s how the workspace looked like and it’s beautiful.
In this series of tutorials I will be explaining in detail how you can achieve your own RICE of linux.
Step By Step Installation Guide
- Create a bootable Arch Linux using
Unetbootin
or any other software. - Name your USB device which corresponds to the release version you’re installing e.g
ARCH_201810
- Use
# wifi-menu
to connect to wireless network. - Update package indexes:
# pacman -Syyy
- Update the system clock :
# timedatectl set-ntp true
- Check disks information :
# fdisk -l
- Create root partition:
# gdisk /dev/sda
- For new root partition :
n
- From the start of the free space allot 20GB for root:
+20G
- Create root partition:
# gdisk /dev/sda
- For new home partition :
n
- From the start of the free space allot 30GB for home:
+30G
- Linux filesystem code :
8300
- Format the root partition :
# mkfs.ext4 -L "Arch Root" /dev/sda1
- Format the home partition :
# mkfs.ext4 -L "Arch" /dev/sda2
- Mount the root partition :
# mount /dev/sda1 /mnt
# mkdir /mnt/home
- Mount home partition
# mount /dev/sda2 /mnt/home
- Install base system. The ‘‘base-devel’’ package group should also be installed if you plan on compiling software from the AUR or using ABS:
# pacstrap -i /mnt base base-devel
- Mount the EFI partition :
# mkdir -p /mnt/boot/efi
# mount /dev/sdaX /mnt/boot/efi
- Generate fstab :
# genfstab -U -p /mnt >> /mnt/etc/fstab
- Check Static file system information:
# cat /mnt/etc/fstab
. You will find ext4(root, home), and vfat(efi) drives - Change to root :
# arch-chroot /mnt
- Change the root password :
# passwd root
- Set correct timezone of your preference :
# ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
- Generate initial RAM disk :
# mkinitcpio -p linux
- Installing grub tools :
# pacman -S grub efibootmgr dosfstools openssh mtools
- Generate grub configuration :
# grub-mkconfig -o /boot/grub/grub.cfg
- Install grub in HDD :
# grub-install /dev/sda
- Confirm grub installation :
# ls -l /boot/efi/EFI/arch/
- Set Locale :
# nano /etc/locale.gen
(uncomment en_US.UTF-8) # locale-gen
- Install some Desktop Environment, Display Manager or Windows Manager and other basic utilities :
# pacman -S dialog wpa_supplicant openssl xorg xorg-xinit xorg-server lightdm lightdm-gtk-greeter i3-gaps
- Add new user :
# useradd -G wheel -s /bin/bash -m -c "Sumit" sks147
- Set user password :
# passwd sks147
# EDITOR=nano visudo
and uncomment%wheel ALL ...
and%sudo ALL ...
- Install urxvt (Terminal Emulator):
# pacman -Syu rxvt-unicode
- Create swap file and allocation 2GB swap space:
# fallocate -l 2G /swapfile
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile
Back up the /etc/fstab file in case anything goes wrong:# cp /etc/fstab /etc/fstab.bak
Add the swap file info to the end of your/etc/fstab
file :# echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
- Enable display manager to login on startup :
# systemctl enable lightdm
- Exit from root :
# exit
- Unmount :
# umount -R /mnt
- Reboot and remove USB :
# reboot
- Get an ip address from DHCP :
# dhcpcd
- Install os-prober to get windows option also in grub menu :
# pacman -Syu os-prober
- Generate grub configuration again and you will see Found Windows Boot Manager output:
# grub-mkconfig -o /boot/grub/grub.cfg
This completes the bare minimum requirements for Arch Linux to work with i3 windows tiling manager. In the subsequent articles, we will explore post-installation Essentials, i3wm Customization, UI tweaks and much more.
Stay tuned.