Installing Arch using UEFI.

Checking if we're booted using UEFI.


	ls /sys/firmware/efi/
	

If the directory is populated then you're booted using UEFI.

Connecting to the internet.

If you're using a hardwired connection (ethernet) you can skip this step.


	wifi-menu
	

Connect to your access point then you can ping a site just to be sure. If everything is good, we can begin partitioning the drive.


	ping -c 3 www.google.com
	

Setting up a partition scheme.

Gonna use a four partition scheme comprised of /boot, /root, swap, /home. The drive name could be just about anything (nvmen1, sda, sdb, etc,.), use lsblk to determine what drive it is (note: we're gonna use sdX as a placeholder for now).


	gdisk /dev/sdX
	

Then we're gonna want to type o to clear current partition table. Press n to create a new partition, this is gonna be our /boot partition.


	Partition number: default
	First sector: default
	Last sector: +512MiB
	Hex code or GUID: EF00
	
Create three more partitions with the following details.

	Partition number: default
	First sector: default
	Last sector: +25GiB
	Hex code or GUID: default

	Partition number: default
	First sector: default
	Last sector: +16GiB	# Rule of thumb, RAM + 50%.
	Hex code or GUID: default

	Partition number: default
	First sector: default
	Last sector: default
	Hex code or GUID: default
	

You can now write the changes and exit with w. Confirm that GPT is present and that the partition table matches what you entered.


	gdisk -l /dev/sdX
	

Creating filesystems.

Format partitions.


	mkfs.vfat /dev/sdX1	# First partition (/boot)

	mkfs.ext4 /dev/sdX2	# Second partition (/root)
	mkfs.ext4 /dev/sdX4	# Fourth partition (/home)

	mkswap /dev/sdX3	# Third partition (swap)
	swapon /dev/sdX3
	

Mounting filesystems.


	mount /dev/sdX2 /mnt		# Mount root partition

	mkdir /mnt/boot			# Making and mounting /boot
	mount /dev/sdX1 /mnt/boot

	mkdir /mnt/home			# Making and mounting /home
	mount /dev/sdX4 /mnt/home
	

Installing the base system.

Installing Arch's base, along with that you can append some more packages you commonly use (neovim, dunst, Firefox,. etc,.).


	pacstrap /mnt base base-devel
	

If you're going to be using wifi, you're gonna need to append a few packages: iw, wpa_supplicant, dialog.

Configuring the system.

Generate an fstab to define how disk partitions are mounted into the filesystem.


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

Enter the new system.


	arch-chroot /mnt
	

Set time zone. In order to know what time zone you need to use, you're gonna need to look in /usr/share/zoneinfo/<region> (example: /usr/share/zoneinfo/America/Chicago).


	ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime
	hwclock --systohc
	

Set locale. Depending on your language, you will need to uncomment your localizations in /etc/locale.gen (example: en_US.UTF-8 UTF-8/en_US ISO-8859-1).


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

Set hostname.


	echo <hostname> >> /etc/hostname
	

Change root password.


	passwd
	

Install and configure systemd-boot.


	bootctl install
	cd /boot
	ls -l
	

Confirm vmlinuz-linux is present.


	cd loader/
	nano loader.conf
	

You can delete everything in this file and add this.


	default arch
	timeout 4
	

You can change the timeout value to 0 if you just want to instantly boot.


	cd entries/
	nano arch.conf
	

Then add this to the file.


	title Arch
	linux /vmlinuz-linux
	initrd /initramfs-linux.img
	options root=PARTUUID=<UUID> rw
	

In order to get the PARTUUID of /root, you can echo $(blkid) >> arch.conf, then delete everything but the PARTUUID (note: be sure to remove the quotes and include rw at the end).

Rebooting.


	exit
	reboot