Arch Linux Install Guide [Full / Complete Real PC Install] [GNOME 41.1, btrfs, systemd-boot]

Many may think that installing Arch Linux is difficult. In reality, the process is not much different from installing any Linux, except that the installation is done on the command line. Arch Linux own installation guide is excellent, but I’m trying here to explain in a little more detail how the whole process goes. This is my own command list for installing Arch Linux with GNOME Desktop.

Following this guide you can install Arch Linux with GNOME 41.1 desktop, networkmanager, systemd-boot, btrfs, man pages and basic devel packages. I assume that you are using Linux when you create your installation iso. If you use Windows, then use Windows tools to create bootable USB Media.

Check video version of guide, howto install Arch Linux with GNOME 41.1, btrfs and systemd-boot:

1. Before Arch Linux Install

1.1 Download Arch Linux iso image

cd ~

mkdir archlinux
cd archlinux

wget https://mirror.rackspace.com/archlinux/iso/2021.11.01/archlinux-2021.11.01-x86_64.iso https://mirror.rackspace.com/archlinux/iso/2021.11.01/archlinux-2021.11.01-x86_64.iso.sig

1.2 Verify Arch Linux iso image

gpg --keyserver-options auto-key-retrieve --verify archlinux-2021.11.01-x86_64.iso.sig

1.3 Change root User

su - 
## OR ##
sudo -i

1.4 Insert USB media, and check your devices

I attached 64 GB USB Media and it’s /dev/sdc

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 167.7G  0 disk 
├─sda1        8:1    0   499M  0 part 
├─sda2        8:2    0   100M  0 part 
├─sda3        8:3    0    16M  0 part 
├─sda4        8:4    0  69.4G  0 part 
├─sda5        8:5    0     1G  0 part 
└─sda6        8:6    0  96.7G  0 part 
sdb           8:16   0 465.8G  0 disk 
├─sdb1        8:17   0   487M  0 part 
├─sdb2        8:18   0   977M  0 part 
├─sdb3        8:19   0   3.8G  0 part 
└─sdb4        8:20   0 279.4G  0 part 
sdc           8:32   1  57.6G  0 disk <--- USB Media
├─sdc1        8:33   1   249M  0 part 
└─sdc2        8:34   1   249M  0 part 
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0     1G  0 part /boot
├─nvme0n1p2 259:2    0     4G  0 part [SWAP]
└─nvme0n1p3 259:3    0    50G  0 part /

1.5 Create bootable USB Media

dd if=/home/[user]/archlinux/archlinux-2021.11.01-x86_64.iso of=/dev/sdc bs=4M

sync

2. Arch Linux Install

2.1 Boot using USB Media

Disable Secure Boot and use UEFI boot option.

2.2 Keymap

Default is US keymap.

