FreeBSD

Introduction

I had been using PC-BSD to stay somewhat familiar with BSDs.  They are now no more. So off to FreeBSD land I go. :-)

FreeBSD is pretty straightforward for the tech-savvy.  I'd even go as far as to say easier than Arch.  As of my last installation in November of 2024, most everything works "out of the box".  Check out their hardware support pages, especially wireless cards, first and you shouldn't have problems.  Oh, I do keep this wireless dongle around; I should probably test out a newer one.

All my notes below are from doing things by hand ages ago.  They might be helpful, but be careful nothing is out of date.  After the base install, I now use this script {need to move it to publicly shared github.com} I've been working on.  Yes, it's been modded from a few other folk's work; see the contents for credit

Quick Reference

Installation Notes

FreeBSD expects you to do a lot on your own.  They do a good job of coaching folks through the base installation in their Handbook (lots better than Arch).  One will probably want to do some research for things they do not understand.  For instance, I initially choose the "sh" shell, but changed it to "csh" because it is used by root and (I think) the more common shell on FreeBSD.  I'd also do research for supported hardware and save yourself some headache ahead of time.

Another thing I want to stress is reading the information after each install.  Those comments are not in the FreeBSD book and often not on other websites (e.g. https://www.freshports.org/, https://wiki.freebsd.org/).   There is often important information.

For those continuing below, follow the links, there is additional information beyond just running the command.

Not Yet Everything

After the base install, you have a very minimal system; with only a command line interface.  You can set things up manually, or use the script {need to move it to publicly shared github.com} I mentioned above.  

Be careful what is run as root; many commands are, but not the .xsession. Also, don't reboot until the end. This all assumes a working NIC.

Below are your (as of 4/19/2020) options for xfce4-session.  The first is generic rules:

polkit.addRule(function(action, subject) {

  if ((action.id == "org.freedesktop.consolekit.system.restart" || 

      action.id == "org.freedesktop.consolekit.system.stop") 

      && subject.isInGroup("operator")) {

    return polkit.Result.YES;

  }

});

and for those who have working suspend/resume add in addition to the above:

polkit.addRule(function(action, subject) {

  if (action.id == "org.freedesktop.consolekit.system.suspend" || 

      && subject.isInGroup("operator")) {

    return polkit.Result.YES;

  }

});

Troubleshooting

Stuff doesn't always go as planned.  I've done this on a few laptops, and found some of the below useful:

NVIDIA Drivers

Depending on what your "regular" use is, FreeBSD might be fine without NVIDIA drivers.  I've seriously considered that on an old laptop that has an old GeForce G72M; which is listed as "Quadro NVS 110M/GeForce Go 7300" via the pciconf -lv command.  And I've scoured posts, but I could never get any driver to load.  But I have accumulated a bit of information.  That is all below.

First, how do you clean up packages?

In /usr/ports/, there are a few packages; there are no pkg because of licensing issues.  Some folks have said to go to NVIDIA's website to see what driver they suggest.  Two observations.  First, that page doesn't list FreeBSD.  Second, if I choose Linux, look at number and "round down" to version supported for FreeBSD, that driver doesn't always work.  It's a good place to start, but you may need to keep downgrading or adjust options.

The places of configuration are below.  The first is the one that enables the use of the driver.  Remove/move the file to disable using it.  Also, the path is mixed up in some tutorials; it is correct in that it has(?) worked for me.

Section "Device"

        Identifier "NVIDIA Card"

        VendorName "NVIDIA Corporation"

        BusID "PCI:1:0:0"

        Driver "nvidia"

EndSection

If the NVIDIA driver for your card is still not working, there is a lot of other information around.  But I honestly gave up.  I'm not that reliant on the laptop nor FreeBSD.  I can say I got a lot of information on BSD's configuration files.  :-)