This article shows you how to install one of the most stable OS in a virtual environment using the VMWare virtualization server. This however should not frighten or disappoint you, as the technique is pretty much the same for non-virtual environment. First lets start with the
Requirements
Obtaining the FreeBSD Image
First and most important part of the actual installation is to locate and download a current version of the minimal (boot only) disk available from the FreeBSD official website. As for the moment, the most recent version is 6.2 and can be downloaded from:
| ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/6.2/6.2-RELEASE-i386-bootonly.iso |
Depending on how much time passed since I wrote this article, there might be newer versions and you might want to check ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/ for a full list.
The file itself shouldn’t be too big (around 20MB). If you are installing FreeBSD as a standalone OS you must burn the iso file on a CD (and of course skip the next step of this tutorial as it deals with VMWare setup only).
VMWare Configuration
If you do not have VMware Server installed already, please have a look at our VMware Tutorial for details. I assume that you have it installed and ready for use.
First, create a new Virtual Machine with the following configuration:
You might have noticed that the HDD specifications are IDE and splitted into 2GB files. The reasons are simple – IDE is recommended by VMWare itself. If you really need to use SCSI you might switch it. We are splitting the files into 2GB because of portability reasons – some file systems does not support files bigger than 2GB and you won’t be able to migrate your Virtual Machine. Again, if you are not planning of migrating your VM, you can setup VMWare to use a single file instead.
FreeBSD Step-By-Step Installation
The actual installation procedure of FreeBSD is quite easy. First start your virtual machine (or real one if you are installing it as a standalone os) and boot from the CD. After a minute or so a somehow graphical menu will appear on the screen. This is your main setup screen from which you can choose what type of installation exactly do you require. For the purpose of this tutorial we will build the system using the standard installation method. Choose the standard version.
Setting up the partitions.
That’s easy too. Provided that you have followed the tutorial so far you should have an empty (virtual probably) HDD which we will use to populate with the FreeBSD files and therefore we assume that it is ok for the OS to allocate its space automatically. To let it do so simply click on the ‘a’ button on your keyboard.
Once the total size of the drive is allocated you will be prompted to create your own partitions. Just like before, we will let the installation wizard to do that for us. Once again click on the ‘a’ button and then ‘q’ to quit. You might want to have a look at the partitions before saving them though and proceed only if you are happy with the suggested values. For example a 5GB big swap partition is not a good idea :-)
The final part of this step is to choose the bootloader. Unless you know what you are doing, I suggest you to leave the default BSD one.
Fetching the missing files
Once the disk is split into partitions and the bootloader is installed there is several more configurations we need to make before fully installing the OS. First we have to choose the media from which we will fetch the system files. Since we are using the bootonly disk, select the main FreeBSD FTP site (or any official mirror). Next, specify your network configuration – you can either let the installer try to connect to a DHCP server or manually enter the correct values.
When asked, please select that you would like to get the ‘Developer’ port collection – that is the one that has no X and no games :) Generally you won’t need them.
Now that you have your network setup all you have to do is sit back and wait for the install wizard to download and unpack all the needed files. Generally, depending on your internet connection speed of course, this might take up to an hour or so.
The final steps of the installer will ask you:
That’s it… you should have a fully working FreeBSD box now. Remove the install disk (in VMware just attach the CDROM to the host cd) and reboot.
The fun starts here!
By now you should already have the FreeBSD running smoothly. You have the latest ports installed and your system is ready to be customized. In the next tutorials of this section I will show you how to: