2025-06-22 16:19:00
vermaden.wordpress.com
FreeBSD project started to officially add kernel modules pkg(8) repositories to default installation β starting with FreeBSD 14.3-RELEASE version.
To understand why they were brought to light of day its first needed to understand the problem they are here to solve.
This problem does not exists with x.0 FreeBSD releases β they have all their packages built against proper FreeBSD x.0 version. The problem arises when x.1 release is made, or x.2 β¦ or any OTHER then x.0 to be precise β¦ but why?
The main problem is that pkg(8) packages are built against the currently supported oldest FreeBSD version in the tree. For example when 14.3-RELEASE is announced β the packages for 14.x tree are still built on 14.2-RELEASE for next 3 months since 14.3-RELEASE availability.
This usually does not break any βuserspaceβ applications but kernel modules related packages often are broken and cause kernel panics even on module load β and there are about 70 of them. While FreeBSD team fights really hard to keep ABI and kernel interfaces stable across βpointβ releases β its sometimes not possible due to the nature of Linux DRM graphics drivers being imported and improved to support more modern GPUs on FreeBSD.
The problem mostly arises in the desktop/laptop area of FreeBSD UNIX usage β as with broken ABI the drm-kmod related kernel modules just panic and reboot each such system instantly β¦ and this problem persists for whole 3 months within which the older release is still in support. After these 3 painful months β and after older βpointβ release is out of support β the pkg(8) packages are finally started to built against PROPER latest FreeBSD version β and problem disappears β¦ up to nest βpointβ release and painful 3 months.
The damage of this policy can be limited with ZFS Boot Environments using tools like beadm(8) or bectl(8) but its just workaround solution.
I have spoken about that problem for years β trying to make FreeBSD project do something about it β for example as there are TWO independent pkg(8) branches of packages β the default quarterly and optional latest one β I suggested to switch latest to the LATEST FreeBSD version since day 1 of release and keep quarterly as the βlegacyβ version packages branch β¦ but that proposal did not saw any appreciation.
After many years something different was introduced β additional separate kernel modules related pkg(8) repositories β both for quarterly and latest branches.
Initially they were unofficial and official at the same time. Official for those who follow the FreeBSD project and daily use the Mailing Lists β CFT: Repository for Kernel Modules β and unofficial for all the others β no mention in the Release Notes β no mention in the Errata for a FreeBSD release.
In the middle of the FreeBSD 14.3-RELEASE process the situation become more clear as the additional pkg(8) repositories became official in the FreeBSD 14.3-RC1 Now Available announcement β described as:
Β Β o The default pkg.conf file now includes the FreeBSD-kmods repository.
Finally.
One may ask β why FreeBSD project will not just use the most easy way and build separate set of packages for each release β the answer is simple and brutal β lack of resources β while FreeBSD remains one of the few really free and freedom powered systems β it comes at a price β you do not often get all the toys for free for playing the βfreedomβ game.
Initially I was skeptical about the repositories β but I started to upgrade one of my systems within ZFS Boot Environment β¦ and I was surprised that freebsd-update(8) asks to modify /etc/pkg/FreeBSD.conf file with additional FreeBSD-kmods repository β¦ finally some good fucking news π
I upgraded and rebooted the FreeBSD system up to the latest and greatest 14.3-RELEASE official version β and everything worked as it should. As I prefer to have more recent version of packages with latest branch of pkg(8) packages β I also switched to kmods_latest_${VERSION_MINOR} for the kernel related packages. For convenience (if needed) I have left the quarterly branch commented out.
My /etc/pkg/FreeBSD.conf file looks like that right now.
FreeBSD % cat /etc/pkg/FreeBSD.conf FreeBSD: { # url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly", url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes } FreeBSD-kmods: { # url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_quarterly_${VERSION_MINOR}", url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes } FreeBSD % pkg repos FreeBSD: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" } FreeBSD-kmods: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_latest_3", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" }
There are now two βsameβ β¦ or should I say βsimilarβ packages that come from additional kernel repository. Take a look for example for the drm-61-kmod package.
FreeBSD % pkg search drm-61-kmod drm-61-kmod-6.1.128.1402000_5 DRM drivers modules nvidia-drm-61-kmod-570.153.02.1402000_2 NVIDIA DRM Kernel Module drm-61-kmod-6.1.128.1403000_4 DRM drivers modules
I remember that when these additional repositories were introduced β for example β the VirtualBox kernel modules were not available β not a case now β everything is covered.
FreeBSD % pkg search virtualbox-ose-kmod virtualbox-ose-kmod-6.1.50.1402000_1 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-70-7.0.26.1402000 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-71-7.1.10.1402000 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-legacy-5.2.44.1402000_7 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-6.1.50.1403000_1 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-70-7.0.26.1403000 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-71-7.1.8.1403000 VirtualBox kernel module for FreeBSD virtualbox-ose-kmod-legacy-5.2.44.1403000_7 VirtualBox kernel module for FreeBSD
Take a look at the package suffix β its 1402000 for the 14.2-RELEASE from the βdefaultβ repository and 1403000 for the 14.3-RELEASE from the kernel repo β and that is treated as pkg(8) as higher version the the βdefaultβ one.
I have tested these repos in both Intel and AMD based GPU systems β and they work properly on all of them.
Feel free to share your thoughts on the topic.
EOF
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcraticβs Future – Scan To Support
If Techcraticβs content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether itβs for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. Iβm deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.