archlinux

10 - Mount the partitions

Previous: Format the partitions

References:


Mount the root volume to /opt:

mount -o compress=zstd:3 /dev/mapper/root /opt

Create sub volumes:

btrfs subvolume create /opt/@
btrfs subvolume create /opt/@home
btrfs subvolume create /opt/@log
btrfs subvolume create /opt/@pkg

List sub volumes:

btrfs subvolume list /opt -t

Mount sub volumes to /mnt:

mount -o compress=zstd:3,subvol=@ /dev/mapper/root /mnt
mount --mkdir -o compress=zstd:3,subvol=@home /dev/mapper/root /mnt/home
mount --mkdir -o compress=zstd:3,subvol=@log /dev/mapper/root /mnt/var/log
mount --mkdir -o compress=zstd:3,subvol=@pkg /dev/mapper/root /mnt/var/cache/pacman/pkg

For UEFI systems, mount the EFI system partition (replace /dev/sda1 accordingly):

mount --mkdir /dev/sda1 /mnt/boot

Check with

lsblk -f

Next: Connect to the network