Saturday, October 11, 2014

Installing Arch Linux


Download latest ISO from https://www.archlinux.org/download/ & burn it to a CD
If using in VM then boot from ISO directly.

For detailed guide refer official Installation guide - https://wiki.archlinux.org/index.php/Installation_guide

Note - Internet connectivity required for installation.

After booting the installation image, the following steps are required to initialize the installation process.

Partition the disks via fdisk or cfdisk & then format the partitions using mkfs.ext3, mkfs.ext4 & mkswap command appropriately.

    For demonstration I have created the below partitions of an 100 GB HDD assuming it as /dev/sda
   
        File System        Type         Partition        Size
        /dev/sda1               ext3          /boot                 200 MB
        /dev/sda2               swap         swap                2 GB
        /dev/sda3               ext4          /home               50 GB
        /dev/sda4               ext4          /                       47 GB
       
Mount the root partitions on /mnt & rest of the partitions under that

        File System            Mounted on
        /dev/sda4                  /mnt
        /dev/sda1                  /mnt/boot
        /dev/sda3                  /mnt/home
       
        Activate swap partition - swapon /dev/sda2

# Install the base packages

    pacstrap /mnt base
   
# Generate an fstab file

    genfstab -p /mnt
   
# Change root to new system

    arch-chroot /mnt
   
# Set the hostname (in the below command replace example_hostname with your actual hostname)

    echo example_hostname /etc/hostname
   
# Set the time zone:

    ln -sf /usr/share/zoneinfo/zone/subzone /etc/localtime

# Uncomment the needed locales in /etc/locale.gen, then generate them with:

    locale-gen

# Create a new initial RAM disk

    mkinitcpio -p linux

# Set the root password:

    passwd
   
# Install bootloader

    pacman -S grub-bios
    grub-install --target=i386-pc --recheck /dev/sda
    grub-mkconfig -o /boot/grub/grub.cfg
   
# Exit from chroot, reboot the System

    exit
    reboot
   
# Enjoy minimal Arch Linux now.