"Setup FreeBSD Virtual Machine Image"

Published: Sun 09 July 2017

In content.

Setting up FreeBSD is fun, especially when you are performing clean installation. We are going to cover setting up FreeBSD virtual machine file download from this link.

Take Note: If you are using Virtualbox to boot up FreeBSD, select NAT . I have not tried other network configuration options as of now.

Once you have finished download, extract the files and configure your virtual machine (Virtualbox / VMware) to boot the virtual machine file. You will be greeted with login screen. If you notice, you will see the term Amnesiac. Amnesiac simply means there is partial lost of information regarding the file we have booted just now.

Log into FreeBSD using ```root``` username. Bear in mind that you will not be prompted for password. Issue ```passwd``` command to set new root password. Then open ```rc.conf``` using ``vi`` editor and add following options:

hostname="freebsd.lan" ifconfig_em0="DHCP"

Exit rc.conf and reboot your machine. Now your virtual machine should have working network connection. To test this, issue ping -c 3 google.com. You should get 3 replies from google servers. Next you need to update FreeBSD by issuing following command freebsd-update fetch install. If you receive following line src component not installed, skipped, we can manually install src files. In order to do that, you need to find out your FreeBSD version by issuing uname -a.  You should see somewhere along the line "i386" or "amd64" . Look for appropriate src tarball and download in your virtual machine. The command will be fetch <path_to_src_tarball> . Once you have finished downloading  src tarball, you need to extract it to /usr/src by issuing following command tar -C / xvzf <path_to_src_tarball> /usr/src. Once you are done, you need to extract and path ports tree by issuing following command portsnap fetch extract update . This command will keep ports tree up to date with latest snapshot from FreeBSD.

TO BE CONTINUED TODO: Recompile kernel Rebuild world if possible

For more information, visit FreeBSD Handbook