DEV Community

Richard Halford
Richard Halford

Posted on • Updated on • Originally published at

Part 2: Arch Linux Installation Guide

Originally published on

In part 2 of this series, we will be booting into a live Arch Linux environment. With the use of the USB drive we setup in the previous article.

Notes: There are a few presumptions being made for this guide. Regarding yourself and your current setup.

  • You will be moving from another *nix system.
    • This will help with the initial steps, with the programs being used to download the image and write it to a USB drive.
    • If you are coming from Windows, I will try to link to articles explaining this fairly trivial difference.
  • Have access to this guide on another device.

    • As once we get to installing Arch Linux, we'll be stuck in a terminal for some major steps.
  • Can handle looking deep into the empty void of the tty.

  • Make sure not to make any typos - as I try to do the same throughout these guides.

What you'll need:

  • USB drive which will have our installation medium loaded to it.
  • Disable Secure Boot for the installation image to be supported. This can be re-enabled once the install has finished.
  • Internet connection available.
    • Preferably via Ethernet.
    • If you will be using WiFi there are a few steps that I will cover. Every install I've done has been this way and it's really no bother.

Loading up the live environment

Before booting the USB, make sure to turn off secure boot in the UEFI.

Plug in your USB and turn on you computer. Making sure to enter the boot menu and select the installation medium on your USB.

The key to press to enter the boot menu will vary depending on your motherboard. If you never see this boot menu option, and you load straight into your original operating system (likely Windows). This will mean you also need to turn off Fast Startup in you UEFI settings.

Now you should be greeted with the virtual console, and see that you are logged in as the root user.

Setting up the live environment for installation

Boot mode

Before anything, we need to verify that we are booting into UEFI mode.

$ ls /sys/firmware/efi/efivars
Enter fullscreen mode Exit fullscreen mode

This should hopefully output the directory. If it didn't, you may be using a different boot mode than UEFI (e.g. BIOS).

Next, we will make sure your keyboard, clock and internet are connected. Before we move onto partitioning the hard drive to make space for our Arch install to live.

Keyboard layout

To get a list of all available key-maps available:

$ ls /usr/share/kbd/keymaps/**/*.map.gz
Enter fullscreen mode Exit fullscreen mode

To narrow down your search, you can be little more advanced and pipe this list into grep, to make the listing easier to read. A simple example to get all Dvorak key-maps:

$ ls /usr/share/kbd/keymaps/**/*.map.gz | grep dvorak
Enter fullscreen mode Exit fullscreen mode

Then, once you've found your key-map of choice, load it up with the following command. Remembering to leave off the .map.gz file extension:

$ loadkeys uk
Enter fullscreen mode Exit fullscreen mode

For the "/usr/share/kbd/keymaps/i386/qwerty/" keymap.

Now everything should be inserted correctly when you type out the remaining commands.

Make sure we're online

We first need to make sure our computer's network devices are recognised. As an example, my computer's Ethernet (eth13s0) and WLAN (wlp14s0) interfaces are listed with the following command:

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp13s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:8d:5c:50:76:63 brd ff:ff:ff:ff:ff:ff
3: wlp14s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether a4:34:d9:09:77:57 brd ff:ff:ff:ff:ff:ff
Enter fullscreen mode Exit fullscreen mode

If you're connected with an Ethernet cable, you should be okay with connecting to the internet. We can test this by pinging a popular domain we expect to be running. Once we can see that we can connect to the outside world, we can move on to the next step.

$ ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=55 time=27.0 ms
64 bytes from ( icmp_seq=2 ttl=55 time=28.6 ms
64 bytes from ( icmp_seq=3 ttl=55 time=154 ms
--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 26.984/69.917/154.174/59.581 ms
Enter fullscreen mode Exit fullscreen mode

Entering Ctrl-C to stop this call (^C shown above)

WiFi connection setup

For wireless connectivity, we will use the preinstalled iwd command line tool, with the following steps:

  • To enter the tool's interactive prompt.
$ iwctl
Enter fullscreen mode Exit fullscreen mode
  • Getting the name of the WiFi device. Mine was labelled as wlan0, so remember to replace the following commands with the name of your device.
$ device list
Enter fullscreen mode Exit fullscreen mode
  • Start a scan for available networks.
$ station wlan0 scan
Enter fullscreen mode Exit fullscreen mode
  • Bring up a list of the available networks.
$ station wlan0 get-networks
Enter fullscreen mode Exit fullscreen mode
  • Connect to the network. Replace SSID with the name of the network you want to connect to. You will then be prompted to enter and submit the password for this network.
$ station wlan0 connect SSID
Enter fullscreen mode Exit fullscreen mode
  • Hopefully show that you are now connected to your network.
$ station wlan0 show
Enter fullscreen mode Exit fullscreen mode

Exiting the interactive prompt with Ctrl-d.

To make sure things are running as they should.

$ ping
Enter fullscreen mode Exit fullscreen mode

Updating the system clock

This is a simple step.

$ timedatectl set-ntp true
Enter fullscreen mode Exit fullscreen mode

Follow me on Twitter!

Top comments (0)