Arch Linux Personal Config & Documentation

website·Indexed 29 days ago

https://spina02.github.io/ArchLinux

Personal documentation and configuration guides for Arch Linux, covering pre-installation, installation, system configuration, and post-installation. Includes specific setup guides for GRUB, NVIDIA, and Hyprland.

Tokens
3.1K
Snippets
25
Records
29
Agent score
75%

What's inside Arch Linux

  1. Establish temporary network connectivity during installation

    Ensure the network interface is unblocked using rfkill. Connect via Ethernet (plug in cable) or WiFi (using iwctl). This connection is temporary for the installation process; a network manager like NetworkManager must be configured after chrooting into the installed system.
    # Check if network interface is blocked
    rfkill
    
    # Verify connection
    ping archlinux.org
  2. Install the Arch Linux base system

    Update the mirrorlist using reflector to ensure fast downloads, then use pacstrap to install the base system, kernel, and firmware. It is recommended to include a text editor, network manager, and CPU microcode (amd-ucode or intel-ucode).
    # Update top 10 best-rated mirrors based on speed and reliability
    sudo reflector --latest 10 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
    
    # Install base system and essential packages
    pacstrap -K /mnt base linux linux-firmware nano networkmanager man-db man-pages texinfo
  3. Configure BIOS MUX Mode for NVIDIA GPUs

    BIOS MUX mode allows switching between integrated and dedicated graphics. To configure this, reboot the device, enter the BIOS (typically by pressing del during boot), and locate the Display Mode option in the advanced settings.

    Available options include:

    • dGPU only: Restricts the system to use the discrete GPU exclusively.
    • dynamic: Allows the system to determine resource allocation and switching at runtime. This is the recommended setting to reduce power consumption and optimize resource allocation based on workload.
  4. Configure Network Hostname and NetworkManager

    Set the system hostname in /etc/hostname and update /etc/hosts with the local loopback and hostname entries. Install and enable NetworkManager to manage network connections.
    # Set Hostname
    echo <your_hostname> > /etc/hostname
    
    # Update /etc/hosts with:
    # 127.0.0.1 localhost
    # ::1 localhost
    # 127.0.1.1 <your_hostname>.localdomain <your_hostname>
    
    # Install and Enable NetworkManager
    pacman -S networkmanager
    systemctl enable NetworkManager
    
    # Connect to WiFi
    nmcli device wifi connect <your_SSID_or_BSSID> password <your_password>
  5. Reorder GRUB menu entries

    The order of entries in the GRUB menu is determined by the alphanumeric order of the files in /etc/grub.d/. To move a custom entry (like Windows) higher in the list, rename the corresponding file in that directory.
    # Example: Rename 40_custom to 25_windows to move it up the list
    sudo mv /etc/grub.d/40_custom /etc/grub.d/25_windows
    
    # Regenerate config to apply the new order
    sudo grub-mkconfig -o /boot/grub/grub.cfg
  6. Install NVIDIA Drivers on Arch Linux

    Install the NVIDIA drivers and utilities using paru. It is recommended to use the nvidia-dkms version to ensure compatibility with different kernels. After installation, verify the driver status using the nvidia-smi command to check the GPU name, driver version, and CUDA version.
    # Recommended installation
    paru -S linux-headers nvidia-dkms nvidia-utils nvidia-settings
    
    # Alternative installation
    paru -S nvidia nvidia-utils nvidia-settings
    
    # Verification
    nvidia-smi
  7. Configure Time Zone and Localization in Arch Linux

    Set the system timezone by creating a symlink to the zoneinfo directory and syncing the hardware clock. Then, generate the system locales by uncommenting the desired locale in /etc/locale.gen and setting the LANG variable in /etc/locale.conf. To make keyboard layout changes persistent, set the KEYMAP variable in /etc/vconsole.conf.
    # Set Timezone
    ln -sf /usr/share/zoneinfo/Your/Timezone /etc/localtime 
    hwclock --systohc
    
    # Generate Locales
    # Edit /etc/locale.gen first, then:
    locale-gen
    echo LANG=en_US.UTF-8 > /etc/locale.conf
    
    # Set Keyboard Layout (Example: de-latin1)
    echo KEYMAP=de-latin1 > /etc/vconsole.conf
  8. Prepare the Arch Linux Live Environment

    Boot from the USB drive and verify UEFI mode by checking for the existence of the /sys/firmware/efi directory. If necessary, configure the keyboard layout and console font.
    # List available keymaps
    localectl list-keymaps
    
    # Set preferred keymap (e.g., us)
    loadkeys us
    
    # Change console font (fonts located in /usr/share/kbd/consolefonts/)
    setfont <font_name>
  9. Add a Windows boot entry to GRUB

    If GRUB does not automatically detect Windows (via os-prober), you can add a manual entry. First, install os-prober and try regenerating the config. If that fails, manually add the entry to the custom configuration file using the Windows EFI partition's UUID.
    # Attempt automatic detection
    paru -S os-prober
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    
    # If manual entry is needed, find the EFI partition UUID
    sudo blkid | grep -i efi
    
    # Edit the custom config file
    sudo nano /etc/grub.d/40_custom

    Add this block to the end of /etc/grub.d/40_custom (replace XXXX-XXXX with your UUID):

    menuentry "Windows 10" --class windows {
        insmod part_gpt
        insmod fat
        search --fs-uuid --no-floppy --set=root XXXX-XXXX
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }

    Finally, regenerate the config:

    sudo grub-mkconfig -o /boot/grub/grub.cfg