Arch Linux EFI Installation

Part 2 - Installation and configuration

Posted by Adones Pitogo on Mar 14, 2016; Updated on 20th, Aug, 2018

Installing Arch Linux

After setting up the drive and connecting to the internet, we are now ready to install Arch Linux to our system.

First we need to mount the partitions that we created earlier to their appropriate mount points.

Mount the root partition:

# mkdir /mnt
# mount /dev/sda3 /mnt

Mount the boot partition:

# mkdir /mnt/boot
# mount /dev/sda1 /mnt/boot

We don’t need to mount swap since it is already enabled.

Now let’s go ahead and install base and base-devel packages into our system:

# pacstrap -i /mnt base base-devel

Just hit enter/yes for all the prompts that come up. Wait for Arch to finish installing the base and base-devel packages.

Now let’s generate our fstab file:

# genfstab -U /mnt >> /mnt/etc/fstab

For wireless connections, it might be a good idea to copy the config files in the /etc/netctl to the new system in /mnt so we don’t need to create another connection config later.

# cp /etc/netctl/my_accesspoint /mnt/etc/netctl


Now, chroot to the newly installed system:

# arch-chroot /mnt /bin/bash

Configure your locale:

The Locale defines which language the system uses, and other regional considerations such as currency denomination, numerology, and character sets. Possible values are listed in /etc/locale.gen. Uncomment en_US.UTF-8, as well as other needed localisations.



Save the file, and generate the new locales:

# locale-gen
# echo 'LANG=en_US.UTF-8' > /etc/locale.conf
# export LANG=en_US.UTF-8

Configure time:

A selection of timezones can be found under /usr/share/zoneinfo/. Since I am in the Philippines, I will be using /usr/share/zoneinfo/Asia/Manila. Select the appropriate timezone for your country:

# ln -s /usr/share/zoneinfo/Asia/Manila /etc/localtime

It is recommended to adjust the time skew, and set the time standard to UTC:

# hwclock --systohc --utc

Generate the initramfs image:

# mkinitcpio -p linux

Set the hostname:

# echo 'my-archbox' > /etc/hostname

Then add the hostname to the end of /etc/hosts:     localhost     my-archbox

For wired connections, enable interface by systemctl enable dhcpcd@<interface>.service:

# systemctl enable dhcpcd@enp3s0.service

For wireless connections, install iw, wpa_supplicant, and (for wifi-menu) dialog:

# pacman -S iw wpa_supplicant dialog

If you copied the configuration file from previous section for wireless connection, enable the connection by:

# netctl start my_accesspoint

Else, repeat the process for connecting to internet using wifi.

Enable multilib and AUR repositories in /etc/pacman.conf:

# nano /etc/pacman.conf

Uncomment multilib (remove # from the beginning of the lines):

Include = /etc/pacman.d/mirrorlist

Add the following lines at the end of /etc/pacman.conf:

SigLevel = Never
Server =$arch

Set password for root:

# passwd

Add a new user with username adones:

# useradd -m -g users -G wheel,storage,power,video -s /bin/bash adones

Set password for adones:

# passwd adones

Add the new user to sudoers:

EDITOR=nano visudo

Uncomment # %wheel ALL=(ALL) ALL

Install the boot loader:

# bootctl install

Create a boot entry /boot/loader/entries/arch.conf:

title Arch Linux
linux /vmlinuz-linux
initrd  /initramfs-linux.img
options root=/dev/sda3 rw

Exit chroot and reboot:

# exit
# reboot

Next Step: Installing Gnome desktop environment

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