Hello!
Few months ago, I installed FreeBSD 14.0 on Raspberry Pi4 to run Samba server on it. It went really well - you can read my report here: https://liborator.me/articles/samba-vnet.html - and motivated me to try installing FreeBSD as my primary desktop.
This post summarizes my journey and all the pitfalls I encountered until I was successful.
Relevant gear purchased:
Base system installation
Installation of the base system from USB stick went smoothly, I opted for a GELI-encrypted ZFS 1+1 mirrored setup. Kudos to the FreeBSD team for the installer, it is really intuitive!
Problems 1&2: Missing Realtek NIC drivers and inability to bootstrap pkg
After installation, I wanted to run the pkg initial setup:
but I encountered an error message about nonexistent internet connectivity. After searching these forums, I stumbled upon a link to a blog post with a similar problem - Realtek NIC drivers are not provided out of the box.
Thus, I was in the chicken-and-egg conundrum - pkg needs internet access to bootstrap itself and installation of NIC driver requires pkg...
Fortunately, installation USB stick comes with a host of packages for offline installation. Among them is pkg, therefore, I was able to bootstrap pkg via the following:
Then, on another computer, I downloaded the latest Realtek driver:
put it on a USB stick, mounted it and installed it:
and put the following in /boot/loader.conf :
(Please take care, even though the strategy outlined in the blog post above works, link for downloading the kernel module is wrong. The one I posted here works.)
I rebooted the machine and was able to update pkg, set up ntpd, install packages and so on...
Problem 3: Intel UHD 770 Graphics not yet supported
The last step to consider my setup reasonably complete was installing XFCE desktop environment. I was following the excellent guide in the handbook. However, after doing all steps outlined in the handbook and rebooting, computer was always crashing when loading the 'i915kms' kernel module, so I was only able to boot in the Recovery mode.
After 2 full system reinstalls and on the verge of rage-quitting and just installing Debian 12 (nothing against it though, it still is my daily driver on a laptop), I found out that the graphics card is only available via pkg in FreeBSD 15, on older versions I need to compile myself - drm-61-kmod - FreshPorts
Therefore, I installed my system with ports included, and as hinted in the FreshPorts link, did the
Following this, I repeated the installation instructions from the handbook - https://docs.freebsd.org/en/books/handbook/x11/#x-configuration-intel - and installed XFCE - https://docs.freebsd.org/en/books/handbook/desktop/#xfce-environment and was able to boot successfully to a desktop environment!
(As an aside, I know that handbook strongly discourages mixing installation of packages via pkg and compiling them from ports, but I frankly did not find any other way how to solve my problem.)
Closing thoughts
I hope my report was reasonably clear and helps other people overcome their potential struggles with installation. As I mentioned earlier, there were times I was reevaluating my decisions to install FreeBSD in favour of Linux, but I endured, learnt a ton and ultimately, I am very satisfied with the system and can't wait to learn more about it.
In hindsight, I should have done a bit more research about supported hardware. I had anticipated bleeding edge hardware would not be supported, so I opted for mid-level, not the latest generation gear, but I was still bitten by it.
Audentes Fortuna iuvat.
Libor
Few months ago, I installed FreeBSD 14.0 on Raspberry Pi4 to run Samba server on it. It went really well - you can read my report here: https://liborator.me/articles/samba-vnet.html - and motivated me to try installing FreeBSD as my primary desktop.
This post summarizes my journey and all the pitfalls I encountered until I was successful.
Relevant gear purchased:
- processor: intel i5-12500 (with an integrated graphics card, intel UHD 770 graphics) - spec.
- motherboard: Gigabyte B6760 DS3H DDR4 (Realtek 2.5GbE NIC) - spec.
Base system installation
Installation of the base system from USB stick went smoothly, I opted for a GELI-encrypted ZFS 1+1 mirrored setup. Kudos to the FreeBSD team for the installer, it is really intuitive!
Problems 1&2: Missing Realtek NIC drivers and inability to bootstrap pkg
After installation, I wanted to run the pkg initial setup:
pkg update
but I encountered an error message about nonexistent internet connectivity. After searching these forums, I stumbled upon a link to a blog post with a similar problem - Realtek NIC drivers are not provided out of the box.
Thus, I was in the chicken-and-egg conundrum - pkg needs internet access to bootstrap itself and installation of NIC driver requires pkg...
Fortunately, installation USB stick comes with a host of packages for offline installation. Among them is pkg, therefore, I was able to bootstrap pkg via the following:
mkdir -p /media/install-usb
# name of your USB stick may differ
mount -t cd9660 /dev/da0p1 /media/install-usb
pkg add /media/install-usb/packages/FreeBSD:14:amd64/All/pkg-1.21.2.pkg
umount /media/install-usb
Then, on another computer, I downloaded the latest Realtek driver:
PKG=realtek-re-kmod-1100.00.pkg; curl https://pkg.freebsd.org/FreeBSD:14:amd64/latest/All/$PKG --output $PKG; unset PKG
put it on a USB stick, mounted it and installed it:
SIGNATURE_TYPE=none pkg add /media/.../realtek-re-kmod-1100.00.pkg
and put the following in /boot/loader.conf :
if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"
(Please take care, even though the strategy outlined in the blog post above works, link for downloading the kernel module is wrong. The one I posted here works.)
I rebooted the machine and was able to update pkg, set up ntpd, install packages and so on...
Problem 3: Intel UHD 770 Graphics not yet supported
The last step to consider my setup reasonably complete was installing XFCE desktop environment. I was following the excellent guide in the handbook. However, after doing all steps outlined in the handbook and rebooting, computer was always crashing when loading the 'i915kms' kernel module, so I was only able to boot in the Recovery mode.
After 2 full system reinstalls and on the verge of rage-quitting and just installing Debian 12 (nothing against it though, it still is my daily driver on a laptop), I found out that the graphics card is only available via pkg in FreeBSD 15, on older versions I need to compile myself - drm-61-kmod - FreshPorts
Therefore, I installed my system with ports included, and as hinted in the FreshPorts link, did the
cd /usr/ports/graphics/drm-61-kmod/ && make install clean
Following this, I repeated the installation instructions from the handbook - https://docs.freebsd.org/en/books/handbook/x11/#x-configuration-intel - and installed XFCE - https://docs.freebsd.org/en/books/handbook/desktop/#xfce-environment and was able to boot successfully to a desktop environment!
(As an aside, I know that handbook strongly discourages mixing installation of packages via pkg and compiling them from ports, but I frankly did not find any other way how to solve my problem.)
Closing thoughts
I hope my report was reasonably clear and helps other people overcome their potential struggles with installation. As I mentioned earlier, there were times I was reevaluating my decisions to install FreeBSD in favour of Linux, but I endured, learnt a ton and ultimately, I am very satisfied with the system and can't wait to learn more about it.
In hindsight, I should have done a bit more research about supported hardware. I had anticipated bleeding edge hardware would not be supported, so I opted for mid-level, not the latest generation gear, but I was still bitten by it.
Audentes Fortuna iuvat.
Libor