Vincent Danen walks you through the initial installation of FreeBSD 8.0. The text-based installer can be a challenge, but the OS is solid.
FreeBSD, and the other BSDs, are exceptionally stable and powerful operating systems, but they can be quite different from Linux. Although they share common principles and ideals, and a huge amount of software, when it comes down to it, FreeBSD and Linux are two different beasts. This doesn't make FreeBSD better or worse, but it is something to be aware of. Perhaps the most challenging thing about FreeBSD is the initial installation. While PC-BSD, another BSD variant, has made a lot of headway in making BSD easy to use, FreeBSD is still king as far as the BSD's go.
With the recent 8.0 release, it may be time to give FreeBSD a look. FreeBSD is favoured by many for service management and hosting, running Web servers and mail servers, etc. But it works as a fully functional desktop as well. This tip will take a quick walk through the installation. Fortunately, or unfortunately, depending on whether or not you are familiar with installing FreeBSD, the installer has not changed significantly over the years. Yes, it is still text-based.
To begin, once FreeBSD boots, select your country region, then select Standard installation. The next section is where you partition the hard drive. If this disk already has partitions, you'll likely want to delete them. Creating a dual-boot system with FreeBSD and Linux or Windows isn't impossible, but beyond the scope of this tip.
BSD operates on the concept of slices, which are similar to partitions in a lot of respects. To create a new slice to cover the entire disk, press [A]. Once this is done, press "S" to set it as bootable, and then [Q] to proceed.
The next screen asks if you need a boot manager. If the only operating system is FreeBSD, select the Standard option, which writes to the MBR and does not require a boot manager. Otherwise select the installation of the FreeBSD boot manager or elect to install nothing (useful if you plan to have something like grub be the boot manager if dual-booting).
The next part is to set up the partitions and mount points. This is where things may get confusing. Partitions live within slices, and you can have more than one partition per slice. Theoretically, you could have created multiple slices previously, and used each slice for one partition. Instead, we've created one slice and will create multiple partitions inside of this slice. On a 20GB drive, you could use a layout similar to the following:
- ad0s1a: 2000M, filesystem mounted as /
- ad0s1b: 500M, swap
- ad0s1d: 7000M, filesystem mounted as /usr
- ad0s1e: 3000M, filesystem mounted as /var
- ad0s1f: 8000M, filesystem mounted as /home
Once you have set up your partitions the way you want, press [Q] to finish and write the changes to disk.
On the next screen you get to select the package set. There are a few choices to choose from, including Developer, User, or All. You can also go through using Custom to select which packages you want installed; there isn't a lot to the base FreeBSD, so selecting All is the safest bet.
When asked to install the ports collection, select Yes. It is well worth it as you will be able to install a number of additional applications. Once you have made your choice, select Exit to proceed.
Next, you can select where to install FreeBSD from; likely it will be from CD or DVD so choose that option. Once this is done, FreeBSD begins the installation. This will likely take a while, depending on what you elected to install and the speed of your hardware.
After this, FreeBSD starts the sysinstall program, which can be used at any point later on to re-configure parts of the system. Sysinstall handles configuring the network interfaces, creating a user, setting the root password, and setting up initial services. There are plenty of dialogs and instructions here.
Unfortunately, FreeBSD is a great operating system with an unholy awful installer — compared to other operating system installers currently available. Some people are comfortable with text-mode installers, some aren't.
They are nothing to be afraid of if you have a moderate amount of knowledge, but for those who absolutely require a more up-to-date installer, PC-BSD may be of more interest than FreeBSD. Having said that, the installation is probably the hardest part of using FreeBSD, so if you've made it through this, FreeBSD is a lot of fun to play with.
Once the system has booted, unless you intend to use the install as a server, you will want to install X. You can install X using the ports system, which compiles from source, or by installing the binary package using the pkg_add command:
# pkg_add -r xorg
The FreeBSD Handbook is probably one of the best sources of information on installing and using FreeBSD. Here you will find out how to configure X and other aspects of your FreeBSD system. If you run into any trouble, be sure to reference it.
Get the PDF version of this tip here.