Skip to main content

Installation

Mounting the drive

You've now formatted your drives successfully, you now need to install Linux itself. That is the longest part of the installation, so get ready!

Mount all your partitions with the following commands:

Note:
- Replace the /dev/vda device with your own.
- The following commands are for UEFI systems only.

# Mount the root partition
root@archiso ~ # mount /dev/vda3 /mnt
# Create boot partition mountpoint, and mount the boot partition
root@archiso ~ # mkdir -p /mnt/boot/efi
root@archiso ~ # mount /dev/vda1 /mnt/boot/efi

You've now successfully mounted your root and boot partitions in the correct place. Mounting the swap partition is a little different, though it is very simple:

root@archiso ~ # swapon /dev/vda2

NowNow, check if you've mounted everything properly. Run lsblk to do so.

root@archiso ~ # lsblk

Basic Installation

Installing the system is quite easy, just run the following command for the basic packages we need to boot. You can add your own packages at the end of the command (like git, wget, or curl), though we'll focus on the desktop environment and other optional packages later on. For nownow, you need a base system to work with.

root@archiso ~ # pacstrap /mnt base linux linux-firmware sof-firmware base-devel grub efibootmgr vim nano networkmanager

With pacstrap we basically tell pacman (Arch's default package manager) to install packages into /mnt.
base, linux, linux-firmware, grub and efibootmgr are packages we cannot boot without. The first 3 are self-explanatory, grub is our bootloader and efibootmgr provides UEFI support for GRUB.

In the command above, you'd also be installing vim, nano and networkmanager. The first two are text editors, that we need to edit our configurations, and networkmanager manages our network connection.

Note: If you need to connect to WiFi later on in the system, add iwd to the pacstrap command.

This command may take some time, depending on your internet speeds, to install everything onto your drive.

Tip: Try clearing your screen with Ctrl-L!

Once the command is done, we can look at fstab. The fstab command helps us generate a special file, that the system uses to automatically mount partitions (such as boot and swap) on system startup. It is crucial for us to generate this file. That is luckily very simple.

root@archiso ~ # genfstab /mnt

genfstab outputs the available partitions on your drive. We do not want that ouputtedoutputted to our terminalterminal, though, so we just redirect this commandscommand's output to the proper file.

root@archiso ~ # genfstab /mnt > /mnt/etc/fstab

Note: You are not yet ready to reboot, please configure your system first.

Your system's now ready to be configured! You can now head on to the next step.