1. Installing VirtualBox

FBSD1

 

  • Visit the Oracle VirtualBox website, the download page can be found here: https://www.virtualbox.org/wiki/Downloads
  • Select the Binary that applies to your operating system and machine. VirtualBox is available on Windows, OS X, Linux hosts, and Solaris. The download links can be found under the first bullet-point as pictured. 
  • Opening the downloaded package will start the installation walkthrough. Once it finishes, you’ll be able to launch the application.

 

2. Identifying Your Processor:

FBSD3

  • Determine if your machine has a 32-bit or 64 bit processor. Finding this information will depend on the type of operating system your machine is running.
  • On Mac, click the Apple symbol at the top left of your display. Select “About This Mac” from the drop-down menu. Processor information can be found on the window that opens. Pictured above is how the information will be displayed on an OS X device.
  • On Windows, click on the Start button, select “Control Panel” then navigate to the “System and Maintenance” section. Processor information will be listed under “System”. 
  • Once you find the processor google its name. The manufacturers website should list the processor’s stats as well as if it’s 32-bit or 64-bit.

 

3. Downloading the latest FreeBSD release:

FBSD2

  • Visit the official FreeBSD release page, found here. The disk images are listed in order of release date. The most recent release can be found at the top of the page.

 

 

4. Identifying the Correct Disk Image:

FBSD4

  • On the FreeBSD website select (DEPENDING ON PROCESSOR TYPE) 64-bit: the “amd64” link or for 32-bit: the “i386” link. After clicking the link you will be redirected to a file directory containing multiple formats and versions of the FreeBSD installer. For Virtual Machines, the format you are looking for is the file ending in “-disk.iso”. Click this file and it will start downloading the installer. Safari may ask for a password, just connect to the file as a guest and you’ll reach the same directory.
  • 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.

 

5. Configuring and Starting FreeBSD on VirtualBox:

Screen+Shot+2016-06-09+at+10.30.34+AM

  • Once the FreeBSD installer has been downloaded in the last step, open VirtualBox to start hard disk configuration. Start the process by selecting the “New” button on the top left of the window, this will open the configuration window. 
  • Name your operating system, then select FreeBSD from the dropdown menu as well as the version (32 or 64 bit). TIP: Naming the system FreeBSD will auto-select these options.
  • The program will then guide you through hard disk set-up. 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 10GB+ of disk space is recommended. This can be adjusted later and 6GB 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 .iso 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.

 

6. Post-Installation FreeBSD Configuration:

Screen+Shot+2016-06-02+at+5.24.33+PM

  • The FreeBSD booting system will automatically start once VirtualBox starts the virtual machine. A guide to this process can be found here. Sections 2.8-2.8.5 provide a step-by-step guide on how to configure the FreeBSD system. When in doubt, the default options should be used. The options can be reconfigured later if needed.
  • While creating the initial account, it is recommended to add the user to the “wheel” group, this will allow the user to use the “su” command to quickly emulate the root user.
  • Something to note while setting up FreeBSD: while you type in passwords in FreeBSD the text will not appear. 

 

7. Saving Your Configuration:

Screen+Shot+2016-06-14+at+1.23.48+PM

  • 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”.

 

8. Removing the Installation Disk:

Screen+Shot+2016-06-09+at+10.52.13+AM

  • 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 substorage with the disk icon and select “Remove” from the drop-down menu. Once it is removed the page should resemble the one pictured above.

 

9. 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 of code (code explanation on the right):
sudo su Allows the user to enter commands as root.
pkg install emulators/virtualbox-ose-additions Installs the VirtualBox guest additions.

vi /etc/rc.conf

vi is an editing command that can be used to edit configuration files.
  • To edit the file using “vi”, navigate to the top of the file using the arrow keys, type “a” and you will now be able to enter text. To delete text use the “x” key. When alternating between the two commands you will first need to use the “esc” key. Finally, once the changes have been made type “esc” then “:wq”. This will write the changes and quit the command.
  • Add these two lines to /etc/rc.conf:

vboxguest_enable=”YES”

vboxservice_enable=”YES”

 

  • The guest additions will now be loaded each time FreeBSD boots!