I’m glad you decided to Install FreeBSD. Many people are using a form of FreeBSD today with absolutely no knowledge of it. FreeBSD is incorporated into several appliances today. Routers, Firewalls, and Computers use the Operating System. If you use a Macintosh, you are using FreeBSD. If you use Juniper Network switches or routers, you are using FreeBSD.
I will be installing FreeBSD on a Windows 2012 R2 Hyper-V Host. I will be providing an explanation and screenshots of the progress for you to follow along and do this yourself. If you are using a hypervisor other than Hyper-V such as vmware, the concepts are similar the interface is different at the beginning. I am not recommending Hyper-V over vmware or vice versa. I use both and each have there pro’s and con’s.
Step 1 – Creating the VM Guest (Hyper-V):
If you have more than one Hyper-V Server, you will want to select the server you wish to install FreeBSD on. For this exercise, I will be selecting HYPER-V01.
We need to give this Guest VM a name. For this exercise, I’m naming the VM FreeBSD. You can name your VM whatever you like.
Specify Generation: we will be select Generation 1 for this exercise. as shown below
Assign Memory: I’m choosing 1024MB for this exercise
Configure Networking: Most users will have a single option. For this exercise we are assuming that. Please select your network card and continue.
Connect Virtual Hard Disk: For this exercise, I’m just going with the defaults. If you do not have 127GB of space, you can easily lower that down to something like 20GB.
Installation Options: Here I’m gong to click on the Install an operating system from a bootable CD/DVD-ROM radio button, then select the Image file (.iso) radio button. I will then navigate through the filesystem to the location of the FreeBSD ISO image and select it as illustrated below.
Summary: Click finish as we have completed the steps to configure the Guest VM. We will move to Step 2
Step 2 – Installing FreeBSD (Hyper-V):
We have just completed the first step in setting up FreeBSD on Hyper-V. Now we need to turn the VM. You can achieve this many ways. For this exercise, right click on the FreeBSD VM, and select Connect. The following screen will appear as shown below. You will want to click on the green power button to start the VM.
After powering on, you will see the following screen. Just press enter and continue.
After pressing enter we finally get to see FreeBSD Installation Boot Screen! Woot Woot…
You can simply wait for the timer to countdown to zero or press enter to start the installation process. This will flash a lot of text over the screen. Don’t worry, this is just FreeBSD starting up. We will then get to the screen below which is the FreeBSD Installer. We will want to press enter to Install FreeBSD
Keymap Selection: We just accept the defaults for this exercise.
Set Hostname: This is where we name the machine, I will be calling my machine FreeBSD. You can name your machine whatever you like here, then press enter.
Distribution Select: Here you select the optional system components you wish to install. I am suggesting you select doc, lib32, ports, and src, then press enter to continue.
Partitioning: For this exercise, lets use Auto (UFS). This will install the FreeBSD (UFS) File System. Select Auto (UFS) then press enter.
Partition: We will select Entire Disk for this exercise and press enter.
Partition Scheme: For this exercise, we are selecting GPT and moving onward.
Partition Editor: The editor will show the base configuration, just press enter to continue onward
Install Time: Press enter on commit and watch FreeBSD begin the installation process. As you can see the process is very quick and takes just over 1 minute to complete.
Enter Password: type in a password below and I would recommend using something other than password or 123. For me, I will use $smf$sea$7700! After typing in the password, FreeBSD will ask you to retype the password to confirm as illustrated below.
Network Configuration: Next we need to move forward with configuring the network. Since we only configured one virtual nic card when building the guest vm, we should only have one available to select. Go ahead and press enter to continue.
You are now presented with an option to configure IPV4 on this interface. Please select yes and continue
You will be asked if you would like to use DHCP to configure this interface, It has been my experience that we statically assign server IP addresses, so in this exercise, we will select no and continue.
Selecting no will bring up another screen asking you to enter in the IP Address, Subnet Mask, and Default Router address. Please do not copy what you see below unless this matches the network or lab network you are connected to for this exercise. I have entered in my IP address I will be assigning to this machine and then press enter to continue. Note: use the arrow keys to navigate through the three fields.
FreeBSD will ask you if you would like to install IPv6 for this interface. For this exercise, select no and continue.
FreeBSD will ask you for the domain it should search when doing certain tasks such as ping. For example, if you were to ping mail and press enter, FreeBSD will search for mail and mail.labdomain.lab. If the DNS server has a record in there for mail.labdomain.lab, then ping would be give the ip address and the ping would reply if the machine was online and allowing ping requests. If you leave the search blank and ping just mail, the ping would fail. You would be required to type in the entire fqdn to ping mail. For DNS, you can enter your internal DNS servers or many times people pick the old Verizon 220.127.116.11 or google 18.104.22.168. Its up to you on what you want to put here. Press enter once completed.
Time Zone Selector: Select the option for your time zone. I will select option 2, then option 49, then option 21 for United States Pacific Time Zone. My final screen after navigating through would look and prompt me as seen below.
Time & Date: These two options are new to FreeBSD 11. You can just skip through the two screens and continue.
System Configuration: Here we choose the services you would like to start automatically at boot time. I recommend sshd, ntpd, and dumpdev.
System Hardening: To make your system more secure, you can enable some of the options below. Since this is just a lab exercise, we will go ahead and skip this for now. Press enter to continue.
Add User Accounts: Were in the final stretch. Select yes to add a user account now and press enter to continue.
FreeBSD will then provide some prompts for you to fill out. Please pick a username, enter the full name of the user, leave the other options default, and then you will be prompted for a password. Enter a password, confirm the password as seen below then continue.
FreeBSD will then ask you to confirm the user. Type in yes and press enter. FreeBSD will then ask you if you would like to add another user, type in no and press enter.
Final Configuration: Here is the remaining few screens you will see before we are ready to boot into your clean FreeBSD Server. I normally scroll down and select Handbook but since this is a test lab, I will skip that. Go ahead and select Exit and press enter.
Manual Configuration: This screen gives you two options. if you select Yes, you will be sent to a shell and allowed to make command line actions, If you select No, the system will complete the installation, reboot, and start running your new FreeBSD Server.
Complete: Reboot Time! NOTE: Depending on your boot order, the FreeBSD ISO may start up again and start taking you through the Install Process. If this happens, just turn the VM off, disconnect the ISO, then start the VM up again.
Congratulations! If you followed this tutorial, you have successfully installed FreeBSD 11. There are a few other steps I would take just before we call it good. First we should update FreeBSD using “FreeBSD-Update”. This is similar to Windows Update for Microsoft, zypper update for OpenSUSE, or yum update for CentOS. In a nutshell, it allows you to make sure your FreeBSD Operating System is up to date. I will illustrate below how to achieve this.
So lets begin with signing in as the root user. Once you are signed in as root, you will type at command prompt the following command “freebsd-update fetch” without the ” on each end then press enter.
FreeBSD will download the latest updates from the FreeBSD update servers. Once this is complete, we will need to install the updates. At command prompt, type in “freebsd-update install” without the ” on each end then press enter. FreeBSD will then install the updates.
You have now successfully installed and updated a FreeBSD 11 Server. I want to thank you for allowing me to share this cool operating system. Now its time to dig in and learn more about FreeBSD. Please feel free to share this on social media, email, link to it, etc. If you have any feedback, I thank you in advance for taking the time to share your thoughts.
Wishing You Success!
William J. Nelson