Arch Linux EFI Installation

Part 1 - Preparation and disk partitioning

Posted by Adones Pitogo on Mar 14, 2016; Updated on 27th, Jan, 2018

Using Arch Linux has quite some edge over other linux distros. Most major distinguishing features of Arch Linux are:

  • Softwares are mostly up to date. You get software releases ahead of other distros.
  • Centralized package manager. Unlike Ubuntu and other popular distros, you seldom need to download or compile any package to install. Pacman and the AUR has all the packages you need.
  • Less bloatwares. You start from commandline then install only the needed packages. e.g. desktop environment, text editor, terminal etc.
  • Rolling release. Hassle-free maintenance. No need for “full system upgrade” every once in a while. Packages are updated incrementally as newer versions come out.

Installing Arch Linux is a notably quite complicated procedure compared to other Linux/GNU distros. This guide is aimed for EFI systems which most modern computers come with.

Now, let’s start the installation!

Download Arch Linux

You can download Arch Linux ISO image here.

Create a bootable usb stick

After downloading Arch Linux ISO image, we need to create a bootable USB stick to contain our Arch Linux Installer. There are a lot of ways to create a bootable USB stick. For this guide we will be using Rufus as I find it easy to use and proven working base on my experience.

To successfully create a bootable USB stick, use a reliable brand of flash drive (I use a Sandisk). I had a hard time creating one using Kingston and thought my ISO image was corrupted. But it turned out that the flash drive was at fault.

  • Plug in your USB stick
  • Open up Rufus
  • Select your USB stick under the Device options
  • Leave other options as is
  • Select the Arch ISO image by clicking the cd-rom icon under Format Options > Create a bootable disk using ISO Image.
  • Press start


Hit close once done.

BIOS boot setup

Before booting into our USB stick, we need to configure our BIOS to boot our media in UEFI mode. Now boot into your BIOS settings. Depending on the model you have, these are the things you need to set:

  • Disable Secure Boot
  • Disable Launch CSM or Legacy Support
  • Set Boot Mode to UEFI
  • Enable USB Boot
  • Set USB Disk as boot priority

Then save your configuration and boot into Arch.

Disk Partitioning

If you are using SSD, you need to align it to optimize it’s performance. Read about optimizing your SSD here.

To verify you are booted in UEFI mode, check that the following directory is populated:

# ls /sys/firmware/efi/efivars

Now we are going to list our drives:

# lsblk

Output from lsblk:

sda      8:0    0  477G  0 disk 
├─sda1   8:1    0    1G  0 part /boot
├─sda2   8:2    0   12G  0 part [SWAP]
└─sda3   8:3    0  430G  0 part /
sdc      8:32   1  7.5G  0 disk 
└─sdc1   8:33   1  7.5G  0 part /run/media/adones/SANDISK_8GB

sda is my main drive and sdc is my USB stick. sda1, sda2 and sda3 are the partitions available in my main drive since I already installed Arch on this drive.

Let’s clean up our main drive to create new partitions for our installation:

# gdisk /dev/sda

Press x to enter expert mode. Then press z to zap our drive. Just hit y when prompted about wiping out GPT and blanking out MBR.

Now let’s create our partitions:

# cgdisk

Enter the device filename of your main drive, e.g. /dev/sda. Just press enter when warned about damaged GPT.

Now we should be presented with our main drive showing the partition number, partition size, partition type, and partition name. If you see list of partitions, delete all those first.

Let’s create our boot partition:

  • Hit New from the options at the bottom.
  • Just hit enter to select the default option for the first sector.
  • Now the partion size - Arch wiki recommends 200-300 MB for the boot size. Let’s make it 500MiB or 1GB in case we need to add more OS to our machine. I’m gonna assign mine with 1024MiB. Hit enter.
  • Set GUID to EF00. Hit enter.
  • Set name to boot. Hit enter.
  • Now you should see the new partition in the partitions list with a partition type of EFI System and a partition name of boot. You will also notice there is 1007KB above the created partition. That is the MBR. Don’t worry about that and just leave it there.

Create the swap partition:

  • Hit New again from the options at the bottom of partition list.
  • Just hit enter to select the default option for the first sector.
  • For the swap partition size, it is advisable to have 1.5 times the size of your RAM. I have 8GB of RAM so I’m gonna put 12GiB for the partition size. Hit enter.
  • Set GUID to 8200. Hit enter.
  • Set name to swap. Hit enter.

Create the root partition:

  • Hit New again.
  • Hit enter to select the default option for the first sector.
  • Hit enter again to use the remainder of the disk.
  • Also hit enter for the GUID to select default.
  • Then set name of the partition to root.

Lastly, hit Write at the bottom of the patitions list to write the changes to the disk. Type yes to confirm the write command. Now we are done partitioning the disk. Hit Quit to exit cgdisk.

Formatting the partitions

Let’s see the new partition list:

# lsblk

You should see something like:

sda      8:0    0  477G  0 disk 
├─sda1   8:1    0    1G  0 part /boot
├─sda2   8:2    0   12G  0 part [SWAP]
└─sda3   8:3    0  430G  0 part /
  • sda1 is the boot partition
  • sda2 is the swap partition
  • sda3 is the root partition

Format the boot partition as FAT32:

# mkfs.fat -F32 /dev/sda1

Enable the swap partition:

# mkswap /dev/sda2
# swapon /dev/sda2

Format root partition as ext4:

# mkfs.ext4 /dev/sda3

Connect to internet

We need to make sure we are connected to the internet to be able to install Arch Linux base packages. Let’s see the names of our interfaces:

# ip link

If you are on a wired connection, you can enable your wired interface by systemctl start dhcpcd@<interface>.

# systemctl start dhcpcd@enp3s0

If you are on a laptop, you can connect to a wireless access point using wifi-menu -o <wireless_interface>.

# wifi-menu -o wlp0s20u1

The resulting configuration file is stored in /etc/netctl. Now you can enable your wireless connection by netctl start <config_filename>. Hint: ls /etc/netctl to see available configuration files.

# netctl start my_accesspoint

Ping google to make sure we are online:

# ping -c 3

If you receive Uknown host or Destination host unreachable response, means you are not online yet. Review your network configuration and redo the steps above.

Next Step: Installation and configuration

Share: Email Twitter Facebook Google LinkedIn Reddit StumbleUpon Tumblr Buffer Digg