Arch Linux Installation Guide on Nvidia V2

Please read and understand everything shown carefully before starting.

For the official installation guide, visit the Arch Wiki Installation Guide.

Requirements

  1. PC/Laptop
  2. UEFI Firmware is only recommendet
  3. Disabled Secure Boot
  4. A bootable USB stick with an ISO image
    • You can test the Arch Linux installation in a virtual machine.
    • Download the Arch Linux ISO here.
  5. Tools to create a bootable USB stick:

Installation Steps

Step Action
1 Set Up Keyboard Layout
2 Check if Booted to UEFI
3 Check Internet Connection
4 Connect to Wifi (if used)
5 Get Disk Information
6 Partition the Disk
7 Format the Partitions
8 Mount the Partitions to Install Linux Base System
9 Make downloads faster
10 Install the Linux Base System
11 Setup swapfile (optional)
12 Access the Root System
13 Install Requirements
14 Configure Arch System
15 Install Bootloader
16 Install a Desktop Environment
17 Install Recommended and Required Stuff
18 Install Nvidia Drivers
19 Reboot System
20 Change Keyboard Layout
21 Change Timezone (optional)
22 Settings needed to Install the Open Nvidia Drivers from CachyOS
23 Install CachyOS Repos
24 Install yay and paru
25 Install Chaotic-AUR Repos
26 Install CachyOS Kernel Manager
27 Install CachyOS Gaming Meta
28 Install CachyOS Settings
29 Install Open Nvidia Driver (Optional)
30 Change Bootloaderconfig
31 Patch Pacman
32 Final Update
33 Virtualization Tools

1. Set Up Keyboard Layout

localectl list-keymaps

List all available keyboard layouts.

loadkeys de

Load the selected keyboard layout (default is US). Replace "de" with your desired layout.

2. Check if Booted to UEFI

efivar -l

If lots of unknown text appears on your screen that you don't understand, it means you booted into UEFI mode.

3. Check Internet Connection

ping archlinux.org

This will ping a website and show an output in bytes to check if you're connected to the internet.

4. Connect to Wifi (if used)

iwctl

Use this tool to show wifi information and connect to it.

station device scan

Replace "device" with your wifi adapter name.

station device get-networks

Replace "device" again with your WiFi adapter name and list the available networks.

station device connect Wifi-Name

Replace "Wifi-Name" with your real wifi name and enter the password.

5. Get Disk Information

lsblk

This will show all information about your installed disks. You can use it anytime after changing your disks to display the updated information.

6. Partition the Disk

cfdisk /dev/nvme0n1

This will use the cfdisk tool for easier partitioning of your disk.

Disk Partitioning:

7. Format the Partitions

mkfs.fat -F32 /dev/nvme0n1p1

Format the EFI/Boot partition to FAT32.

mkfs.ext4 /dev/nvme0n1p2

Format your Linux filesystem partition to the Linux ext4 file system.

8. Mount the Partitions to Install Linux Base System

mount /dev/nvme0n1p2 /mnt

Mount your Linux filesystem partition to "/mnt".

mkdir /mnt/boot

Create a directory for your bootloader.

mount /dev/nvme0n1p1 /mnt/boot

Mount the EFI/Boot partition to "/boot".

9. Make downloads faster

nano /etc/pacman.conf

Enable parallel downloads by removing the # from the respective line. (If you are unsure about the config, leave it at 5.)

10. Install the Linux Base System

pacstrap -K /mnt base base-devel linux linux-firmware

Install the base Linux system to your root directory.

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

Generate an fstab file.

11. Setup swapfile (optional)

fallocate -l 4G /mnt/swapfile

Set your size and directory of your swap file.

chmod 600 /mnt/swapfile

Make your swap file only accessible by root for security reasons.

mkswap /mnt/swapfile

Format the swap file to the swap file system.

swapon /mnt/swapfile

Enable the swap file system.

nano /mnt/etc/fstab

Add "/swapfile none swap defaults 0 0" into that config – you can optionally add a comment (e.g. "# swapfile") on the line above.

12. Access the Root System

arch-chroot /mnt

Switch to the shell of your installed system.

13. Install Requirements

pacman -S networkmanager nano

Install NetworkManager and nano.

You can also install vim instead of nano if you prefer it.

systemctl enable NetworkManager

Enable the NetworkManager service.

14. Configure Arch System

nano /etc/locale.gen

Find your language (e.g., "de_DE"), uncomment it, and save changes.

locale-gen

Apply the language settings to your system.

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

Add your language configuration.

export LANG=de_DE.UTF-8
echo iusearchbtw >> /etc/hostname

Replace "iusearchbtw" with your preferred hostname.

