Reference Computer Software OS Linux Distributions Arch Help Guides Installation

Arch Linux Installation Guide

for PC "Serena"

by Paul Moffat - 190921


Guide Notes (230221)

  • This is a web-adaption of the original guide I created in 2019 using Libre Office which I then printed to hardcopy for personal reference.
  • This was created for my first installation of Arch Linux on actual hardware. All my previous installations of Arch Linux were through virtual machines.
  • After getting familiar with the Arch install process I decided it would be easier for me to create a step-by-step install guide specific to my own computer.
  • The computer Serena was a custom built PC that I had from 2013 to 2021, with various updates in storage and graphics cards etc over the years up until I lost that PC in 2021.
  • I decided to install Arch Linux along side the existing Linux Mint and Windows 7 installations to assist in my understanding of Linux in general, and to be honest, for the challenge as well. By having Arch Linux installed separately I could play around with it without the risk of completely borking my main operating systems and if I broke anything in Arch I could just reinstall it, or move on to something else.
  • As it turned out, I never did end up breaking that installation of the Arch Linux system, atleast to a point of a need to reinstall.
  • I had when I wrote the guide intended for the possibility for Arch Linux to become my main OS. I wasn't 100% sure at the time though so I decided to just experiment around with it at first and see where it went.
  • This installation and my experience with it did though seriously increase my interest in Arch Linux so it did eventually become my main operating system on the Serena PC, and actually remains so up until today through all my following computers.
  • As Arch Linux became my main operating system on that PC I did eventually remove Linux Mint. I kept Windows 7 installed though for gaming and work related requirements and as a backup OS - just incase.
  • Yes, I did actually create a 256 GB SWAP partition (lol facepalm). My understanding at the time was to use a swap space 2x the ram capacity of the system. That PC only had 32 gigs of ram, with a max of 64 but I was planning on building another PC with a motherboard that could support up to 128. I thought I was future proofing Arch by allowing it to eventually be migrated over. Now I just use swap files like a normal person, my current computer (a mobile workstation; Aneeka) does actually have 128 GB of ram, but only has a 2 GB swap file which I'll increase if I ever need to (though doubt-it).

Overview

Linux Mint is currently the core operating system within Serena and has the Grub bootloader already installed. Once Arch Linux is installed the Arch Linux file system will need to be mounted in Linux Mint. Grub will then need to be updated through Mint to install Arch to the Grub menu.

The Arch Linux system will be installed onto the 4TB Seagate BarraCuda Pro harddisk. This harddisk will need to be partitioned for EFI support via the following partitions. The EFI partition will be in place for when Arch Linux eventually becomes the core operating system but won't be enabled to begin with.

  • Partition 1 - EFI
    Device sdb1
    Size 512 MB
    Type EFI System
    Mount Location /mnt/boot/EFI
  • Partition 2 - BOOT
    Device sdb2
    Size 512 MB
    Type Linux extended boot
    Mount Location /mnt/boot
  • Partition 3 - SWAP
    Device sdb3
    Size 256 GB
    Type Linux swap
  • Partition 4 - HOME
    Device sdb4
    Size 2 TB
    Type Linux home
    Mount Location /mnt/home
  • Partition 5 - ROOT
    Device sdb5
    Size All remaining free space (approx 1.75 TB)
    Type Linux root (x86-64)
    Mount Location /mnt

Pre-Installation

  • Install Arch Linux installation USB drive into the computer and boot into the Arch Linux Installation boot menu.
  • Choose Boot Arch Linux (x86_64) from the menu selection

