Minimal Arch Linux UEFI Installation with i3-gaps

Sumit Kumar Singh
4 min readOct 15, 2018

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

  1. Create a bootable Arch Linux using Unetbootin or any other software.
  2. Name your USB device which corresponds to the release version you’re installing e.g ARCH_201810
  3. Use # wifi-menu to connect to wireless network.
  4. Update package indexes: # pacman -Syyy
  5. Update the system clock : # timedatectl set-ntp true
  6. Check disks information : # fdisk -l
  7. Create root partition:# gdisk /dev/sda
  8. For new root partition : n
  9. From the start of the free space allot 20GB for root: +20G
  10. Create root partition:# gdisk /dev/sda
  11. For new home partition : n
  12. From the start of the free space allot 30GB for home: +30G
  13. Linux filesystem code : 8300
  14. Format the root partition : # mkfs.ext4 -L "Arch Root" /dev/sda1
  15. Format the home partition : # mkfs.ext4 -L "Arch" /dev/sda2
  16. Mount the root partition : # mount /dev/sda1 /mnt
  17. # mkdir /mnt/home
  18. Mount home partition # mount /dev/sda2 /mnt/home
  19. 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
  20. Mount the EFI partition : # mkdir -p /mnt/boot/efi
  21. # mount /dev/sdaX /mnt/boot/efi
  22. Generate fstab : # genfstab -U -p /mnt >> /mnt/etc/fstab
  23. Check Static file system information: # cat /mnt/etc/fstab. You will find ext4(root, home), and vfat(efi) drives
  24. Change to root : # arch-chroot /mnt
  25. Change the root password : # passwd root
  26. Set correct timezone of your preference : # ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
  27. Generate initial RAM disk : # mkinitcpio -p linux
  28. Installing grub tools : # pacman -S grub efibootmgr dosfstools openssh mtools
  29. Generate grub configuration : # grub-mkconfig -o /boot/grub/grub.cfg
  30. Install grub in HDD : # grub-install /dev/sda
  31. Confirm grub installation : # ls -l /boot/efi/EFI/arch/
  32. Set Locale : # nano /etc/locale.gen (uncomment en_US.UTF-8)
  33. # locale-gen
  34. 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
  35. Add new user : # useradd -G wheel -s /bin/bash -m -c "Sumit" sks147
  36. Set user password : # passwd sks147
  37. # EDITOR=nano visudo and uncomment %wheel ALL ... and %sudo ALL ...
  38. Install urxvt (Terminal Emulator): # pacman -Syu rxvt-unicode
  39. 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
  40. Enable display manager to login on startup : # systemctl enable lightdm
  41. Exit from root : # exit
  42. Unmount : # umount -R /mnt
  43. Reboot and remove USB : # reboot
  44. Get an ip address from DHCP : # dhcpcd
  45. Install os-prober to get windows option also in grub menu : # pacman -Syu os-prober
  46. 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.

--

--