or, Gentoo without the headache


I ran gentoo as my daily driver for nearly three years. I'm a real Linux user in the sense that I did daily what most Linux distro consumerists are incapable of. My gentoo desktop spend quite some time powered off and disconnected from the internet. Enough time that I had entered dependency hell with no clear escape route. I have traveled through the valley of dependency hell many times before and have never died. But this time, I couldn't be bothered. I've been meaning to migrate away from Linux for a long time. Something something systemd scope creep, rust in the kernel, live free or die, etc.

Installation time

FreeBSD is easy to install. If you're reading this, you know what you're doing. This is just my blog post. Make sure to install the src and ports sets for easy updates. src will be updated when you run freebsd-update. Ports will be managed through portsnap but having them available on firstboot never hurts.

Building the system from source

FreeBSD's entire base system is contained in /usr/src. This makes it very easy to build (and update) the entire system in oneshot.

# fetch updates, requires a reboot 
$ freebsd-update fetch && freebsd-update install

# build new kernel and userland
$ cd /usr/src 
$ mk buildworld && make installworld
$ reboot

Package management

The ports collection makes it easy to install all packages from source. Using portmaster makes it even easier. Using portmaster it is possible to build programs from source and install them as a package.

There is one caveat though, don't mix packages and ports

# get ports
$ portsnap auto

# install portmaster
$ cd /usr/ports/ports-mgmt/portmaster
$ make && make install

# rebuild portmaster with portmaster
$ cd /usr/src
$ rehash
$ portmaster ports-mgmt/portmaster

portmaster supports flavors too. Example: vim and vim-tiny. Another: git, git-lite, and git-tiny.

# install a port
$ portmaster devel/git

# choose a flavor
$ portmaster devel/git@tiny

portmaster can also be used to udpate all installed ports. The process looks something like this:

# update ports tree
$ portsnap auto

# read changes or shoot foot here
$ less /usr/ports/UPDATING

# resolve issues here

# if no issues, rebuild portmaster
$ portmaster ports-mgmt/portmaster

# rebuild everything
$ portmaster -a


It really is that simple, or at least more simple than gentoo. There is some performance advantage to compiling all of your programs from source, especially on older or obscure hardware. Overall, I think I'll stick with FreeBSD. All the advantages of a source based Linux distribution without all the headache.