Module Progress
Module 2 of 10 • 7 min read
20%
Complete
Beginner to Mastery: A Step-by-Step Curriculum to Arch Linux

Module 1: Installation and Base System Setup

Module 2 of 10 7 min read

Learning Objectives:

  • Master the complete Arch Linux installation process from bootable media to working system
  • Understand UEFI partitioning schemes and filesystem selection
  • Learn to configure essential system settings and bootloader installation
  • Develop troubleshooting skills for common installation issues

The Arch Linux installation begins in a live environment that provides all the tools needed for system installation. This environment runs entirely from memory, allowing you to partition and format your storage devices safely.

Booting into the Live Environment: After creating your bootable USB drive, boot your computer from the USB. You'll see the Arch Linux boot menu with several options:

  • Arch Linux install medium (x86_64, UEFI): Standard installation for modern systems
  • Arch Linux install medium (x86_64, BIOS): For older systems without UEFI support

Select the appropriate option based on your system's firmware. Modern computers (manufactured after 2012) typically use UEFI, while older systems use BIOS.

Verifying Boot Mode: Once booted, verify your boot mode by checking if the EFI variables directory exists:

ls /sys/firmware/efi/efivars

If this directory exists and contains files, you're in UEFI mode. If the directory doesn't exist, you're in BIOS mode. This determines your partitioning strategy later.

Network Configuration: A working internet connection is essential for downloading packages during installation. The live environment includes several networking tools:

For wired connections, the system typically configures networking automatically via DHCP. Verify connectivity with:

ping -c 3 archlinux.org

For wireless connections, use the iwctl utility:

  1. Enter the interactive mode: iwctl
  2. List wireless devices: device list
  3. Scan for networks: station wlan0 scan (replace wlan0 with your device)
  4. List available networks: station wlan0 get-networks
  5. Connect to your network: station wlan0 connect "Your-Network-Name"
  6. Exit iwctl: exit

System Clock Synchronization: Ensure accurate time for package verification and system logs:

timedatectl set-ntp true
timedatectl status

Proper disk partitioning is crucial for a successful Arch Linux installation. The partitioning scheme depends on your boot mode (UEFI or BIOS) and storage requirements.

Understanding Partition Requirements: For UEFI systems, you need:

  • EFI System Partition (ESP): 512MB minimum, formatted as FAT32
  • Root partition: Remaining space, typically formatted as ext4
  • Swap partition (optional): Equal to RAM size for hibernation, or 2-4GB for swap space

For BIOS systems, you need:

  • Root partition: Entire disk or most of it, formatted as ext4
  • Swap partition (optional): Same sizing as UEFI

Partitioning with cfdisk: The cfdisk utility provides a user-friendly interface for disk partitioning:

cfdisk /dev/sda

Replace /dev/sda with your target disk (use lsblk to identify available disks). In cfdisk:

  1. Select GPT partition table for UEFI systems (or DOS for BIOS)
  2. Create the EFI System Partition:
    • Select New → Enter size: 512M
    • Change type to EFI System (type code: 1)
  3. Create the root partition:
    • Select remaining free space → New → Accept default size
    • Keep as Linux filesystem (type code: 20)
  4. Write changes with Write → type yesQuit

Formatting Partitions: After partitioning, format each partition with appropriate filesystems:

# Format EFI System Partition (UEFI only)
mkfs.fat -F32 /dev/sda1

# Format root partition
mkfs.ext4 /dev/sda2

# Format swap partition (if created)
mkswap /dev/sda3
swapon /dev/sda3

Mounting File Systems: Mount the partitions to prepare for installation:

# Mount root partition
mount /dev/sda2 /mnt

# Create and mount boot directory (UEFI)
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

# For BIOS systems, create boot directory without mounting
mkdir /mnt/boot

The base system installation uses pacstrap to install essential packages to your mounted root partition.

Essential Package Selection: Install the minimal base system with essential packages:

pacstrap /mnt base linux linux-firmware

This installs:

  • base: Core system utilities and libraries
  • linux: The Linux kernel
  • linux-firmware: Firmware files for common hardware

Additional Recommended Packages: For a more functional system, consider adding:

pacstrap /mnt base linux linux-firmware base-devel vim nano networkmanager

These additions provide:

  • base-devel: Development tools including make, gcc, and sudo
  • vim/nano: Text editors for configuration
  • networkmanager: Modern network management

Generating fstab: The filesystem table (fstab) defines how partitions are mounted at boot:

genfstab -U /mnt >> /mnt/etc/fstab

The -U flag uses UUIDs instead of device names, providing more reliable mounting. Verify the generated fstab:

cat /mnt/etc/fstab

After installing the base system, configure essential settings and install a bootloader to make your system bootable.

Entering the Chroot Environment: Change root into your new system to configure it:

arch-chroot /mnt

You're now working inside your installed system rather than the live environment.

Time Zone Configuration: Set your system's time zone:

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Replace Region/City with your location (e.g., America/New_York, Europe/London). Use timedatectl list-timezones to see available options.

Localization Setup: Configure system language and character encoding:

  1. Edit /etc/locale.gen and uncomment your desired locale:

    nano /etc/locale.gen
    # Uncomment: en_US.UTF-8 UTF-8
    
  2. Generate the locale:

    locale-gen
    
  3. Set the system locale:

    echo "LANG=en_US.UTF-8" > /etc/locale.conf
    

Network Configuration: Set your system hostname and configure network resolution:

echo "your-hostname" > /etc/hostname

Edit /etc/hosts to include:

127.0.0.1   localhost
::1         localhost
127.0.1.1   your-hostname.localdomain your-hostname

User Account Setup: Set the root password and create a user account:

# Set root password
passwd

# Create user account
useradd -m -G wheel -s /bin/bash username
passwd username

# Enable sudo for wheel group
EDITOR=nano visudo
# Uncomment: %wheel ALL=(ALL) ALL

Bootloader Installation: Install GRUB bootloader to make your system bootable:

For UEFI systems:

pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

For BIOS systems:

pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Network Service Setup: Enable NetworkManager for automatic network management:

systemctl enable NetworkManager
  1. Practice Installation: Perform a complete installation in a virtual machine before attempting on real hardware. This allows you to make mistakes safely and understand each step.

  2. Partition Planning: Design your partition scheme on paper before starting. Consider your storage needs, whether you want separate home partition, and swap requirements.

  3. Backup Strategy: Create a complete backup of important data and ensure you have recovery media for your current operating system before beginning installation.

  4. Hardware Research: Verify that all your hardware components are supported by checking the ArchWiki hardware compatibility pages.

  5. Command Mastery: Practice the installation commands in a safe environment until you can execute them confidently without constant reference to documentation.

You've now mastered the complete Arch Linux installation process, from creating bootable media to configuring a working base system. This hands-on experience has given you deep insight into how Linux systems are constructed and configured at a fundamental level.

The installation process demonstrates Arch Linux's philosophy of user control and understanding. Unlike automated installers, you've manually configured every aspect of your system, from partition tables to bootloader configuration. This knowledge will prove invaluable as you continue to customize and maintain your system.

In the next module, we'll explore package management with Pacman and the Arch User Repository (AUR), learning how to install software, manage dependencies, and keep your rolling release system up to date.

Contents

0%
0 of 10 completed