Installation Root Command Prompt (#)

Networking

Initialise DHCP Client # dhcpcd
Verify Connection Availability & Wireless Interface # ip addr show
Install Wireless WPA Settings Example Template # cp /etc/netctl/examples/wireless-wpa /etc/netctl/Archemon
Edit Archemon Wireless WPA Settings File # nano /etc/netctl/Archemon
1 Set Interface=wlp5s0
2 Set Description='Orcon'
3 Set ESSID='Archemon'
4 Set Key='<redacted>'
Start Wireless Interface # netctl start Archemon
Test Internet Connection (via Google DNS Server) # ping -c4 8.8.8.8

Configure Hardware Clock Sync & Timezone

Enable Network Time Syncronisation # timedatectl set-ntp true
Set Time Zone # timedatectl set-timezone "Pacific/Auckland"
Check Time Settings # timedatectl status
Copy Time from System Clock to Hardware Clock # hwclock --systohc

Disk Preparation

Verify Available Block Devices (harddrives etc) # lsblk
Open fdisk for Partition Creation # fdisk /dev/sdb
Create GPT (EFI enabled) Partition Table Enter 'g' to create a new empty GPT partition table
Create EFI Partition (1) - 512 MB
1 Enter 'n' to create new partition
2 Press ENTER to select initial partition number (1)
3 Press ENTER to select first sector default
4 Enter partition size reference "+512M"
5 Enter 'y' to remove any existing signature (if asked)
6 Enter 't' to change partition type
7 Press ENTER to select default partition (1 - if required)
8 Enter '1' to change partition type to EFI System
Create BOOT Partition (2) - 512 MB
1 Enter 'n' to create new partition
2 Press ENTER to select next partition number (2)
3 Press ENTER to select first sector default
4 Enter partition size reference "+512M"
5 Enter 'y' to remove any existing signature (if asked)
6 Enter 't' to change partition type
7 Press ENTER to select default partition (2)
8 Enter '30' to change partition type to Linux extended boot
Create SWAP Partition (3) - 256 GB
1 Enter 'n' to create new partition
2 Press ENTER to select next partition number (3)
3 Press ENTER to select first sector default
4 Enter partition size reference "+256G"
5 Enter 'y' to remove any existing signature (if asked)
6 Enter 't' to change partition type
7 Press ENTER to select default partition (3)
8 Enter '19' to change partition type to Linux swap
Create HOME Partition (4) - 2 TB
1 Enter 'n' to create new partition
2 Press ENTER to select next partition number (4)
3 Press ENTER to select first sector default
4 Enter partition size reference "+2T"
5 Enter 'y' to remove any existing signature (if asked)
6 Enter 't' to change partition type
7 Press ENTER to select default partition (4)
8 Enter '28' to change partition type to Linux home
Create ROOT Partition (5) - REST OF FREE SPACE
1 Enter 'n' to create new partition
2 Press ENTER to select next partition number (5)
3 Press ENTER to select first sector default
4 Press ENTER to use all remaining free space
5 Enter 'y' to remove any existing signature (if asked)
6 Enter 't' to change partition type
7 Press ENTER to select default partition (5)
8 Enter '24' to change partition type to Linux root (x86-64)
Review Partitions Changes Enter 'p' to review
Save Partitions Changes Enter 'w' to write

Format Partitions

EFI Partition # mkfs.fat -F32 /dev/sdb1
Boot Partition # mkfs.ext4 /dev/sdb2
Home Partition # mkfs.ext4 /dev/sdb4
Root Partition # mkfs.ext4 /dev/sdb5

Configure Swap Partition

Make # mkswap /dev/sdb3
Enable # swapon /dev/sdb3

Configure Partition Mounts

Mount Root Partition to existing Root directory # mount /dev/sdb5 /mnt
Create Home Directory # mkdir /mnt/home
Mount Home Partition to New Home Directory # mount /dev/sdb4 /mnt/home
Create Boot Directory # mkdir /mnt/boot
Mount Boot Partition to New Boot Directory # mount /dev/sdb2 /mnt/boot
Create EFI Directory # mkdir /mnt/boot/EFI
Mount EFI Partition to New EFI Directory # mount /dev/sdb1 /mnt/boot/EFI

Configure Pacman Mirrors

Install Reflector Mirror List Script # pacman -Sy reflector
Utilise 10 Fastest NZ Mirrors # reflector --verbose --latest 10 --country 'New Zealand' --sort rate --save /etc/pacman.d/mirrorlist

Arch Linux Installation

Install Arch Linux Base into Root Partition # pacstrap -i /mnt base
Create File System Table # genfstab -U -p /mnt/etc/fstab
Verify File System Table # cat /mnt/etc/fstab
Chroot Into New Arch Linux Install # arch-chroot /mnt

Configure Timezone & Locales

Link to Auckland Time Zone Data # ln -sf /usr/share/zoneinfo/Pacific/Auckland /etc/localtime
Set Locale Configuration File # echo 'LANG=en_NZ.UTF-8' > /etc/locale.conf
Set Locale Generation Configuration File # echo 'en_NZ.UTF-8 UTF-8' > /etc/locale.gen
Create Keymap file for US Style Keyboard # echo 'KEYMAP=us' > /etc/vconsole.conf
Generate Locales # locale-gen

Create Host Files for Local Host

Set Host Name # echo 'Serena' > /etc/hostname
Set Hosts # echo '127.0.0.1 localhost' > /etc/hosts
# echo '::1 localhost' >> /etc/hosts
# echo '127.0.1.1 Serena.localdomain Serena' >> /etc/hosts

Install Required Additional Packages (For First Bootup)

# pacman -S dialog dosfstools efibootmgr grub mtools openssh os-prober sudo vim wifi-menu wireless_tools wpa_supplicant

Enable Required Services (For First Bootup)

Wifi # systemctl enable wpa_supplicant.service
SSH # systemctl enable sshd.service

Configure User Accounts

Set Root Password (Very Important!) # passwd
Add Primary User Account # useradd -m <username>
Set Primary User Password (Important!) # passwd <username>
Add Primary User to Sudo Groups # usermod -aG wheel,audio,video,optical,storage,power <username>
Open Sudo Configuration # visudo
Uncomment %wheel ALL=(ALL:ALL) ALL

Exit & Restart

Exit Chroot Session # exit
Unmount All Partitions (Ignore BUSY Errors) # unmount -a
Restart Machine # reboot
Remove the Arch Linux Install Media As Required
Boot into Linux Mint As Required

After-Installation

Grub Configuration (Linux Mint)

Arch Linux will not yet be available for bootup. Login to Linux Mint and access the terminal. Mint needs to detect the Arch Linux installation and allow Grub to create a boot entry for Arch into its bootup menu.

Verify Arch Linux Install Presence # os-prober
Mount Arch Partitions As Required
Update Grub # update-grub

Restart Computer into Arch Linux

  • Use the standard restart method available within the Linux Mint GUI.
  • Choose the new Arch Linux boot entry from Grub to start Arch.
  • Once Arch Linux has booted up, login via the root user for some required after-installation setup.

Networking

Follow the information provided earlier in this guide to setup the Wifi access again. This time it should hold and be permanent.

Install Desktop Environment (with Web Browser)

Update Base System Packages # pacman -Syu
Install Video, KDE and Firefox Packages # pacman -S firefox plasma-desktop nvidia sddm xf86-video xorg-server xorg-xinit
Enable SDDM Service # systemctl enable sddm.service
Restart Machine # reboot

Desktop

After Arch Linux restarts SDDM should boot up and give a login window. Login using the primary user account and password (not root) created earlier and the KDE Plasma desktop should startup and load the desktop environment.

Enjoy :)