Step wise Installation of Arch Linux (Standalone OS)

Downloading Arch Linux and preparing a boot device

  1. Go to www.archlinux.org/downloads
  2. Download using torrent link |OR| click on any mirror closest to your location and download only the .iso file.
  3. Next you will need a software to create a boot device. Rufus is one of the best software to create a boot device.
  4. Download Rufus from rufus.aeko.ie
  5. Next you will need a USB drive (min. 8GB). Insert your USB drive and open Rufus.
  6. Select your USB device and the iso image you downloaded from the provided options in the Rufus and click start to make the device bootable. [NOTE: This process will erase all the previous data on your USB device]
Rufus
IMG 1.1

 

Installation – Part I

  1. Make sure your USB device that you prepared in the above step is inserted in the Computer you want to install Arch.
  2. Turn on your PC and make USB as your primary boot device through boot menu.
  3. If you don’t know how to then press F1/F9/F11/F12 to open the boot menu and select USB device. [The boot menu key varies as per the Computer so repeat this step until you find the actual one for your PC]
  4. The Arch boot menu should now appear on your screen as in IMG 2.1. Now select the live medium option i.e. Boot Arch Linux (x86_64)
Arch Linux Boot Menu
IMG. 2.1

Installation Part – II

  1. fdisk -l↵ to view the current disk partition.
  2. cfdisk /dev/sda↵ for disk partitioning menu.
  3. Select each partition and delete them with the option provided on the bottom.
  4. After all the partition are deleted select the free space and click on new option. Then enter the size for the swap partition (generally 2G should be enough) and select primary as it’s logical partition.
  5. Then select the type for this partition as 82 i.e. Linux Swap/Solaris.
  6. Again go to the remaining free space and click on new as before. Just hit enter providing the remaining space for this partition, also select primary as logical partition for this as well.
  7. Mark this as a bootable from the option at bottom. Then go to write option, hit enter key and type yes↵ followed by exit↵ next.
  8. mkfs.ext4 /dev/sda2↵ for formatting the disk drive and setting filesystem.
  9. Now Internet connection is needed for further step so to check your connection you can type ip a↵. If you see the IP address then you should be connected just as good.
  10. You also can type ping -c 5 8.8.8.8↵ to ping the Google 5 times and see if you are able to connect or not.
  11. However, if you are connect through ethernet cable and still cannot ping then you can simply type dhcpcd↵ to connect to the Internet else type wifi-menu↵ if you are on wireless connection.
  12. mount /dev/sda2 /mnt to mount the root partition.
  13. pacstrap -i /mnt base↵ for installing distribution packages on hard-disk. Hit enter for default options and wait till the installation finishes.
  14. genfstab -U -p /mnt >> /mnt/etc/fstab↵ to get the distribution mounted correctly.
  15. arch-chroot /mnt to use the actual installation.
  16. pacman -S grub-bios linux-headers linux-lts linux-lts-headers↵ to install the required packages. Hit enter for default options and wait till the installation finishes.
  17. nano /etc/locale.gen↵ to open the configuration file locale.gen. Then uncomment the line en_US.UTF-8 UTF-8 (or any other region that you prefer) by deleting the # sign in that line, press Ctrl+O to save followed by Crtl+X to exit.
  18. locale-gen↵ to generate the locale file.
  19. Type ln -sf /usr/share/zoneinfo and press TAB key couple of times to view the list of the time zones.
  20. Locate the region you are closest to and type the region name in the end of the above code e.g ln -sf usr/share/zoneinfo/Asia and hit the TAB key again couple of times.
  21. Find the location appropriate to you and type the name e.g ln -sf usr/share/zoneinfo/Asia/Kathmandu.
  22. ln -sf /usr/share/zoneinfo/Asia/Kathmandu etc/localtime↵ to set your timezone.[NOTE: Change /Aisa/Kathmandu as per your location]
  23. hwclock --systohc --utc↵ to syncronize the clock.
  24. passwd↵ for setting password of root user. Then type in your desired password as required.
  25. grub-install --target=i386-pc -recheck /dev/sda↵ to install grub on your system. Hit enter for default and wait for the installtion to complete.
  26. cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo↵ to copy the required files.
  27. grub-mkconfig -o /boot/grub/grub.cfg↵ for configuring the grub.
  28. exit↵ to exit the chroot environment.
  29. umount /mnt↵ to mount the directory.
  30. reboot↵ for rebooting with normal OS.
  31. If you boot from the USB device and see the Arch boot option as in IMG 2.1 then select the option Boot existing OS. If not then proceed with the next step.
  32. Now login with username root and enter the password you set in step 24.
  33. mkswap /dev/sda1↵ to set the swap partition.
  34. swapon /dev/sda1↵ to activate the swap.
  35. free -m↵ to check if your swap partition is working.

