Easy Guide: Installing FreeBSD 13 and Configuring AMDGPU Navi

Updated on Jun 24,2024

Easy Guide: Installing FreeBSD 13 and Configuring AMDGPU Navi

Table of Contents

  1. Introduction
  2. Installing FreeBSD 13
    1. Hardware Requirements
    2. Creating a Bootable USB Stick
    3. Setting Up the Installation
  3. Configuring Network Settings
    1. IPv4 Setup
    2. DNS Service Configuration
    3. Mirrors and Software Fetching
  4. Disk Partitioning and Installation
    1. Selecting the Disk
    2. Disk Prioritization Scheme
    3. File System Configuration
    4. Finalizing the Installation
  5. Post-Installation Setup
    1. User Creation
    2. System Synchronization and Time Configuration
    3. CPU Frequency Adjustment
    4. System Security Hardening Options
    5. Additional Services Setup
  6. Installing Graphics Drivers
    1. Installing DRM Devel and KMOD
    2. Adding User to Video Group
    3. Configuring Console and GPU
  7. Setting Up Xorg Server and XFCE Environment
    1. Installing Xorg and XFCE
    2. Installing Login Manager (GDM)
    3. Configuring Display Manager
  8. Conclusion

🖥️ Installing FreeBSD 13

FreeBSD 13 is a powerful operating system known for its stability and security. To install FreeBSD 13 on your system, follow the steps below.

Hardware Requirements

Before you begin, ensure that your hardware meets the following requirements:

  • CPU: AMD Ryzen 3950 or equivalent
  • GPU: AMD Navi architecture (RX 5700 XT or equivalent)
  • RAM: 128 GB Kingston (3.6 GHz)
  • Storage: Dedicated Samsung SSD 860 EVO (550 GB)
  • Display: Dual monitor setup

Creating a Bootable USB Stick

The first step is to create a bootable USB stick with the FreeBSD 13 image. This can be done by following the official documentation provided by the FreeBSD project.

Setting Up the Installation

  1. Insert the bootable USB stick into your system and boot from it.
  2. Select the desired hostname and Package options during the installation process.
  3. Configure the network settings, ensuring that IPv4 and DHCP are enabled. If you have a wired connection, IPv6 is not necessary.
  4. Choose the DNS service provider. The default options are Cloudflare as the primary DNS and Google as the secondary DNS.
  5. Select an FTP mirror to fetch the software packages from.
  6. Proceed with the guided root disk setup, using the GPT partition scheme.
  7. Configure swap space and file system encryption based on your preferences.
  8. Verify the installation options and begin the installation process.

🌐 Configuring Network Settings

Once FreeBSD 13 is installed, it's essential to configure your network settings to ensure proper connectivity. Follow the steps below to set up your network.

IPv4 Setup

  1. Open the network configuration file located at /etc/rc.conf using a text editor.
  2. Uncomment the line ipv4_network_interfaces="auto" to enable automatic network configuration for IPv4.
  3. Save the changes and exit the text editor.

DNS Service Configuration

  1. Open the DNS configuration file located at /etc/resolv.conf using a text editor.
  2. Ensure that the file contains the following lines:

    nameserver 1.1.1.1
    nameserver 8.8.8.8

    These are the IP addresses for Cloudflare and Google DNS servers, respectively. Modify them if you prefer different DNS providers.

  3. Save the changes and exit the text editor.

Mirrors and Software Fetching

  1. Open the package management configuration file located at /etc/pkg/FreeBSD.conf using a text editor.
  2. Uncomment the line url: "ftp://ftp.FreeBSD.org/pub/FreeBSD/$Arch/release_1/META.conf" to enable package fetching from the FreeBSD mirror.
  3. Save the changes and exit the text editor.

💽 Disk Partitioning and Installation

To ensure optimal disk usage, it's essential to partition your disk appropriately and install FreeBSD 13 correctly. Follow the steps below for disk partitioning and installation.

Selecting the Disk

  1. To view the available disks, run the command sysctl kern.disks.
  2. Identify the disk you want to use for the installation.
  3. Choose the dedicated SSD, such as /dev/ada0.

Disk Prioritization Scheme

  1. Run the command gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 to prioritize booting from the selected disk.
  2. Set the boot stripe size by running gpart modify -i 1 -s 64k ada0 for improved performance.
  3. Proceed with the disk partitioning options.

File System Configuration

  1. Select the GPT partition scheme and create the necessary partitions for root, swap, and any other required partitions.
  2. Set the appropriate partition sizes and mount points.

Finalizing the Installation

  1. Verify the installation options and confirm the installation.
  2. Allow the system to complete the installation process, which may take a few minutes depending on your configuration and network speed.

⚙️ Post-Installation Setup

After the installation of FreeBSD 13, there are some important post-installation steps to ensure the system is properly configured. Follow the steps below for post-installation setup.

User Creation

  1. Add yourself as a user by running the command adduser.
  2. Enter the required information, such as the username, login group, and additional groups (e.g., wheel for sudo access).
  3. Set the user's password and configure any desired options.

System Synchronization and Time Configuration

  1. Synchronize the system time by running the command ntpd -g.
  2. Enable dynamic CPU frequency adjustment if supported by running the command sysctl hw.pstate.supported=1.

System Security Hardening Options

  1. Configure system security hardening options based on your requirements and preferences.
  2. Refer to the official FreeBSD documentation for detailed instructions on system security hardening.

Additional Services Setup

  1. Install and configure any additional services you require, such as system and network time synchronization.
  2. Enable and configure the necessary services by modifying the respective configuration files.

🎮 Installing Graphics Drivers

To fully utilize the power of your GPU, it's recommended to install the graphics drivers for FreeBSD 13. Follow the steps below to install the necessary drivers.

Installing DRM Devel and KMOD

  1. Run the command pkg install drm-devel kmod to install the DRM development and kernel modules.
  2. Ensure that your user is in the video group using the command pw group mod video -m <username>.

Configuring Console and GPU

  1. Run the command kld_list="/boot/modules/i915kms.ko ndisgen_if" >> /etc/rc.conf to configure the console and GPU settings.
  2. Disable the console by adding hw.vga.textmode=1 to the /boot/loader.conf file.

🌄 Setting Up Xorg Server and XFCE Environment

To have a graphical user interface on FreeBSD 13, you need to set up the Xorg server and the XFCE environment. Follow the steps below for setting up Xorg and XFCE.

Installing Xorg and XFCE

  1. Run the command pkg install xorg xfce to install Xorg and the XFCE desktop environment.
  2. Select any additional packages that may be required during the installation process.

Installing Login Manager (GDM)

  1. Install the GNOME Display Manager (GDM), which serves as the login manager, by running pkg install gdm.
  2. Enable the GDM service by running sysrc gdm_enable="YES".

Configuring Display Manager

  1. Open the GDM configuration file located at /usr/local/etc/gdm/custom.conf using a text editor.
  2. Uncomment the line WaylandEnable=false to disable the Wayland display server.
  3. Save the changes and exit the text editor.

📝 Conclusion

By following the steps outlined in this guide, you should now have a fully functional FreeBSD 13 installation with Xorg and XFCE environment configured. Enjoy the power, stability, and security of FreeBSD on your system!

Resources:

Most people like