Freedom of Choice


FreeBSD vs Gentoo

Have you ever installed Gentoo Linux? If you ever did, then you know how much pain you pass through just to have your Linux box ready to serve your needs.

Gentoo installation is a learning process and the worst of it, is when you need to update, which needs to be something like once per week. If you take longer, you will find some USE=“flags” problems in the process, while many other problems can happen before you even boot it from the first time. I encourage you to try, mainly if you are a big FAN of memory usage performance and CPU performance too. Compilation time is your best friend, and hopefully you know to leave the computer away for some time, when compiling software. For exemple, to compile GCC that may take several hours. Anyway, when you boot your Gentoo for the first time, in case you already compile the kernel from the source, which you specify which hardware you have and which software compability you wish to have, the software you install, will be at its best, for your machine characteristics. In the other hand, in the last years, Gentoo implement Binary packages, to save your Time. While Time is saved, you cannot change the default configuration of the package you install, because was made to have all features, not only those you need.

By default in FreeBSD, you may wish to use ZFS partition shema. It will take some memory from you, but if memory is not a problem, continue with ZFS. If Memory is a problem, please choose UFS.

With FreeBSD, installation is super easy and no problems will come for installing it in your machine (mostly). After that super-fast installation, you can think you are using Gentoo. FreeBSD ports have everything you need to start. Use the whereis command, to find the programs you wish to install and go into that directory, and install them all, using the make command. But wait, before installing anything you should compile the kernel. The kernel you are using is generic and what you need is only the code that make your hardware work. All other hardware devices that you don’t have or use, can be removed, which will results in a faster kernel. You can start with GCC if you wish, to remember how much time it takes in Gentoo, while FreeBSD will ask you so many questions in the process of installing one single software, that you can quit from installing it from the source. Even if you can use pkg package to install the binary versions, you can escape that annoying problem with make BATCH=yes install clean, but keep in mind that some packages have non-desired features included, so you may wish to investigate the Makefile of each package you wish to install, to be sure that you will not install, what you don’t need. For example Vim will install the X server. In my perspective this is completly insane, but what can I do against it?

Offend FreeBSD developers :)

So remove the gtk2, gtk3, motif and x11 from Makefile. This is about the /usr/ports/editors/vim package, but others can have different packages that you don’t need. For example samba or smb, which is to manage Window$ filesystems, telnet which is a non-secure communication, while can be useful, you can try the secure approach, using ssh. To simplify the problem of editing the Makefile, use the command make config. As another popular example you may wish to install in case you are building a server is Apache2. You may wish to remove all the CGI modules to be sure that have no known vulnerabilities.

Another awesome feature is that, some packages can be Flagged as Vulnerable, mainly when you are trying to compile them from the source. If this happen, compilation will break / stop and some message will be described to “jump off” the problem, which is by adding the option: make DISABLE_VULNERABILITIES=yes install clean to continue. I am not sure about the sensation I have when compiling from source, but I think the compilation time is less than Gentoo, while I need to tell you the true: The Truth is, I start compilation and leave computer for some time. The Bike and the Road are always good friends to forget Time.

In case you wish to install something that have deeper dependencies, you may wish to use the command make config-recursive, to select the compatibilities of all dependencies, before compiling them. If you think this ncurses-popups are annoying, try to make install clean without any extra option, and you will see the hugly side of FreeBSD ports. To enable services that you install at boot time, like the ssh-server, you need to add it to the /etc/rc.conf file. For example: apache24_enable=“YES” or dbus_enable="NO", ssh_enable="YES", etc.

So, the lesson of using FreeBSD is to use this last tips before installing each package from /usr/ports/. And always clean. If you like to explore more, please check the Jail system and the PF Firewall. If you wish to build a Desktop, I should remember you that the list of packages to install is Big. This article is like a motivation to learn more about FreeBSD freedom. I don’t really care about the licenses, but the usability that gives an opportunity of it’s experience. Nothing more.

I don’t know why, but Gentoo Portage refers to FreeBSD/ports and to Arch/ports. The older is the original, which is Free to make fun of it.