By brandon - Sun, Jan. 21, 2024 ( Modified: Mon, Jan. 22, 2024 )

Arch Install

Objective

This file contains my notes for installing Arch Linux.

Notes

Installation

Make bootable ISO

WiFi

Create Partitons

Partition Mount Point Size
required boot /mnt/boot 512MB
required root /mnt 8GB+
optional home /mnt/home 1G+

Encryption

LVM

Create Filesystems

btrfs

1
2
3
4
5
6
7
8
9
# create btrfs filesystem
mkfs.btrfs -L archlinux $DEVICE

# mount btrfs filesystem

# create subvolumes
cd /mnt
btrfs subvolume create @
btrfs subvolume create @home
Note

Mount filesystems

1
2
sudo mount -o noatime,compress=zstd:1,space_cache=v2,discard=async,subvol=@swap /dev/mapper/luks /
sudo mount -o noatime,compress=zstd:1,space_cache=v2,discard=async,subvol=@swap /dev/mapper/luks /home

Generate fstab

1
2
# generate fstab
genfstab -U -p /mnt >> /mnt/etc/fstab

Setup Mirrors

Pacstrap

1
2
3
4
5
# pacstrap and install packages
pacstrap /mnt base base-devel linux linux-headers linux-firmware vim \
		networkmanager grub efibootmgr mtools osprober dosfstools git \
		make python sudo fakeroot man-db man-pages dialog netctl \
		lvm2

Chroot

1
arch-chroot /mnt

mkinitcpio

1
HOOKS=(. . . block encrypt lvm2 filesystems btrfs . . .) run 
1
mkinitcpio -p linux

Set locale

1
2
3
4
5
# edit config file
vim /etc/locale.gen

# generate local
locale-gen

Set timezone

1
2
3
4
5
# link your localtime
ln -s /usr/share/zoneinfo/*/* /etc/localtime

# sync system to hardware clock
hwclock --systohc --utc

Networking

Update

Create users and groups and set passwords

1
useradd -m -g users -G wheel \<user>

Bootloader

systemd loader

grub

1
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
1
grub-mkconfig -o /boot/grub/grub.cfg

Optional: Create Swap File

btrfs swap

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# create swap subvolume
mount $MAPPER /mnt
btrfs subvolume create /mnt/@swap
umount /mnt

# create swapfile
btrfs filesystem mkswapfile --size 4g --uuid clear /swap/swapfile

# turn on swap
swapon /swap/swapfile

# fstab
/swap/swapfile none swap defaults 0 0

Graphical Enviroment