Installing Arch Linux

As I had previously mentioned, I am here for the challenge and adventure of trying out an alien distro. Furthermore, I chose Arch because of its relative difficulty to use, as compared to other distros like Linux Mint (no offense). As such, I am going to be installing Arch through the command line, rather than the GUI installer which did not exist until recently.

Now, this is not a case of me guiding you step by step through the installation process; there are guides out there made by people who know Linux more in depth than me and who can properly structure a thoroguh walkthrough. Regardless, I will be "explaining" the steps on a surface level.

Want to know more? This is the guide I used on my install. No affiliation with It's FOSS of course.

First Step: Prepare the Installation Medium

To install pretty much any OS, you need to have an installation medium connected to your device as it is booting. This device has the installer for the entire OS flashed on it. So, when you boot to the device instead of your usual hard disk/solid state disk, you will enter the installation environment for your operating system.

Installation media may come in various forms. Previously, I used a DVD to store the Linux Mint installer. But, seeing we're in the 21st century and most devices don't have a DVD drive (including my desktop), I decided it would be simpler to use a USB drive. The USB drive can be erased after I am done installing Arch so it can be used for other things afterwards.

This is referred to as a live USB, meaning the application, in this case the Arch installer, is run directly from the USB and not the internal storage devices.

It is extremely easy to make a live USB. The only downside is that you need a computer which is already fully functional to flash the image onto the device. Assuming this requirement is satisfied, you can download the only two things needed to make your live USB.

Arch Linux Installer Image (.iso) -> https://archlinux.org/download/
Balena Etcher Installer (executable) -> https://www.balena.io/etcher/

You will be using Balena Etcher to "flash" the installer image onto your USB. The process is very straightforward. You plug your USB in, wait for it to be recognised, select is as target in Balena. Then you select the freshly downloaded ISO as the image to be flashed. Press start and in a few minutes, you will have a freshly baked live USB, ready for install.

Second Step: Boot from the Installation Medium

Unfortunately, a task as ridiculous as changing boot priorities can be quite a challenge.
1. My desktop: On my desktop, it was really easy. As the computer is booting, I can see a set of options on the bottom of the screen, underneath the logo/splashscreen for my motherboard. Among them is "Press DEL to enter BIOS configuration". This is nearly universal and pressing the delete key brings me to BIOS config where I can choose to boot to the USB instead of to my HDD/SSD.

2. My laptop: This may very well be the case for other closed systems, like prebuilt desktops. Essentially, the manufacturer does not want you prodding around in the BIOS settings. The way around this is by pressing escape repeatedly during the boot splashscreen, which interrupts the booting process and gives you the options to head to BIOS config.

After selecting the USB as boot device, your computer will continue booting and you will be greeted by an option box for what utilities you are going to run. Since we are installing the OS, we go with the first option. We are not here to perform troubleshooting.

Note: You do not need to change your boot priorities. Instead, you can choose to boot from the live USB as a one-off. In the future, you will have to repeat the above to boot from the USB again.

Third Step: Installing Arch

Now, as I said, there's a thorough guide linked up top. I will therefore be skimming through the installation procedure, as well as focussing on the aspects which concern me.

  1. Select target drive. I have some 5 drives in my computer. They are addressed in a certain way so I can differentiate them.
    fdisk -l will list all drives currently running, as well as their "address", capacity and brand. Note the address of the one you will install Arch to. This is something similar to /dev/sda. As this was the third drive installed, the address was /dev/sdc. I will use sdx for explanations.
    Select the drive for install using fdisk /dev/sdx

  2. Delete all existing partitions on the drive. A warning that this will wipe all data on the drive. Do your back ups before proceeding. The deletion is done by using the command d for each partition.

  3. Create EFI partition. Use n to create a new partition. Using default block size and setting partition size to 512MB

  4. Change partition type. t is used for this. You will select 01, where 01 corresponds to the EFI partition type.

  5. Create root partition. This is where all your OS is going to be installed. Done the same way as the EFI partition but using ext4 as partition type. Partition size is as you wish. At least 30GB for some breathing room.

  6. Create filesystems.
    mkfs.fat -F32 /dev/sdx1 -> This will put a Fat32 filesystem on the first (EFI) partition.
    mkfs.ext4 /dev/sdx2 -> This puts the ext4 filesystem on the second (root) partition.

  7. Connect to WiFI. Skipped because I'm connected by ethernet.

  8. Update the package manager. Pacman is he package manager for Arch. Other Linux flavours use other package managers like apt
    pacman -Syy

  9. Change Mirror Link for Arch install since connecting to default servers is slow.
    pacman -S reflector (installs reflector)
    reflector -c "ZA" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist (ZA is South Africa, which worked fine for me)

  10. Mount the Root partition
    mount /dev/sdx2 /mnt

  11. Install necessary packages on your drive
    pacstrap /mnt base linux linux-firmware vim nano

  12. Generate fstab file to define disk partitioning and how file systems are mounted in your Linux environment
    genfstab -U /mnt >> /mnt/etc/fstab

  13. Enter the mounted disk as root. This gives to admin privileges to modify the partition.
    arch-chroot /mnt

  14. Setting up timezone (skipped, did not work)

  15. Generate locale:
    nano /etc/locale.gen (uncomment the one you use. I use en_GB.UTF-8 because I'm British)
    locale-gen
    echo LANG=en_GB.UTF-8 > /etc/locale.conf
    export LANG=en_GB.UTF-8

  16. Configure your PC on your network.
    echo myarch > /etc/hostname
    touch /etc/hosts


    Add the following:
    127.0.0.1 localhost
    ::1 localhost
    127.0.1.1 myarch

  17. Setup password
    passwd

  18. Install your bootloader (Grub)
    pacman -S grub efibootmgr
    mkdir /boot/efi
    (makes directory /boot/efi on your root partition)
    mount /dev/sda1 /boot/efi (mount boot partition to the folder you just made)
    grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
    grub-mkconfig -o /boot/grub/grub.cfg

  19. Install Sudo. Sudo is what will allow users to obtain admin privileges.
    pacman -S sudo

  20. Create another user and set the password
    useradd -m user
    passwd user

  21. Give the user access to OS facilities.
    usermod -aG wheel,audio,video,storage user

  22. EDITOR=nano visudo
    Uncomment the line to allow members of group wheel to execute any command.

  23. Install desktop environment
    pacman -S xorg networkmanager
    pacman -S gnome
    systemctl enable gdm.service
    systemctl enable NetworkManager.service

  24. You're now done. Just exit the installer and boot right up into the Arch OS!
    exit
    umount /mnt
    shutdown now

  25. Don't forget to remove the USB before booting up again!

Well, this was pretty long and super technical. But don't worry! The next parts will be a lot more light as I attempt to navigate this new UI and the new OS which is completely alien to Windows.