Updated: June 15, 2022
A brief video walk-through version of this guide can be found HERE.
1. Identifying Your Computer:
Determine if your computer has a 32-bit or 64-bit processor. Finding this information will depend on your operating system, so go to the relevant section below:
Start by opening up the terminal, found under Applications > Utilities > Terminal. Then use the code:
$ sysctl -n machdep.cpu.brand_string
This will return a string identifying the computer’s processor. Running a web search for this processor will take you to the manufacturers website, which should list the processor’s stats as well as whether it is 32-bit or 64-bit.
Navigate to “Control Panel → System and Security → System” and look for the highlighted information to determine whether your system is 32-bit or 64-bit.
2. Installing VirtualBox
Visit the VirtualBox downloads website, and in the highlighted area, select the platform package binary that applies to your operating system. VirtualBox is available on Windows, macOS, Linux, and Solaris.
Opening the downloaded file will start the installation walkthrough. Once it finishes, you’ll be able to launch the application.
3. Getting the latest FreeBSD release:
Visit the official FreeBSD releases page. The disk images are listed in order of release date, so the most recent release can be found at the top of the page as highlighted.
- For 32-bit machines, click on i386
- For 64-bit machines, click on amd64
After clicking the link, you will be redirected to a file directory containing multiple formats and versions of the FreeBSD installer.
NOTE: Although there is a section on the release page for virtual machines, do not download those options for VirtualBox.VirtualBox cannot read .qcow files like other virtual machines and requires a .iso installer format.
Identifying the Correct Disk Image
For Virtual Machines, the format you are looking for is the file ending in -disk.iso as shown abovew. Click this file and it will start downloading the installer.
4. Configuring and Starting FreeBSD on VirtualBox:
Once the FreeBSD installer has been downloaded in the last step, open VirtualBox to start hard disk configuration. Select the “New” button on the top left of the window to open the configuration window.
Name your operating system as “FreeBSD”, then select FreeBSD from the dropdown menu as well as the version (32 or 64 bit).
The program will then guide you through hard disk setup. The default settings work perfectly for FreeBSD. However, if you plan on installing a large number of applications or a desktop environment through FreeBSD, allocating 15GB+ of disk space is recommended. This can be adjusted later and the default settings should be plenty of room for the average user.
After the hard disk has been configured, boot up the operating system with the “Start” button. VirtualBox will start up a virtual machine and ask for a virtual optical disk file. This will be the file that you downloaded through the FreeBSD website. Navigate to this file by clicking the small file symbol next to the drop-down menu. Once selected, the booting process will continue and the FreeBSD installer will start.
5. Booting into FreeBSD:
The FreeBSD booting system will automatically start once VirtualBox starts the virtual machine. Follow the FreeBSD handbook’s installation guide to configure and setup your system. When in doubt, use the default options provided, as they can be reconfigured later if necessary.
Once installation incomplete, continue using FreeBSD handbook’s post-installation guide. Once again, using default options when recommended.
While creating the initial account, it is recommended to add the user to the wheel group, this will give the user access to administrative commands.
NOTE: when you type in passwords in FreeBSD, the text will not appear on the screen, but will still be entered.
6. Saving Your Configuration:
Once FreeBSD has been properly configured a window will appear asking if you would like to reboot to set the changes. Select “yes” and wait until the FreeBSD booting page appears again. Once this happens, close the virtual machine window and select “Power off the machine”.
7. Removing the Installation Disk:
On the main VirtualBox application, click the the section (on the lower right side of the window) that says “Storage”. A new window should appear showing the storage options.
Under the main “Controller: IDE” there will be two options. One will be the hard disk that VirtualBox created for the system (it will have a square blue hard drive icon) and the other is the original FreeBSD download (with a light blue disk icon). Right click the sub-storage with the disk icon and select “Remove” from the drop-down menu.
Once it is removed, the window should resemble the one pictured above.
8. Final Steps:
Select “OK” to save your changes and return to the main VirtualBox application. Click “Start” again and the FreeBSD virtual machine should now boot in its configured form. You now have FreeBSD installed on your machine!
VirtualBox comes with virtual graphics/audio drivers that FreeBSD may have trouble identifying. To fix problems that may arise later on as a result, log in and enter these lines at the prompt (ignoring the “$”):
In order to download packages you need to be logged into, or emulate the root user. To quickly do this:
Install the VirtualBox guest addition packages:
$ pkg install emulators/virtualbox-ose-additions
Open the startup service configuration file located at
/etc/rc.conf using the built-in text editor
$ ee /etc/rc.conf
(To edit the file using
ee, navigate using the arrow keys and type the text you need to enter. Once you are happy with your changes, press “<Esc> + <Enter>” and press “a” when given the option to save changes.)
Add these two lines to the bottom of the file and save your changes:
You are now ready to start using your FreeBSD system!