To be BSD or not to be, that is the question

I have been a Linux user for many years. I have come a long way to learn that it is essentially an understatement when one states the fact that the Linux movement has brought us many things that many of us take for granted and many do not even notice that they are there. The expansion of the modern day interconnected world would not have been possible on any level if it were not for the works, many human hours, and the dedication of the open source community and institutions like GNU. The very webserver (either NginX or Apache) that has brought you this article (HTML + probably PHP + JavaScript and more) you are casually reading right now on a browser (essentially a huge stack of open source tiny projects) would certainly have not been freely available to you without the concepts of Linux and Open source movements like GNU. Linux and GNU have directly or indirectly without us, even noticing, have shaped our world into a better future version of the past AKA today. For that, institutes like GNU and Linux deserve a lot of respect.

However, Linux is not the only open source code or operating system that there is. Before Linux was born, BSD was one of the operating systems that prevailed the world of the operating systems. Although no code or system is forever secure, OpenBSD and FreeBSD code base has one of the highest quality of code review and security standards. The team that presides and reviews the security of OpenBSD in a way paves the way and sets the standards for how other projects should handle security for open source projects. That is why OpenBSD in particular and BSD family of operating systems in general have always been regarded and are mentioned as the most secure operating systems humanity has ever been able to produce.

I am personally a beginner at this and I am going to ‘learn’ on how to install FreeBSD on a virtual machine and as I am going ahead with this I am going to write this article hoping that it will help others how they can install FreeBSD as well to get into the world of BSD. FreeBSD is always suggested for desktop and OpenBSD is geared mostly towards the servers, but that does not mean OpenBSD cannot make a good desktop.

So, to start we have to go to FreeBSD website “https://www.freebsd.org/” and click on the obvious “Download FreeBSD” button

In the next page “https://www.freebsd.org/where.html” you are given a very well awesomely documented introduction about which version of installation media you should choose and download, like CD, DVD, virtualization preinstalled virtual disk images, the 64-bit installer (if your CPU supports it) or the 32-bit installer, some other architects rather than X86 among so many other things that your situation might need it. Some might need a virtualization media to get things done much quicker no need to handle the installation, I could have used that method too, but since this is supposed to be educational for me, I chose to download the X64 installation DVD to install it on a Virtual machine obviously (I am only a beginner who is learning BSD).

Again I should remind you, that you might need to pick a different installer disk image or just pick a virtual machine image, instead of what is pointed out in the above picture.

After picking you flavor you would most likely be redirected to a webpage that looks similar to what you see above. In this page, you have to pay attention to two very important sections:

  1. The checksums
  2. The disk image

The checksums are one of the methods you can verify that the image you have downloaded is not tampered with or corrupted during download or some other way. Additionally you can use PGP signed checksums to make extra sure that your installation files are not tampered with because FreeBSD developers have also so kindly provided you with that data as well. However, if this is only for educational purposes, like it is for me, I think hash sums would be enough. But if you are in a very sensitive environment you have to use PGP signed checksums and also check with a third party for an extra verification step so they also can verify the security and health of the ISO files or downloaded material.

To calculate the hash sums of the downloaded files in most Linux based distros you can use:

$ sha256sum FreeBSD-12.1-RELEASE-amd64-dvd1.iso
$ sha512sum FreeBSD-12.1-RELEASE-amd64-dvd1.iso