## List available keymaps ##
ls /usr/share/kbd/keymaps/*/*.map.gz /usr/share/kbd/keymaps/*/*/*.map.gz

## Change keymap ##
loadkeys es
loadkeys de
loadkeys no
loadkeys it
loadkeys dk
loadkeys cz
loadkeys fi
...

2.3 Verify the boot mode

ls /sys/firmware/efi/efivars

If the command shows the directory without error, then the system is booted in UEFI mode.

2.4 Connect to the Internet

If you use ethernet connection it should work out of the box. If you use wifi, then you can connect your wifi using following commands:

iwctl
[iwd]# device list
[iwd]# station [device] scan
[iwd]# station [device] get-networks
[iwd]# station [device] connect ssid
[iwd]# station [device] show
[iwd]# exit

2.5 Check your Internet connection

ping -c3 archlinux.org

2.6 Update the system clock

timedatectl set-ntp true

2.7 Partition the disks

You can use fdisk or cfdisk is also available. Using fdisk.

2.7.1 Find device(s)

lsblk
## OR ##
fdisk -l

2.7.2 Open device

I use here /dev/nvme0n1, your device could be /dev/sdX or something else.

fdisk /dev/nvme0n1

2.7.3 Create empty GPT partition table

Create empty GPT partition table, if you use already partitioned device, then skip this.

Command (m for help): g

Created a new GPT disklabel (GUID: 6F3CAE37-9D33-A94A-AB66-B12930CBDD23).

2.7.4 Create /boot partition

I use here 1Gb boot partition.

Command (m for help): n
Partition number (1-128, default 1): 
First sector (2048-1953525134, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1953525134, default 1953525134): +1G

Created a new partition 1 of type 'Linux filesystem' and of size 1 GiB.

2.7.5 Create swap partition

I use here 4Gb swap as an example.

Command (m for help): n
Partition number (2-128, default 2): 
First sector (2099200-1953525134, default 2099200): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2099200-1953525134, default 1953525134): +4G

Created a new partition 2 of type 'Linux filesystem' and of size 4 GiB.

2.7.6 Create root partition

I use here 50Gb root as an example.

command (m for help): n
Partition number (3-128, default 3): 
First sector (10487808-1953525134, default 10487808): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-1953525134, default 1953525134): +50G

Created a new partition 3 of type 'Linux filesystem' and of size 50 GiB.

2.7.7 Change partition types

Print your partitions

Command (m for help): p
Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 960 EVO 1TB                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3AF0E18F-10A6-B448-BA5F-F2756905EF13

Device            Start       End   Sectors Size Type
/dev/nvme0n1p1     2048   2099199   2097152   1G Linux filesystem
/dev/nvme0n1p2  2099200  10487807   8388608   4G Linux filesystem
/dev/nvme0n1p3 10487808 115345407 104857600  50G Linux filesystem

Change boot partition to EFI System

Command (m for help): t
Partition number (1-3, default 3): 1
Partition type or alias (type L to list all): 1

Changed type of partition 'Linux filesystem' to 'EFI System'.

Change swap partition to Linux swap

Command (m for help): t
Partition number (1-3, default 3): 2
Partition type or alias (type L to list all): 19

Changed type of partition 'Linux filesystem' to 'Linux swap'.

Print again your partitions

Command (m for help): p
Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 960 EVO 1TB                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3AF0E18F-10A6-B448-BA5F-F2756905EF13

Device            Start       End   Sectors Size Type
/dev/nvme0n1p1     2048   2099199   2097152   1G EFI System
/dev/nvme0n1p2  2099200  10487807   8388608   4G Linux swap
/dev/nvme0n1p3 10487808 115345407 104857600  50G Linux filesystem

Finally write changes to disk.
Print again your partitions

Command (m for help): w

2.8 Format the partitions

2.8.1 Format boot partion

EFI partition uses FAT32 filesystem

mkfs.fat -F32 /dev/nvme0n1p1

2.8.2 Format swap partion

mkswap /dev/nvme0n1p2

2.8.3 Format root partion

I use btrfs here for root partition (and add label arch-box), you can of course select ext4 or any other filesystem too.

mkfs.btrfs -L arch-box /dev/nvme0n1p3

2.9 Mount the file systems

Mount all file systems under /mnt

2.9.1 Enable swap partion

swapon /dev/nvme0n1p2

2.9.2 Mount root partion

mount /dev/nvme0n1p3 /mnt

2.9.3 Mount root partion

Create and mount /mnt/boot

mkdir /mnt/boot

mount /dev/nvme0n1p1 /mnt/boot

2.10 Select the mirrors

Check and modify /etc/pacman.d/mirrorlist if needed.

2.11 Install essential packages

2.11.1 Check your CPU info

grep "model name" /proc/cpuinfo
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
model name	: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz

2.11.2 Install packages

Select intel-ucode or amd-ucode based on your processor.

pacstrap /mnt base linux linux-firmware intel-ucode btrfs-progs net-tools networkmanager dhcpcd iwd vim man-db man-pages texinfo gnome gnome-extra base-devel

This is very basic GNOME Desktop with VIM, man pages, networkmanager and btrfs. You can install later all your favorite packages.

2.12 Configure the system

2.12.1 Generate an fstab file

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

Check and edit /mnt/etc/fstab if needed.

2.12.2 Chroot - Change root into the new system

arch-chroot /mnt

2.12.3 Set the time zone

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

## Example ##
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

2.12.4 Generate /etc/adjtime

hwclock --systohc

2.12.5 Localization

Edit /etc/locale.gen. Uncomment all needed locales (example en_US.UTF-8) and generate locales.

locale-gen

Create the /etc/locale.conf file, and set the LANG variable

LANG=en_US.UTF-8

Set the keyboard layout to /etc/vconsole.conf file.

KEYMAP=us

2.12.6 Network configuration

Create the /etc/hostname file

arch-box

Create the default /etc/hosts file

127.0.0.1	localhost
::1			localhost
127.0.1.1	arch-box

2.12.7 Create a new initramfs

mkinitcpio -P

2.12.8 Set the root password

passwd

2.12.9 Create user(s)

useradd -m -G wheel inttf
passwd inttf

2.12.10 Enable needed services

systemctl enable gdm
systemctl enable NetworkManager

2.12.11 Configure boot loader (systemd-boot)

First install systemd-boot to /boot partition.

bootctl install

Create /boot/loader/loader.conf file with following content

default arch.conf
timeout 4
console-mode max
editor no

Create /boot/loader/entries/arch.conf file with following content (select intel-ucode or amd-ucode based on your system)

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
#initrd /amd-ucode.img
initrd  /initramfs-linux.img
options	root="LABEL=arch-box" rw

2.13 Reboot

Log out pressing CTRL+D.

Umount filesystems

umount -R /mnt

Reboot

reboot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close