Arch Linux EFI Installation

Part 2 - Installation and configuration

Posted by Adones Pitogo on Mar 14, 2016

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

Swap needs no mounting as 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 genfstab file:

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

For laptops, 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

Configuration

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

(Wired) Enable dhcp on a wired connection by systemctl enable dhcpcd@<interface>.service:

# systemctl enable dhcpcd@enp3s0.service

(Wireless) Install iw, wpa_supplicant, and (for wifi-menu) dialog:

# pacman -S iw wpa_supplicant dialog

Repeat the steps above for wireless connection to the internet.

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

# nano /etc/pacman.conf

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

[multilib]
Include = /etc/pacman.d/mirrorlist

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

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

Set password for root:

# passwd

Add a new user with username adones:

# useradd -m -g users -G wheel,storage,power -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

Reboot:

# reboot

Next Step: Installing Gnome desktop environment

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