seawolfsanctuary

home :: blog :: rss feed :: identi.ca / twitter :: diaspora* :: last.fm :: rss

FreeBSD: 101

October
22

The majority of content here focusses on the GNU/Linux operating system because it is freely available to obtain, install and use. An alternative lies in its perhaps lesser-used cousins, the BSD family. While slightly more technical, they are an equally ultra-reliable bunch. If Linux isn’t quite your thing, you may wish to use FreeBSD instead. It’s good idea to at least acknowledge these alternatives exist so I’ve put together a quick How-To guide to get you started using FreeBSD. I do so using virtualisation in Sun’s VirtualBox software, but it makes no difference in terms of the end result.

FreeBSD LogoI aim to provide a guide to get FreeBSD up and running more quickly than following the FreeBSD Handbook, an excellent resource should you get stuck. These posts are for those coming from using Linux, so will assume a decent knowledge of Linux and that you’re not afraid to learn! This post runs through the installation routine; later posts applies some important post-installation configuration to give a solid base system. (We do not, however, discuss any troubleshooting.) An outline of the OS will follow but there’s only one real way to find out, right?

  • Grab FreeBSD (the easy bit)

FreeBSD is available from the website; the only necessary CD-ROM image is #1. Either burn it to a physical CD-ROM or — if you’re using virtualisation — create a virtual machine with it as the CD-ROM. I estimated that a clean 10GB hard disk will be plenty to house an installation of version 7.2. With your environment prepared, the next step is to install FreeBSD by booting the CD-ROM.

  • The Installation (a.k.a, “I wish I had a mouse”)

The installation is fairly painless, though it may appear a world away from the point-and-click systems that many current operating systems feature. To navigate, use the arrow keys and the space-bar to select. This is the standard method to use an ‘ncurses’ or keyboard-based program.

After selecting your language settings, chose the ‘Custom’ installation method because it is a balance between having few and too many options. This presents a menu structure which you should take one step at a time, down the list. he Options section can be skipped as the only settings inside worth changing can also be set later.

Partitioning your drive can be as simple or as complicated as you wish; simply tell the installer to use the entire disk as a ‘slice’ (press ‘A’), make it bootable (scroll down to it and press ‘S’) before finishing the first partitioning stage (with ‘Q’). Since your drive only houses FreeBSD, you can leave out the bootloader by selecting ‘Standard’ from the next prompt.

Inside the ‘slice’ partition, you need to create the secondary partitioning structure that defines whaere parts of the file-system are stored. The default is acceptable, but I  simply create a root (‘/’) partition filling the whole disk, minus a 512MB swap at the end. To do this, hit ‘C’ and specify the size of your first partition (in my case, 9727M), its mountpoint (/) and allowing SoftUpdates upon it (’S’). I repeated this to create the swap in the remaining space. By finishing this, the disk can be prepared for software.

Distributions are essentially bundles of software for types of users. This quickens the installation process substantially. I selected ‘X-User’ with the Ports collection by choosing option 9 and ‘Yes’ at the following screen. The Ports collection is by far the easiest method of software installation; it is the equivalent of the ‘apt’ or ‘yum’ package management systems available on Linux. If you do not install this, you will have a lot of compiling to do when it comes to installing software later!

The installation will commence after the media type is selected, in this case CD-ROM, and your choices confirmed. The disk drive will be prepared, base files extracted and your chosen software installed upon it.

  • The Installation… The Other Half

Now that the software has been installed, you will be asked if you wish to perform some additional configuration. Proceed to do this because it contains some important steps.

PackageA very useful package lies in the ‘linux’ group: Linux binary compatibility allows… well, compatibility with Linux binaries. That is to say they will run under FreeBSD.

Another utility that Linux users will want is sudo, found under ‘security’. This allows regular users to run administrative commands and will need to be configured later to do so. While there is no necessity to use sudo, it is a good habit to do so for security reasons.

Installing the two packages inside the ‘ports’ group will assist software installation. This will also be discussed later. For now, select both packages there and stop making such a fuss.

For a graphical interface, we’ll need to install some additional packages. While the Distribution contains packages for graphics, we don’t yet have a desktop environment. By selecting the ‘kde’ group inside the package list, we are presented with each component of KDE v4.2. While you could choose another desktop environment from ‘x11-wm’, I like to use a more feature-filled option, such as KDE or GNOME. KDE is available by the ‘kde4-4.2.2’ item, GNOME from ‘gnome2-2.26.0’ — these are meta-packages, bundles of software which will group the necessary components together in one selection. Notice that other packages are automatically marked for installation as dependencies, with a ‘D’.

With all the additional software packages selected, continue to install them by pressing ‘Tab’ to select ‘Install’. Depending on the desktop slected, this stage will often seem as long as the initial set-up…

  • Post-Installation Settings

Now that the package selection is complete (at last) the last few settings can be carried out. We wil continue to take the next menu step-by-step:

Arguably the most important setting is the Root Password: the administrative account, named ‘root’, is the only one from which system-level operations can be successfully carried out. Choose a strong password here so the computer will not be easily compromised. Hopefully you won’t need to use it that often, so pick something you’ll remember!

The next two option, ‘Fdisk’ & ‘Label’ we have already completed in the earlier partitioning, so adding a normal user is the next step. Fill in the login ID (user name) field, a password and enter your full name. The other fields can be skipped.

The only remaining options to set are ‘Time Zone’, ‘Mouse’ & ‘Networking’ — self-explanatory and, because they are computer-dependant, outside scope. Use your knowledge and intuition. After those are set, we can finish the installation by selecting ‘Exit’, the uppermost option on the ‘Configuration Screen’ list and the ‘Exit Install’ button. The installation system will close and your prepared computer reboot.

  • Conclusion

So far, the basic FreeBSD software have been installed to the hard disk. Those few additional packages expand the selection to give a solid base from which we will continue to use it. Lastly, a little administration was applied to personalise the system. In the next post, we shall boot our installation and perform a little user-level configuration to get things running even more smoothly.