Latest interface: 0.3.1
Latest system: 010

Navigation: back to Installation Guide - Forward to ZFS Guide

This guide covers setting up FreeBSD just after installation, and covers aspects of packages, shell and network.

The login screen
After having installed, you should have booted your real FreeBSD install. You should be able to login with the root user, with has no password set yet:

(image loading)

Setting the root password
When logged in with root, give it a password:

The first thing i generally do is setup the network:

(image loading)
dhclient em0
ping -c 1
If that works, you have an internet connection.

Now we can setup our ports tree. This is a collection of software that is ported to FreeBSD and can be installed easily. Ports differ from packages in that you need to compile them, which takes longer than just extracting a package and copy the binary files over. To get the portstree on your harddrive you can use portsnap to download a snapshot of the ports-tree, which is changing everyday with new and updated ports.
portsnap fetch
portsnap extract

Installing the bash shell
As i prefer the Bash shell over anything else, it is some of the first ports i install on a new system:
cd /usr/ports/shells/bash
make install clean
Now to make use of the new shell:
export EDITOR=ee
Now you're inside the ee editor in the system password file. Here you can change the default shell for root, so it starts bash instead of the default csh shell. To do this, look for the line beginning with root and look at the end of this line for the text "/bin/csh". Replace it to say "/usr/local/bin/bash". Now press escape-enter-enter to exit and save.

Setting up rc.conf
An important file is the /etc/rc.conf configuration file, which controls which programs and services are started at boot time and holds many important options, such as those related to network configuration. So go ahead and edit it:
ee /etc/rc.conf
The basic minimum is the network configuration:
# Network
You may also want various services to start at boot time:
# Local services

# Network services


# Synchronise time

# disable Sendmail
Save the file with escape-enter-enter. Note that you still need to install Samba and the istgt daemon to actually make use of them.

Setting up /boot/loader.conf
Another important file is the loader.conf, which is used at early boot to include kernel level devices and tweaks. A number of useful ZFS tweaks go inside here. Also, the AHCI needs to be enabled in this special file. Go ahead and create it:
ee /boot/loader.conf
It shouldn't exist yet, add the following data:
# enable AHCI driver

# tweak useful for some virtualization engines

# kernel memory - not required on amd64 and FreeBSD8+

# ZFS tweaks
All lines starting with a # character will be skipped; they are 'commented out' and inactive. This allows you to remember the settings and enable them when you need them.

IMPORTANT! Since you've enabled the AHCI driver, your device names may change, including that of your system disk used for booting. This may create problems if you reboot and the device has another name. If your system disk is connected to an AHCI-enabled Serial ATA port, you need to update the /etc/fstab file:
ee /etc/fstab
This will show the UFS filesystems in use for the base system. The important entries are for the root filesystem ('/') and the filesystems /usr /home /var /tmp. Where it may say 'ad0' or 'ad4', you may need to change that to 'ada0' instead. If your system-disk is not conencted to an AHCI-enabled Serial ATA port, then you need no change here.

Now reboot to activate all the changes. Then continue to the ZFS guide for FreeBSD.

Valid XHTML 1.1