Post-Installation

  1. localectl set-locale LANG="en_US.UTF-8"↵ [NOTE: Replace en_US.UTF-8 with the language you uncommented on step 17 of Installation Part – II]
  2. Again we will require the internet connection for further process so check your connection as in step 9 to step 11 of Installation Part – II.
  3. pacman -Sy networkmanager network-manager-applet wireless_tools wpa_supplicant wpa_actiond dialog↵ for installting the basic packages for network manager. Hit enter for defaults and wait untill the installtion is completed.

Installing the Desktop Environment [KDE Plasma]

  1. useradd -m -G wheel -s /bin/bash home↵ to create a new user named home. [NOTE: Replace home with the username you desire]
  2. passwd home↵ to assign password for the user home. [NOTE: Replace home with the user you created in above step]
  3. pacman -Sy sudo↵ for installtion sudo. Hit enter key for defaults.
  4. visudo↵ to allow the use of the sudo command for above user. Now uncomment the line %wheel ALL = (ALL) ALL by deleting the # sign in the line. Then press ESC key and type :wq↵ to save and exit.
  5. ls /home↵ to check the user home directory.
  6. pacman -S xorg-server xorg-apps xorg-xinit↵ to install the xorg display server. xorg is a popular display server for linux you can install other display server if you like by going through the official Arch wiki. Hit enter for defaults and wait till the installtion is completed.
  7. pacman -S xf86-video-vesa↵ to install graphics diver. [NOTE: Replace xf86-video-vesa with your corresponding graphics manufacturer.]
    Graphics Manufacturer Installation Code
    AMD xf86-video-amdgpu
    INTEL xf86-video-intel
    NVIDIA xf86-video-nouveau

    You also can install vesa driver along side your primary driver as vesa driver can back you up if your primary driver fails.

  8. pacman -S sddm↵ to install the Display manager for KDE Plasma. Also you can install other display manager that corresponds with your driver. (see the table below)
    Display Manager Installation Code
    KDE Plasma 5 sddm
    KDE 4 kdm*
    GNOME gdm
    LXDE lxdm
    Universal Display Manager lightdm, mdm-display-manager, slim, xorg-xdm
  9. pacman -S plasma kde-applications↵ for installing the required packages to run the desktop environment and basic applications for the desktop. [NOTE: You can replace plasma and kde-applications with the Desktop Environment packages you like to install, see the table below]
    Desktop Environment Package Code Application Code
    KDE Plasma 5 plasma kde-applications
    Cinnamon cinnamon nemo-fileroller
    GNOME gnome gnome-extra
    LXDE lxde or lxde-gtk3* N/A
    MATE mate or mate-gtk3* mate-extra
    Xfce xfce4 xfce4-goodies
  10. systemctl enable sddm↵ to enable the display manager on boot. [NOTE: Replace sddm with the display manager you installed on step 8 of Instaling the Desktop Environment]
  11. reboot↵ to reboor the system.
  12. Unplug your USB device and you should be noe greeted witht he Desktop Environment that you installed. Enter the password your set for the user in step 2 of Installing the Desktop Environment.
  13. ENJOY!
Arch Linux - KDE Plasma 5
KDE Plasma 5

1 thought on “Step wise Installation of Arch Linux (Standalone OS)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.