And for windows you can simply install a tiny little tool called hashtab (“http://implbits.com/products/hashtab/”) and use that to check the hash sums, or you can use PowerShell (the following commands would not work in windows command prompt; only in PowerShell) as such:

PS >_ Get-FileHash -algorithm sha256 E:\FreeBSD-12.1-RELEASE-amd64-dvd1.iso
PS >_ Get-FileHash -algorithm sha512 E:\FreeBSD-12.1-RELEASE-amd64-dvd1.iso

After the image is downloaded, it is time to boot from it either using a DVD or a bootable USB stick (if using a virtual environment you have to configure a virtual machine properly and according to your needs for a BSD installation).

I should remind you that I am using a virtualization environment for this.

After the system boots from the installation disk here is what you see.

In this screen simply pressing enter will get you to the next screen:

Here you have 3 options, you can either install the OS, go into shell, or use the system as a Live disk in rescue scenarios or to just try the OS.

We choose <Install>

In this screen you can either search for your desired keymap, or you can with the default US English keymap.

In this screen you have to choose a host name for your system. Usually this is what you would need to set relative to your network setting in cases you need remote access to this installation or to host a service. Here we just pick a random name.

In this screen you can choose which optional system components you are going to install. Usually, the default selection would get you going. In here I have however selected to install base-dbg which is collection of some base tools which I feel like I need to try. I have also added the option of ‘ports’ which is needed if you want to ‘port’ or install some other software for other operating systems. It just opens up more options, for a pure BSD install this option should be avoided. Also you need to be careful of available disk space because this option doesn’t automatically check for available disk space. The options of ‘src’ and ‘tests’ are needed in case you want to compile and install some drivers.

In case you are trying to multiboot, or if your disk is already partitioned before you need to choose the manual option, but if like me your disk is totally empty and is going to be dedicated to BSD only you can simply try an auto option. The ZFS file system provided more options, and that is what I am trying to work with so you can simply choose that. UFS is very stable but some features need to be manually configured, ZFS is also stable, but is mostly suitable for desktop environments.

In this screen you can change the settings of hard disk and the partition, you can choose to encrypt the disk, the swap, these can be tried later.

You can simply go ahead with the default selection or ‘stripe’. What is really nice about BSD is that it makes it totally easy to protect against disk failures and takes huge care of your data by making copies using mirroring and redundancy. In situations where data sensitivity is very high, this option can be used. We choose to go ahead with the default option, but you can certainly play around with the options to learn more about this amazing data protection feature.

Here choose the default disk by hitting the space bar and then hit return or enter key.

In real world production scenarios this is a real warning, but in here I am using virtualization, so I just choose yes and continue.

The boring and occasionally stressful part of any operating system installation, unless there are errors, which can make things frustrating. So hold your breath and wait for the installation to finish successfully. This may take a while so do not really hold your breath.

After the installation is complete, you have a chance to set the password for root.

And select the network. And will be asked about configuring the ipv4 and ipv6 configurations.

In this screen, you can set the time zone according to your geographical region.

After setting the time you will be given a chance to pick the services that should be started with root. I personally have also picked ‘moused’, ‘ntpdate’, and ‘powerd’.

This is another amazing security feature of FreeBSD, really useful in production environments, but in this case since I am trying the system out for the very first time, I have decided to not enable any system hardening settings.

In here you can add other users. It is highly important to not run a production server as root and instead other users with limited rights and controls added to the system. Using this option you can simply add users to the system. But since I am only going to try out the system I have decided to not add more users.

In the final stage you are given an opportunity to change the system settings and also install the handbook as well. Which is a very nice feature and some operating system installers miss this final important step to check everything one last time. Obviously things can always be changed I the future using root, but still it is nice to change the settings during setup. Here I have decided to exit the setup.

Again after the installation is done and the installation disk is removed from the system, you are presented with the boot screen where you can choose how you want to boot into your system.

After you boot the system here is what you get:

Although your current installation might not have a GUI or look like a candy shop, but it is as every bit as powerful as any other operating system you can find out there. This actually shows much respect from the BSD development team towards the end user and letting them decide what they want to install and how they want to expand their operating system.

As the next step, you can try installing a desktop environment to have more convenience and to make your OS look more like any other operating system out there you, which we will be covering in the following articles, hopefully.

It might be interesting to know that because of this relatively bare minimum in the BSD operating system and much care and exactness that goes into making the final code secure giant companies who advertise themselves as caring about user privacy and data protection, like Apple, and Sony use BSD distributions.

Cheers and congratulations on your new BSD installation!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.