ln -sf /usr/share/zoneinfo/

Navigate to your timezone directory (e.g., "Europe/Berlin") and link it:

ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc --localtime
systemctl enable fstrim.timer
systemctl enable systemd-timesyncd
nano /etc/pacman.conf

- Uncomment [multilib] (not multilib-testing) and enable parallel downloads (change the number up to your internet's capability, maximum is 20).

pacman -Sy
passwd

Set a password for the root user.

useradd -m -G wheel -s /bin/bash <username>

Replace "<username>" with your desired username.

passwd <username>

Set a password for your new user.

nano /etc/sudoers

Uncomment "%wheel ALL=(ALL) ALL". (Optionally add "Defaults rootpw" to require the root password for sudo, but this is not recommended for security reasons.)

15. Install Bootloader

exit
systemctl daemon-reload
arch-chroot /mnt
bootctl install

This installs the bootloader.

nano /boot/loader/entries/arch.conf

Name the config file as desired. Paste this into the config file:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img

You may replace Arch Linux with your chosen title in the bootloader menu.

echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/nvme0n1p2) rw" >> /boot/loader/entries/arch.conf

Make sure to specify the correct disk (e.g. "/dev/nvme0n1p2").

16. Install a Desktop Environment

pacman -S gnome-shell gnome-terminal gnome-control-center gnome-software gnome-menus gnome-shell-extensions gnome-system-monitor mutter gdm

You can also install gnome for a complete setup. The example above is for a minimal installation to avoid bloatware.

systemctl enable gdm

If you prefer another desktop environment or window manager, the installation steps will different.

18. Install Nvidia Drivers

pacman -S nvidia-dkms libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings
pacman -S linux-headers
nano /etc/mkinitcpio.conf

Add the following to "MODULES=()": "nvidia nvidia_modeset nvidia_uvm nvidia_drm"

mkdir /etc/pacman.d/hooks
nano /etc/pacman.d/hooks/nvidia.hook

Insert the following content into the hook file:

[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia

[Action]
Depends=mkinitcpio
When=PostTransaction
Exec=/usr/bin/mkinitcpio -P

This ensures the correct Nvidia modules are loaded and that the mkinitcpio image updates automatically.

19. Reboot System

exit
umount -R /mnt
reboot

20. Change Keyboard Layout

21. Change Timezone (optional)

sudo timedatectl set-timezone Europe/Berlin

If your timezone is not loaded correctly, run this command.

22. Settings needed to Install the Open Nvidia Drivers from CachyOS

sudo nano /etc/mkinitcpio.conf

Remove from "MODULES=()": "nvidia nvidia_modeset nvidia_uvm nvidia_drm"

23. Install CachyOS Repos

wget https://mirror.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
sudo ./cachyos-repo.sh
cd ..
sudo rm -r cachyos-repo.tar.xz cachyos-repo

24. Install yay and paru

sudo pacman -S yay paru

25. Install Chaotic-AUR Repos

sudo -i
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
exit
sudo gedit /etc/pacman.conf

You can delete the last 5 lines in the pacman.conf and replace them with all cachyos repos. Then add:

[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist

After that, copy all these repos to the very first line at the top.

sudo pacman -Sy

26. Install CachyOS Kernel Manager

sudo pacman -S cachyos-kernel-manager

Launch the CachyOS Kernel Manager: Select the kernel you want to install. Recommended is the linux-cachyos one for better performance. In cost of stability, use the linux-cachyos-rc one.

27. Install CachyOS Gaming Meta

sudo pacman -S cachyos-gaming-meta

28. Install CachyOS Settings

sudo pacman -S cachyos-settings

30. Change Bootloaderconfig

sudo nano /boot/loader/entries/arch.conf
linux /vmlinuz-linux-cachyos
initrd /initramfs-linux-cachyos.img

Change the lines in the config to match and boot into the new kernel you installed.

31. Patch Pacman

sudo pacman -S pacman

32. Final Update

sudo pacman -Syuu

Optional: If you have problems or annoying outputs every time you use the pacman command, try reinstalling cachyos repos.

wget https://mirror.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz && cd cachyos-repo
sudo ./cachyos-repo.sh
cd ..
sudo rm -r cachyos-repo.tar.xz cachyos-repo

33. Virtualization Tools

If you are running the system in a VM, it is recommended to install these things for your VM software:

VMware Tools

sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
sudo systemctl enable vmtoolsd
sudo systemctl start vmtoolsd

Spice Tools (for KVM)

sudo pacman -S spice-vdagent
sudo systemctl enable spice-vdagentd
sudo systemctl start spice-vdagentd