Daniel Ngu

Arch Installation

Media

ISO available via Arch download page.

Installation Guide available there as well or as text file after booting up the ISO.

Keyboard

I found this optional but for completeness:

Keyboard
1
$ loadkeys us

Partition

I opted for simpler partitioning, keeping my home directory separate.

Partition
1
2
3
4
5
6
7
8
9
$ fdisk -l               # List parition tables
$ gdisk /dev/sda         # To partition /dev/sda
$ o                      # Either new or start over
$ y                      # Accept
$ n                      # Create new partition
$ Enter                  # Accept default partition number
$ Enter                  # Accept default first sector
$ +100G                  # Allocated 100GB for home partition
$ 8302                   # Set type of partition or L to list

Similarly, repeat 5 to 8 to create the rest of the partitions. In my case, I’ve created /dev/sda2 for swap with 8200 and /dev/sda3 for / with 8300 using the remaining available.

Write Changes
1
2
$ w        # Write changes
$ y        # Accept

Alternatively, use cgdisk or cfdisk if dual boot with Windows.

Format

Format
1
2
3
$ mkfs.ext4 /dev/sda1        # Format home partition
$ mkswap /dev/sda2           # Format swap partition
$ mkfs.ext4 /dev/sda3        # Format / partition

Mount

Mount the Partitions
1
2
3
4
$ swapon /dev/sda2
$ mount /dev/sda3 /mnt
$ mkdir -pv /mnt/home
$ mount /dev/sda1 /mnt/home

Wireless

Setup Wireless Network
1
$ wifi-menu

Install Base System

Edit /etc/pacman.d/mirrorlist so that the preferred mirror is on top of the list.

Install Base System
1
$ pacstrap /mnt base

Configure the System

Configure the System
1
2
$ genfstab -p /mnt >> /mnt/etc/fstab        # Generate fstab
$ arch-chroot /mnt                          # chroot

Add hostname to /etc/hostname and /etc/hosts. For /etc/hosts, append it to the 127.0.0.1 line.

Configure the System
1
$ ln -s /usr/share/zoneinfo/Pacific/Auckland /etc/localtime

Uncomment the locale in /etc/locale.gen

Configure the System
1
$ locale-gen        # Generate locale 

Set locale preference by adding LANG="en_NZ.UTF-8" to /etc/locale.conf

Configure the System
1
2
$ mkinitcpio -p linux        # Create RAM disk
$ passwd                     # Set root password

Install Boot Loader

Syslinux
1
2
3
$ pacman -S gdisk                        # Prerequisite
$ pacman -S syslinux
$ syslinux-install_update -i -a -m

Or

Grub
1
2
3
4
$ pacman -S intel-ucode                        # If it's an Intel CPU
$ pacman -S grub os-prober
$ grub-install --recheck /dev/sda              # Install bootloader
$ grub-mkconfig -o /boot/grub/grub.cfg         # Generate grub.cfg

Grub is for MBR only.

Additional Install

Wireless connection will be setup within Gnome later so in the interim, install the following to continue using wifi-menu after booting in to the new system.

Wireless Network
1
$ pacman -S dialog wpa_supplicant        # Required by wifi-menu

Umount and Reboot

Reboot
1
2
3
$ exit                # Exit from chroot environment
$ umount -R /mnt
$ reboot