Copyright 2010

The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.

All other content within the PC-BSD Users Handbook is freely available for sharing under the terms of the Creative Commons Attribution License.

Table of Contents

1 Introduction

1.1 Differences Between PC-BSD and FreeBSD

1.2 Differences Between PC-BSD and Microsoft Windows

1.3 PC-BSD's Goals and Features

1.4 PC-BSD Releases

2 Pre-Installation Tasks

2.1 Migrating to PC-BSD

2.2 Minimum Hardware Requirements

2.3 Hardware Compatibility

2.4 Partitioning the Hard Drive

2.5 Obtaining PC-BSD

2.5.1 Data Integrity Check

2.6 Burning the Installation DVD

2.6.1 Burning the DVD on Windows

2.6.1.1 ImgBurn

2.6.1.2 Nero

2.6.1.3 InfraRecorder

2.6.2 Burning the DVD on a Unix system

2.6.2.1 K3B

2.6.2.2 Brasero

2.6.2.3 growisofs

2.6.3 Writing an IMG File to Flash Media

2.7 PC-BSD Live Mode

2.8 Using VirtualBox

2.8.1 Creating a Virtual Machine

2.8.2 Troubleshooting Installations Within VirtualBox

3 Installing PC-BSD

3.1 Starting the PC-BSD Installation

3.1.1 Language Selection Screen

3.1.2 Keyboard Selection Screen

3.1.3 System Selection Screen

3.1.4 Disk Selection Screen

3.1.5 Users Creation Screen

3.1.6 Time Selection Screen

3.1.7 Components Selection Screen

3.1.8 Installation Summary Screen

3.1.9 Installation Progress Screen

3.1.10 Installation Finished Screen

4 Advanced Installation Topics

4.1 Upgrading PC-BSD

4.2 Restoring PC-BSD from Backup

4.3 Use PC-BSD Installer to Install FreeBSD

4.4 Install PC-BSD Over a Network

4.5 Using a Custom Partition Layout

4.6 Disk Encryption

4.7 Dual Booting

4.7.1 PC-BSD Boot Loader

4.7.2 GAG, The Graphical Boot Manager

4.7.3 Grub

4.7.3.1 Adding PC-BSD to Grub Version 1

4.7.3.2 Adding PC-BSD to Grub Version 2

4.7.4 Dual Boot with Windows Using EasyBCD

4.7.5 Recovering Windows Boot Loader after Installing PC-BSD

4.8 Installation Troubleshooting

4.8.1 Installation Fails

4.8.2 No PC-BSD Welcome Screen

4.8.3 ACPI

4.8.4 Computer Freezes

4.8.5 LBA

4.8.6 Monitor Detection

4.9 Creating an Automated Installation with pc-sysinstall

4.9.1 Determine Which Variables you Wish to Customize

4.9.2 Create a Customized Configuration

4.9.3 Create a Custom Installation Media

5 Exploring PC-BSD

5.1 Display Settings

5.2 Logon to PC-BSD

5.3 Installing True Type Fonts

5.4 Java and Flash

5.5 Multimedia

5.6 KDE Desktop

5.6.1 KDE Panel

5.6.2 Application Launcher

5.7 Working with Directories and Files

5.8 Remote Desktop Sharing

5.8.1 Connecting to Another Desktop Using Remote Desktop

5.8.2 Allowing Another Computer to Connect Using Desktop Sharing

6 Installing Applications and Keeping PC-BSD Updated

6.1 Using Software Manager

6.1.1 Installing and Uninstalling PBI Software

6.1.2 Updating Installed PBIs

6.1.3 Applying System Updates and Security Patches

6.1.4 Configuring Software Manager

6.2 Using Ports Jail to Manage FreeBSD Packages and Ports

6.2.1 Installing FreeBSD Packages

6.2.2 Compiling FreeBSD Ports

6.3 Keeping Ports Up-to-date

6.3.1 Create a sup file

6.3.2 Install an Upgrading Utility

6.3.3 Read /usr/ports/UPDATING

6.3.4 Perform the Upgrade

6.4 Rebuilding World

7 PC-BSD Tools

7.1 Firewall Manager

7.2 Networking Manager

7.2.1 Ethernet Settings

7.2.2 Wireless Settings

7.2.3 Advanced Network Settings and PPPoE

7.2.4 Troubleshooting Network Settings

7.3 Printer Configuration

7.3.1 Adding a Printer

7.3.2 Printer Troubleshooting

7.4 Services Manager

7.5 System Manager

7.6 Users Manager

7.7 Making a System Backup using Life Preserver

7.7.1 Creating a Backup

7.7.2 Troubleshooting and Configuration Options

7.7.3 Restoring a Backup

7.8 Managing Jails with The Warden

7.8.1 Installing Inmates

7.8.2 Exporting/Importing Jails

8 Finding Help

8.1 PC-BSD Forums

8.2 FAQS

8.3 IRC Channel

8.4 Mailing lists

8.5 FreeBSD Handbook and FAQ

8.6 Social Media

8.7 Search and Portals

8.8 Other Resources

9 Supporting PC-BSD

9.1 Become a Beta Tester

9.2 Become a Translator

9.3 Become a Developer

9.4 Report Bugs

9.5 Submit PBI Requests

9.6 Test PBIs

9.7 Create PBIs

9.8 Donate Money

9.9 Host a Mirror

9.10 Become an Advocate

Preface

written by users of the PC-BSD operating system.

Version 8.2

Published February, 2011

Copyright © 2005, 2006, 2007, 2008, 2009, 2010, 2011, The PC-BSD Project.

Cover art by Jenny Rosenberg of iXsystems.

Welcome to PC-BSD! This Handbook covers the installation and use of PC-BSD 8.2. This Handbook is a work in progress and relies on the contributions of many individuals. If you are interested in assisting with the Handbook, visit the PC-BSD wiki and create a login account for yourself. If you use IRC Freenode, you are welcome to join the #pcbsd channel where you will find other PC-BSD users.

A PDF of this version of the Handbook is available from ftp.pcbsd.org/pub/handbook/.

The PC-BSD Users Handbook is freely available for sharing and redistribution under the terms of the Creative Commons Attribution License. This means that you have permission to copy, distribute, translate, and adapt the work as long as you attribute the PC-BSD Project as the original source of the Handbook.

PC-BSD and the PC-BSD logo are registered trademarks of iXsystems. If you wish to use the PC-BSD logo in your own works, please ask for permission first at marketing@ixsystems.com.

FreeBSD is a registered trademark of the FreeBSD Foundation.

1 Introduction

Welcome to PC-BSD and many thanks for your interest.

Early in 2005, Kris Moore, the founder of PC-BSD, presented the first beta version of PC-BSD to the community. What some FreeBSD advocates had been waiting for for years had finally arrived: an easy-to-use FreeBSD-based operating system for the desktop, with very little configuration necessary. A polished, full-featured, free-of-charge, open-source operating system with a BSD license, based on FreeBSD, that anybody could use, from the beginner to the advanced user alike, was a dream slowly being realized.

With the arrival of easy-to-use Linux distributions (another Unix-like operating system) and their immediate success, it became obvious that there was a large niche market. However, Kris thought that the Linux market could have advanced more in user friendliness. The BSD community had very good server operating systems such as FreeBSD, NetBSD, and OpenBSD, but none for the desktop market. Taking a strong liking to FreeBSD due to its design, speed, and robustness, Kris Moore decided to create a user-friendly and intuitive FreeBSD based operating system for desktop use.

PC-BSD is a desktop-oriented operating system to the likes of Microsoft Windows or Apple Mac OS X. It is based on FreeBSD which is well known for its stability, scalability and openness.

PC-BSD started off as an independent project, but since 10 October 2006 PC-BSD is (financially) backed and supported by the enterprise-class hardware solutions provider iXsystems.

This section discusses:

Differences Between PC-BSD and FreeBSD

Differences Between PC-BSD and Microsoft Windows

PC-BSD's Goals and Features

PC-BSD Releases

1.1 Differences Between PC-BSD and FreeBSD

PC-BSD is essentially a customized installation of FreeBSD, and not a forked-derivative. PC-BSD is based on FreeBSD's latest STABLE-branch. Since the underlying FreeBSD system has been kept intact, you have a fully functional FreeBSD system under the hood.

The main difference between PC-BSD and FreeBSD is that PC-BSD is geared towards desktop use, while FreeBSD has been created with server use in mind. Other differences include:

PC-BSD pre-configures the KDE desktop environment (currently 4.5.5)

PC-BSD is installed by a graphical installer rather than a text based installer

PC-BSD installs a number of pre-installed applications

PC-BSD uses the unique PBI (Push Button Installer) package system and also supports FreeBSD's packages and ports systems

PC-BSD’s kernel has been recompiled with some configuration tweaks to better suit it for desktop use

PC-BSD comes pre-configured with a number of automatic scripts to perform tasks such as connecting digital cameras or USB memory sticks

In summary, there is no major difference between PC-BSD and FreeBSD. PC-BSD is basically FreeBSD with a nice installer, some pre-configuration, kernel tweaks, PBI package management, pre-installed packages and some handy graphical utilities to make PC-BSD suitable for desktop use. As a user of PC-BSD, you don’t have to worry about configuring your system, but rather to simply install it and start using it.

1.2 Differences Between PC-BSD and Microsoft Windows

As you may already know, PC-BSD is a different kind of operating system compared to Microsoft Windows. Let's have a look at some similarities and differences between PC-BSD and MS Windows.

Some similarities:

Both provide an easy-to-use graphical user interface and PC-BSD can be configured with similar graphical functionality as Windows

Both have an excellent Internet connectivity stack (IPv4 and IPv6)

Both have a large collection of applications available. For example, the FreeBSD ports collection currently has over 22,000 applications that have been ported to FreeBSD

Both can browse and share Windows networking resources such as shared folders and printers

Both can handle audio/video, play CDs/DVDs and can be used for word processing, photo editing, databases, etc.

Installing software is easy, quick and straight forward

However, there are also some major differences:

PC-BSD is free of charge and its source code is free to view and to download

A PC-BSD computer won't get slow after a few months' of use

PC-BSD is not affected by the viruses, spyware and other malware that plague Windows systems

PC-BSD doesn't always have drivers or support for the latest or less popular hardware

PC-BSD has access to FreeBSD and Linux software in addition to its own PBI library.

The most current version of PC-BSD requires less resources than the most recent Windows version.

Hard drives or partitions with PC-BSD installed don't need to be defragmented

As with most Unix or Unix-like operating systems, you have greater control over your system in PC-BSD than in Windows.

1.3 PC-BSD's Goals and Features

PC-BSD has been designed with the "casual" computer user in mind. The PC-BSD community aims to provide the following features:

Easy installation: to install PC-BSD, simply insert the installation DVD, reboot the system to start the installer, and answer a few questions in the graphical menus.

Automatically configure hardware: such as video, sound, network and other devices so that they are available for use at the first system startup.

Intuitive desktop interface: PC-BSD comes with the latest stable version of the KDE desktop environment. The KDE applications alone will probably cover most of your day-to-day computing needs.

Easy software management: with the included PC-BSD Software Manager utility, installing, upgrading, and uninstalling PBI software is safe and easy.

Easy to update: PC-BSD provides a built-in Update Manager that will notify you of available system updates to install security fixes, bug fixes, system enhancements and newer versions of software.

Visually attractive: PC-BSD installs Nvidia video card drivers and the Compiz-Fusion accelerated 3D desktop for the next level of desktop experience. Adobe Flash is installed so you can watch your favorite movies and videos on Youtube and Google Video.

Architecture support: PC-BSD is available for the i386 architecture and for 64bit systems.

Laptop support: provides power saving and swap space encryption, and automatically switches between wired and wifi network connections.

Secure environment: PC-BSD provides a pre-configured PF firewall and brute-force attack protection with denyhosts. It is also safe from viruses, adware, spyware and trojans.

Binary compatibility: able to run almost all GNU/Linux applications like Oracle, WordPerfect, Skype, Doom 3, Quake 4, etc. through the Linux Compatibility Layer (LCL) and able to run Windows XP/2000 through emulators (such as Qemu or Win4BSD) and Windows applications through the Wine PBI.

Easy system administration: PC-BSD provides many graphical tools for performing system administration tasks.

Localization: PC-BSD supports a number of native languages and locales.

Vibrant community: PC-BSD has a friendly and helpful support community.

Professional support: professional email and phone support is available from iXsystems.

1.4 PC-BSD Releases

As of September 2008, PC-BSD release version numbers are the same as FreeBSD's. When the first number of a release is followed by a zero, this means that this version of PC-BSD introduces many new features. When the second number of a release is not a zero, this means that the new version may have some new features, but it mostly fixes known software problems and security vulnerabilities. If a release includes the letters RC, this means that it is a "Release Candidate", or that the developers are still adding and fixing features and need testers to help them find any existing problems. If the release includes the word BETA, this means that this version is still buggy and needs the help of testers to find as many problems as possible so they can be fixed.

Note: if you want to use PC-BSD (not test it), you should install the most recent release, not a beta or RC version.

This list shows all of the releases of PC-BSD and the dates the release became available. Click on a version to read its Release Notes, which describe the features and software included in that release.

PC-BSD 8.2 - 21 February 2011

PC-BSD 8.2-RC1 - 10 January 2011

PC-BSD 8.2-BETA1 - 20 December 2010

PC-BSD 8.1 - 20 July 2010

PC-BSD 8.0 - 22 February 2010

PC-BSD 7.1.1 - 06 July 2009

PC-BSD 7.1 - 10 April 2009

PC-BSD 7.1 (RC1) - 27 March 2009

PC-BSD 7.1 (BETA1) - 06 March 2009

PC-BSD 7.0.2 - 10 December 2008

PC-BSD 7.0.1 - 17 October 2008

PC-BSD 7.0 - 15 September 2008

PC-BSD 7.0 (BETA1) - 28 August 2008

PC-BSD 1.5.1 - 23 April 2008

PC-BSD 1.5 - 12 March 2008

PC-BSD 1.4.1.2 - 04 January 2007

PC-BSD 1.4.1.1 - 03 December 2007

PC-BSD 1.4.1 - 16 November 2007

PC-BSD 1.4 - 24 September 2007

PC-BSD 1.3.4 - 18 April 2007

PC-BSD 1.3.3_1 - 07 March 2007

PC-BSD 1.3.3 - 12 February 2007

PC-BSD 1.3.2 - 19 January 2007

PC-BSD 1.3.1 - 09 January 2007

PC-BSD 1.3 - 31 December 2006

PC-BSD 1.3 (RC1) - 11 December 2006

PC-BSD 1.3 (BETA2) - 26 November 2006

PC-BSD 1.3 (BETA1) - 18 October 2006

PC-BSD 1.2 - 12 July 2006

PC-BSD 1.11a - 25 June 2006

PC-BSD 1.11 - 13 June 2006

PC-BSD 1.1 - 28 May 2006

PC-BSD 1.0 - 28 April 2006

PC-BSD 1.0 (RC2) - 20 January 2006

PC-BSD 1.0 (RC1) - 21 November 2006

PC-BSD 0.8.3 - 22 October 2005

PC-BSD 0.8.2 - 23 September 2005

PC-BSD 0.8.1 - 19 September 2005

PC-BSD 0.8 (BETA) - 11 September 2005

PC-BSD 0.7.8 (BETA) - 18 July 2005

PC-BSD 0.7.5 (BETA) - 24 June 2005

PC-BSD 0.7 (BETA) - 13 May 2005

PC-BSD 0.6 (BETA) - 01 May 2005

PC-BSD 0.5a (BETA) - 18 April 2005

PC-BSD 0.5 (BETA) - 15 April 2005

2 Pre-Installation Tasks

Installing PC-BSD is very easy. However, you should review this section to make sure your hardware is supported and you know how to prepare your installation media. This section walks you through the following tasks:

Migrating to PC-BSD

Minimum Hardware Requirements

Hardware Compatibility

Partitioning the Hard Drive

Obtaining PC-BSD

Burning the installation DVD

PC-BSD Live Mode

Using VirtualBox

2.1 Migrating to PC-BSD

Migrating your computer to a brand new operating system can sometimes be a daunting task.

Before you begin, there are a few things you should check to ensure that your system is ready to install PC-BSD.

Are you dual-booting or installing over the entire drive? If you are dual-booting you will need to ensure that you have at least a 14 GB primary partition available. You should also review Section 4.7 on Dual Booting to determine which boot loader best suits your needs.

What type of video card is your system using? PC-BSD supports many video cards, including 3D acceleration on most NVIDIA cards and some Intel integrated cards. Like most open source operating systems, PC-BSD uses X.org drivers for graphics support. You can check if your video card is supported at the X.org Drivers page.

Are you using a wifi card in your system? PC-BSD has built-in support for dozens of wireless networking cards. You can check if your card is supported here.

Have you backed up your important data? This is an important step to never forget. Any irreplaceable data, such as emails, bookmarks, or important files and documents should always be backed up to an external media, such as a removable flash drive, before installing or upgrading any operating system.

After you have gone through these items, you should be ready to start the installation of PC-BSD. Should you run into an issue with your installation, Section 8 demonstrates that are many different ways to get help.

2.2 Minimum Hardware Requirements

PC-BSD has moderate hardware requirements and commonly uses less resources than its commercial counterparts. Before installing PC-BSD on your computer, please make sure you meet the minimum requirements.

Minimum system requirements: at a bare minimum, you need to have the following computer hardware in order to install PC-BSD:

Pentium II or higher

512 MB RAM

14GB of free hard drive space

Network card

Sound card

Recommended system requirements: note that these are minimums and that the faster your computer hardware, the better your computing experience:

Pentium 4 or higher

1024 MB of RAM

20GB of free hard drive space

Network card

Sound card

3D accelerated video card (NVIDIA or Intel)

You can never have too much RAM, so install as much as you can afford. To play modern video games, you should use a fast CPU. If you want to create a collection of tunes and movies on your computer, you will want a large hard disk drive which can be internal or external.

Supported 32 bit (i386) processors:

PC-BSD will install on 32-bit systems containing the following processors:

Intel 80486, Pentium, Pentium Pro, Pentium II, Pentium III, Pentium 4

Intel Xeon and Celeron®

Am486®, Am5x86®, K5, AMD-K6®

AMD Athlon, including Athlon-MP, Athlon-XP, Athlon-4, and Athlon Thunderbird

AMD Duron™

AMD Élan SC520

Transmeta Crusoe

Cyrix

NexGen

Supported 64 bit processors:

PC-BSD will install on 64-bit systems containing the following processors:

AMD Athlon™, including 64, XP, 64 X2, FX

AMD Opteron™

AMD Sempron

AMD Turion 64, AMD Turion 64 X2

all multi-core Intel Xeon™ processors except Sossaman

single-core Intel Xeon processors Nocona, Irwindale, Potomac, and Cranford

Intel Pentium®, including M, D, and Extreme Edition

Intel Core

Intel Pentium® D

Intel Pentium 4

Intel Celeron D

2.3 Hardware Compatibility

While most hardware "just works" with PC-BSD, it is possible that you'll run across a piece of hardware that does not. If you do, you can help improve hardware support for all PC-BSD users by reporting the problem so that it can be addressed by the developers. It should be remembered that PC-BSD is really FreeBSD, meaning that any hardware that works on FreeBSD will work on PC-BSD.

If you wish to check your hardware before installing PC-BSD, a good place to start is the FreeBSD 8.2 Hardware List . Another good method is to run PC-BSD in Live Mode which is described in section 2.7. That way you can test your various devices before committing to an install.

If you are experiencing problems with a device, start with a Google search for the term "FreeBSD" and the type and model of the hardware. This will let you know if there is a known issue with the device. If there are many search results, concentrate on the most recent ones as often hardware that used to be problematic has since been fixed or the missing driver will be available in an upcoming release of FreeBSD.

Currently there are some known issues with wireless devices and the developers that are fixing these problems are looking for testers. More information is available on the Wireless Testing page.

If you experience problems with a device that should work but does not or you can't find any existing problem reports for your hardware, please take a few moments to report the problem. Instructions on where to send your report and suggestions for what information should be included in your report are described in Section 9.1.

2.4 Partitioning the Hard Drive

PC-BSD doesn’t come with a built-in partition manager. If you’re planning to install PC-BSD on a brand new hard drive or you wish to shrink an existing partition to make disk space for PC-BSD, you will need to use a third-party partitioning utility before starting the PC-BSD installation. Many partitioning applications are available. Two free live CDs are particularly user friendly: PartImage and PartedMagic.

Before creating or editing any partitions, make sure you back up your valuable data first to an external media, such as a removable flash drive, first!

If you are currently using Windows 7 or Vista, there are instructions for shrinking your partition here. You will still need a utility such as PartedMagic to convert the newly created free space to a primary partition.

If you are dual-booting and your hard drive already has partitions, you should double-check that you have a free primary partition as PC-BSD will not install on a logical or secondary partition. You can use your partitioning application to convert a secondary to a primary partition if you don't have an available primary partition.

2.5 Obtaining PC-BSD

The installation files for PC-BSD can be downloaded for free and come with an .iso or .img file extension. Depending upon the type of file you choose, the size will vary between ~200MB and ~4GB. This section will show you how to select which file to download, how to verify the download, and how to burn the file to media.

If you have a slow download connection or wish to support the PC-BSD project financially, you can purchase PC-BSD DVDs from the FreeBSD Mall.

Members of the PC-BSD project attend many IT conferences across the globe and give out PC-BSD DVDs at conference booths. Visiting a PC-BSD booth is an excellent way to meet other PC-BSD users and to get your questions answered. Check the PC-BSD website to see if any Upcoming Events are happening near you. If you are organizing a PC-BSD booth, contact us to arrange for DVDs.

When you go to the Download page of the PC-BSD website, you will find a number of files available for download:

DVD (requires a DVD burner)

USB Flash (requires a USB memory stick or flash card)

Boot-Only CD (requires a network connection during the install)

Boot-Only USB (requires a USB memory stick or flash card and a network connection during the install)

There are two versions available for each type of file: one for 32 bit (i386) systems and one for 64 bit systems. It is important that you download a file that is appropriate for your computer's architecture (32 or 64 bit).

Note: If you plan to use VirtualBox to install PC-BSD, you can install the 32-bit version, even if your computer is 64-bit. Depending upon your processor's capabilities, you may or may not be able to install the 64-bit version on a 64-bit system using VirtualBox.

The rest of this section will show you how to verify the integrity of the ISO you downloaded, then how to burn it to media.

2.5.1 Data Integrity Check

After downloading the file that is correct for your architecture and installation type, it is a good idea to check that the file is exactly the same as the one on the PC-BSD server. While downloading, some bits and bytes may get "damaged" or lost, making the installation file unusable. Each PC-BSD download has an associated MD5 checksum which is listed next to the download link. If the checksum of the file you downloaded has the same number, your download was successful. If the MD5 numbers don't match, you should download the file again, preferably from a different mirror. In order to verify the checksum, you will need to use a checksum verification utility.

If you are currently using a Windows system, you can download and install the FastSum utility. Once installed, launch the program and click the Files button, shown in Figure 2.5.1a, to browse to the location of your downloaded file.

Figure 2.5.1a: Verifying a Checksum Using FastSum

Once the file is selected, click the green arrow to calculate the checksum. Once calculated, it will be listed in the Checksum\State column. In this example, the checksum is 59182842F308CE14B66FB437159B05F7.

On Linux and BSD systems you can use the built-in md5 command line tool to check the data integrity of the downloaded file. In this example, the file is located in the Downloads subdirectory of user1's home (~) directory. You should substitute the name and location of the file that you downloaded:

md5 ~/Downloads/PCBSD8.2-BETA1-x86-DVD.isoMD5 (Desktop/PCBSD8.2-BETA1-x86-DVD.iso) = 59182842f308ce14b66fb437159b05f7

2.6 Burning the Installation DVD

Once you have downloaded and verified the PC-BSD DVD .iso file, you will need to burn it onto a DVD disk. In order to do so, you will need:

A DVD drive that allows you to burn media

A writable medium in your DVD drive

DVD burning software

This section will demonstrate how to:

Burn the DVD on Windows

Burn the DVD on Linux or BSD

2.6.1 Burning the DVD on Windows

Several burning applications are available for Windows. This section will demonstrate how to use ImgBurn, Nero, and InfraRecorder.

2.6.1.1 ImgBurn

ImgBurn is an easy to use image burner for Windows that is available for free download. After installing and launching ImgBurn, insert a blank DVD media and select "Write image file to disk" from the main menu, seen in Figure 2.6.1a:

Figure 2.6.1a: Initial ImgBurn Screen

You can then use File -> Browse for a source file... to select the .iso file to burn; once selected, your screen should look similar to Figure 2.6.1b. Click the Write icon in the lower left corner to begin the burn.

Figure 2.6.1b: Selecting the Source File (.iso) and Destination (DVD burner) in ImgBurn

ImgBurn will provide a status bar to indicate the progress of the burn. When it is finished, ImgBurn will eject the DVD tray then reclose it in order to verify the burn. If the tray does not return itself, which may occur on a laptop, push the tray back in if you wish to verify the burn.

2.6.1.2 Nero

Nero is a popular commercial burning application for Windows. Although it is commercial, there are several free trial versions available for download from the Nero website. Depending upon the version you download and install, your screens may vary slightly from those shown here. This section demonstrates using Nero BurnLite 10.

To burn an ISO, launch Nero BurnLite, click the "Data Burning" tab, and then the + Add button to browse to the location of your .iso file. An example is seen in Figure 2.6.1c.

Figure 2.6.1c: Ready to Burn an ISO Using Nero BurnLite

Click the Burn button and Nero will start burning your disk. When it is finished, Nero will alert you that the burning process is complete and will eject the DVD.

2.6.1.3 InfraRecorder

InfraRecorder is an open source burning application for both CDs and DVDs. Once installed, open InfraRecorder and click on the "Write Image" button shown in Figure 2.6.1d.

Figure 2.6.1d: Initial InfraRecorder Screen

InfraRecorder will display a screen where you can browse to the location of the PC-BSD image. Once selected, you will be presented with an options screen shown in Figure 2.6.1e.

Figure 2.6.1e: Burn Options in InfraRecorder

You can accept the defaults and click OK to start the burn. When finished, the tray with the DVD will open and a dialog box will appear indicating that the burning process has finished.

2.6.2 Burning the DVD on a Unix system

This section demonstrates how to burn the installation DVD using the following tools that may be available on a Linux or BSD system: K3B, Brasero, and growisofs.

2.6.2.1 K3B

The KDE desktop environment provides the K3B burning application. K3B has a similar interface to burning software found on Windows and is equally easy to use.

Note: depending upon your distribution, K3B may or may not be included with the installation of KDE. If it does not appear in the KDE application launcher, you should be able to install it using your operating system's software management system. On a FreeBSD system, you can install the K3B package. If you are running an older version of KDE, use the pkg_add -r k3b command. If you are running KDE4, use the pkg_add -r k3b-kde4 command instead. On a PC-BSD system, you can install the K3b PBI using Software Manager.

To burn your ISO, launch K3B and click "Tools → Burn Image...". Figure 2.6.2a demonstrates this screen on a KDE4 system. On a KDE3 system, the menu item may appear as "Burn DVD ISO Image...".

Figure 2.6.2a: Selecting the Burn Image Tool Within K3B

A new window, seen in Figure 2.6.2b, will launch. Click the blue folder to browse to the location of your .iso file.

Figure 2.6.2b: K3B's Burn Image Screen

Once your file is listed, ensure a blank DVD is inserted and click the "Start" button. K3B will automatically eject the DVD once the burn is complete.

2.6.2.2 Brasero

Brasero is an easy to use CD-ROM/DVD burner included with the GNOME desktop. To launch Brasero, click Applications -> Sound & Video -> Brasero Disk Burner and the dialog window shown in Figure 2.6.2c will be displayed.

Figure 2.6.2c: Brasero's Initial Screen

If you click on Burn image -> Click here to select a disk image, you will be able to select your .iso file. Once selected, click "Open" to return to the screen seen in Figure 2.6.2d.

Figure 2.6.2d: Viewing the Image to Burn and the DVD Hardware Properties Within Brasero

The name and size of your .iso file should appear and, assuming a blank DVD is inserted, Brasero will indicate the size of the media. The lower portion of Figure X-XX shows the menu that appears if you click on the Properties button. You can change these options if you wish, but it is fine to keep the default settings. When you are ready, click the "Burn" button and Brasero will burn your DVD.

2.6.2.3 growisofs

If you are familiar with using the command line on a FreeBSD system, you can use the growisofs command line utility to burn the DVD. This utility is included with the dvd+rw-tools FreeBSD port. If that software is not yet installed, issue this command as the superuser:

pkg_add -r dvd+rw-tools

Depending upon the type of DVD burner hardware, you may have to configure the system to use it. If the device is ATAPI (i.e. not USB or SCSI), the ATAPI driver must be loaded. The superuser can issue this command:

kldload atapicam

If you just get your prompt back, the driver successfully loaded. If you get the message "kldload: can't load atapicam: File exists", this means that the driver was already loaded. If the device is USB or SCSI, no additional drivers need to be loaded if you are running the generic FreeBSD kernel. After inserting the DVD media into the device, you can start the burn using this command:

growisofs -Z /dev/cd0=PCBSD8.1-x86-DVD.iso

If your device is not the first CD device, change the number 0 accordingly. If your ISO has a different name, substitute the correct name in the command shown above.

2.6.3 Writing an IMG File to Flash Media

If you selected to download a "Boot only USB for network & internet installs" .img file, you can write the image file to a flash card or removable USB drive using the built-in dd command line utility on a BSD or Linux command system. On a FreeBSD system, the superuser can use this command to write the specified image in the current directory to the first plugged in USB device:

dd if=PCBSD8.1-x86-USB-bootonly.img of=/dev/da0 bs=5k81920+0 records in
81920+0 records out
419430400 bytes transferred in 194.226042 secs (2159496 bytes/sec)

When using the dd command:

if= refers to the input file; in our case, the name of the file to be written

of= refers to the output file; in our case, the device name of the flash card or removable USB drive. You may have to increment the number in the name if it is not the first USB device. On Linux, use "/dev/sda" to refer to the first USB device.

bs= refers to the block size

To burn the .img file on a Windows system, you can use ImgBurn as described in Section 2.6.1.1. Simply select the .img file as the source and the USB drive as the destination.

Once the burn is complete, you can boot from the removable device and proceed with the installation as described in Section 3. You will also need to refer to Section 4.4 on Installing PC-BSD Over a Network as the boot-only image installation requires an Internet connection to download the rest of the files needed to complete the installation of PC-BSD.

Note: if the system does not boot from the removable device, check the boot order in your system BIOS.

2.7 PC-BSD Live Mode

Beginning with PC-BSD 8.0, a live option is included with the installation DVD. It allows you to try out PC-BSD before committing to an installation. It is also an excellent way to test that all of your computer hardware works with PC-BSD.

To use live mode, insert the DVD and select option "3. Boot in Live Mode" when you see the screen shown in Figure 2.7a:

Figure 2.7a: Selecting Live Mode from the PC-BSD Start Menu

After making this selection, PC-BSD will continue to load into memory.

Note: like any live DVD, the amount of installed memory will affect the time it takes the operating system to load and how responsive the system is once loaded. Also, live mode provides very little storage, meaning that you should not install applications or save files within this mode. Live mode is meant to provide an environment for testing hardware and to see if you like PC-BSD. If you do, you should consider installing PC-BSD either onto the computer's hard drive or into a virtual environment such as VirtualBox. For your convenience, an "Install PC-BSD" icon is included on the live mode desktop.

If you wish to leave live mode, click the red flame in the lower left corner -> Leave -> Logout. When prompted, type exit to reboot the system.

2.8 Using VirtualBox

A virtualized environment allows you to "test drive" an operating system without overwriting your current operating system. This is an excellent way to practice installation, to see if all of your hardware is supported, or to try multiple versions of operating systems. Virtualization software effectively creates "windows" (known as virtual machines) into which you can install and use an operating system. The only limitation to virtualization is your hardware as each guest uses CPU and RAM. Depending upon the amount of CPU and RAM in your computer, you may find that the operating system you install using virtualization software runs slowly. If your computer really slows down, try closing other applications running on your computer to free up some RAM.

PC-BSD provides a PBI for VirtualBox, an open source virtualization program originally created by Sun Microsystems. VirtualBox also runs on Windows, Linux, Macintosh, and OpenSolaris and supports a large number of operating systems that can be installed into a virtual machine.

If your computer is already running a version of PC-BSD, you can use Software Manager to install VirtualBox. If your computer is running another operating system, download the binary for your operating system from the VirtualBox Downloads page.

Once installed, start VirtualBox and you will see the screen shown in Figure 2.8a:

Figure 2.8a: Initial VirtualBox Screen

2.8.1 Creating a Virtual Machine

Before you can install an operating system, you need to create a virtual machine. Click the New button to start the new virtual machine wizard. Click the Next button to see the screen in Figure 2.8.1a:

Figure 2.8.1a: Type in a Name and Select the Operating System for the New Virtual Machine

Enter a name for your virtual machine, which can be anything that makes sense to you. Click the Operating System drop down menu and select BSD which will automatically change the Version menu to FreeBSD. Click Next to see the screen in Figure 2.8.1b.

Figure 2.8.1b: Select the Amount of Memory Reserved for the Virtual Machine

The base memory size should be changed to at least 512 MB. If your system has a lot of RAM, you should probably assign more memory to your virtual machine. Any number within the green area is considered a safe value by VirtualBox, meaning it should not slow down your computer too much. When finished, click Next to see the screen in Figure 2.8.1c.

Figure 2.8.1c: Select Whether to Use an Existing or Create a New Virtual Disk

This screen is used to create the virtual hard disk--in other words, the amount of disk space that will be available to the virtual machine. If this is your first virtual machine, keep the default of "Create new hard disk" and click Next. If you have created a virtual machine in the past and wish to reuse its disk space, select "Use existing hard disk" and select it from the drop down menu. You can create as many virtual machines as you wish. However, if your computer is getting low in disk space, you should consider reusing existing virtual hard disks to prevent your hard drive from being used up by old virtual machines.

If you choose to create a new hard disk, the "Create New Virtual Disk Wizard" will launch when you click Next. Click the Next button to see the screen in Figure 2.8.1d.

Figure 2.8.1d: Select the Storage Type for the Virtual Disk

You can now choose whether you want "Dynamically expanding storage" or "Fixed-size storage". The first option uses disk space as needed until it reaches the maximum size that you will set in the next screen. The second option creates a disk the same size as that specified amount of disk space, whether it's used or not. Choose the first option if you are worried about disk space; otherwise choose the second option as it allows VirtualBox to run slightly faster. Once you select Next, you'll see the screen in Figure 2.8.1e.

Figure 2.8.1e: Select the File Name and Size of the Virtual Disk

This screen is used to set the size (or upper limit) of the virtual machine. If you plan to install PC-BSD into the virtual machine, increase the size to at least 15 GB or you will receive an error during the PC-BSD installation. Depending upon your current operating system and if you plan to install PBIs within the virtual machine, you will probably want to choose at least 20 - 30GB. Whatever size you set, make sure that your computer has enough free disk space to support it. Once you make your selection and press Next, you'll see a summary of your choices. You can use the Back button to return to a previous screen if you wish to change any values. Otherwise, click Finish to finish using the wizard. Your virtual machine should now show up in the left box, as seen in the example in Figure 2.8.1f:

Figure 2.8.1f: The New Virtual Machine

Before starting your virtual machine, you will want to configure it to use your installation media. Click the Storage hyperlink in the right frame to access the storage screen seen in Figure 2.8.1g.

Figure 2.8.1g: The Storage Settings of the Virtual Machine

Double-click the word Empty, which represents your DVD reader. If you wish to access the PC-BSD installer from your DVD reader, double-check that the Slot is pointing to the correct location (e.g. IDE Secondary Master) and use the drop down menu to change it if the location is incorrect. Click the CD/DVD Device drop down menu to change it from empty to the Host Drive value.

If you prefer to use an ISO that is stored on your hard disk, click the folder icon to access the Virtual Media Manager screen seen in Figure 2.8.1h.

Figure 2.8.1h: Add an Installation ISO to Boot the Virtual Machine From

Click the Add icon to navigate to the installation ISO you wish to use. Once you press OK, it will show as the CD/DVD device. Click OK to save your changes.

Note: the selected ISO/DVD can be 32-bit, even if you're using VirtualBox on a 64-bit system. Depending upon the extensions available in your CPU, you may or may not be able to run a 64-bit ISO on a 64-bit system. If you receive the error "your CPU does not support long mode" when you try to boot a 64-bit ISO, your CPU either does not have the required extension or AMD-V/VT-x is disabled in the system BIOS.

You're now ready to install PC-BSD into your virtual machine. Simply highlight the virtual machine and click on the green Start icon. A window will open indicating that the virtual machine is starting. If you have a DVD inserted, you should hear it spin and it should start to boot into the installation program. If it doesn't or if you're using an ISO stored on the hard disk, press F12 to select the boot device when you see the message to do so, then press "c" to boot from CD-ROM. You can then proceed through the installation as described in Section 3.

Note: The virtual machine will "capture" your mouse pointer. Use your right Ctrl button if you wish to leave the virtual machine and use your mouse to interact with other applications on your computer. To go back to the virtual machine, simply click anywhere inside the virtual machine and VirtualBox will re-capture your mouse pointer.

2.8.2 Troubleshooting Installations Within VirtualBox

Many PC-BSD testers use VirtualBox to try out and look for bugs in upcoming versions of PC-BSD that aren't yet ready for release. While using a virtual environment allows you to test an operating system without affecting what else is currently installed on the system, there are some tips to be aware of when using VirtualBox.

If the installer program fails to load, try increasing the amount of RAM in the virtual machine. The bare minimum is usually 512 MB, but increasing this value to 1024 or higher will sometimes allow an unbootable ISO to boot into the installer.

If the installation fails and you would like to review the installation log, right-click the virtual machine window and select xterm from the menu. You can now more /tmp/.pc-sysinstall/pc-sysinstall.log to review the log.

Ctrl-f (right ctrl key only) will toggle the virtual machine window in and out of full-screen mode.

The FreeBSD VirtualBox wiki contains additional information that may assist you in troubleshooting VirtualBox issues.

3 Installing PC-BSD

PC-BSD can be installed from the installation media directly onto a hard drive or into a virtual machine using virtualization software such as VmWare Hypervisor or Virtualbox. You can also try PC-BSD without installing it by selecting Live Mode when you boot the installation media.

The PC-BSD installer has made installing PC-BSD as easy as installing Microsoft Windows. The installation of PC-BSD is a fast, easy and straight-forward process. The graphical installer will take you step-by-step through the whole process by asking a few simple questions. Within a short period of time, your PC-BSD system will be installed, configured, and ready to use. Section 3 will walk you through a default install which will be suitable for most users. Users who wish to go beyond a default installation will also want to read Section 4 for Advanced Installation Topics.

3.1 Starting the PC-BSD Installation

Insert either the installation DVD into the computer's DVD drive or insert the USB drive containing the installation media into a USB port. Boot the system and the installation should begin. If the computer instead boots into an existing operating system, reboot and check your computer's BIOS program to ensure that the drive containing the installation media is listed first in the boot order. Save your BIOS changes and reboot.

After a couple of seconds, a series of lines of code will scroll down the screen, meaning that PC-BSD is being loaded. Soon after, you should see a screen similar to Figure 3.1a.

Figure 3.1a: PC-BSD Installer Boot Menu

There are 8 options to choose from:

Boot Installer [default] - Starts the installation program with all standard options enabled. This is the default if you don't select anything else within 10 seconds.

Boot Installer with ACPI disabled - This disables power management, which may be useful for certain BIOS's and laptops. If the installation program hangs while probing your hardware, restart the computer and see if selecting this option makes a difference.

Boot in Live Mode - Select this option if you want to try out PC-BSD without installing it.

Boot in Safe Mode - Select this option if the installation still hangs when probing your hardware and option #2 did not help. It will boot with a forced PIO mode (disabling the use of DMA), disable write caching for all IDE hard drives and CD ROM drives, disable the probing of EISA slots (as very few systems have them), and (on i386 systems) disables the use of ACPI and APICs.

Boot with verbose logging - Select this option if you would like to see more detailed messages during the boot process. This can be useful if you are troubleshooting which piece of hardware is causing the installation to hang.

Boot to emergency console - Advanced users can use this option to fix critical system failures.

Run X in VESA mode - If the installation program is unable to load your video driver, restart the computer and select this option. The installer will default to VESA mode which will work on any system with a video card.

Escape to loader prompt - Advanced users can select this option to issue advanced commands, such as changing kernels or loading kernel modules.

Once you make a selection, the boot splash screen will load. If you'd like to save some time, press any key when prompted, then type in n and press enter when you see this message:

 Check integrity of installer archive?
  This may take several minutes. [y]:

3.1.1 Language Selection Screen

The next screen, seen in Figure 3.1.1a: indicates that the installer successfully loaded and is ready to present you with its options:

Figure 3.1.1a: Welcome and Language Selection Screen

The installer is divided into three logical areas:

The left panel which lists the screens the installer will step through. The current step is highlighted in red text.

The main area in the centre where the installer expects user input.

The bottom navigation bar where you can go forward, backward or Abort the installation.

This screen allows you to select your language. PC-BSD's menus have been translated to several different languages and you can see the status of your native language at the PC-BSD Translation Site. If your language does not show 100% translation at this website, it means that not all of the menus have been translated yet and that the untranslated menus will instead display in English. You are welcome to join the PC-BSD Translators Mailing List if you would like to assist in translating menus to your native language.

By default, PC-BSD menus will display in English, unless you select another language in the drop down menu in this screen.

Unless you specify otherwise, PC-BSD will create a hostname for your computer. If you prefer to set the hostname yourself, check the "Custom hostname" box and input the name you wish to use. The hostname can not contain any spaces.

When you are finished, click Next to go to the next installation screen.

3.1.2 Keyboard Selection Screen

The next screen, seen in Figure 3.1.2a, allows you to change your keyboard model, keyboard layout, and preferred variant. If English is your native language and you are using a basic English keyboard, you can just press Next to accept the defaults.

Figure 3.1.2a: Keyboard Screen Allows you to Select your Keyboard Model, Layout, and Variant

Otherwise, use the menus to change the default selection(s) to match your keyboard type and language. You can test your changes by typing into the white area at the bottom of the screen, just below the message that indicates you can test your selected settings.

3.1.3 System Selection Screen

The next screen, seen in Figure 3.1.3a, allows you to choose between a fresh install (overwrites everything on the install partition), an upgrade (keeps settings from an earlier version of PC-BSD), or to restore from a backup (requires you to have first made a backup using Life Preserver which is discussed in Section 7.7). The default is to do a fresh install.

Figure 3.1.3a: System Screen Allows you to Select the Type of Installation

NOTE: Regardless of which choice you make, make sure you have a backup of your important data as it is always possible for existing data to be overwritten. If you have important data and have not made a backup yet, press the Abort button to leave the installation program, make and verify your backup, then restart the installation program.

This screen also allows you to decide between installing PC-BSD (the default) or FreeBSD. As of version 8.x, the PC-BSD installer does not allow you to select which installation sets get installed with FreeBSD and only performs a base install. This functionality may change in future versions. If you decide to install FreeBSD using the PC-BSD installer and want additional distribution sets, type sysinstall -> Configure -> Distributions after you boot into your FreeBSD system.

Finally, this screen allows you decide whether the installer will copy the files it needs from the DVD/USB image you booted from or from a location over the network.

NOTE: If you are installing from a flash or removable USB device, the installation will fail unless you select the Network/Internet option as the boot-only install needs to access files on the Internet to complete the installation. See Section 4.4 on Installing PC-BSD Over a Network for a demonstration on how to perform the installation over a network.

NOTE: If you are installing PC-BSD as the only operating system on your computer, the default settings are fine and you can click Next to continue. However, if this is not your intent, you will need to review the sections that apply to your situation:

Section 4.1: Upgrading PC-BSD

Section 4.3: Use PC-BSD Installer to Install FreeBSD

Section 4.4: Install PC-BSD Over a Network

Section 4.5: Using a Custom Partition Layout

3.1.4 Disk Selection Screen

The next screen, seen in Figure 3.1.4a, is used to determine which hard drive and partition to install PC-BSD into.

Figure 3.1.4a: Disk Screen Allows you to Select Which Disk to Install PC-BSD Into

NOTE: If you are installing PC-BSD as the only operating system on your computer, simply check the "Use Entire Disk" checkbox then click Next to continue. However, if this is not your intent, you will need to review Section 4.5: Using a Custom Partition Layout.

If your computer contains multiple hard drives, use the drop down menu at the top of the screen to select the drive you wish to install into.

If you let the installer automatically setup your partitions, they will be formatted with UFS using softupdates by default. You can also select that the installer use ZFS. If you select this option, a small UFS formatted /boot partition will be created as well as a swap partition. The rest of the disk will be formatted with ZFS and will contain /, /var, and /usr.

If you wish the /usr partition to be encrypted, check the "Encrypt user data" box. You will be prompted for a passphrase which must be entered every time the system boots. If you wish to encrypt individual partitions, see Section 4.6 on Disk Encryption.

The "Install PC-BSD bootloader" is usually checked if you are installing PC-BSD on a multi-boot system. This box is described in more detail in Section 4.7 on Dual Booting. You should leave this box unchecked if:

you have no plans to use PC-BSD with another operating system on the same computer

you plan to use the Windows boot loader instead

However, if you plan to share the computer with a Linux distribution, you want to check this box. Even though you will probably use the Linux boot loader, this option will create the partition table info that other boot loader will need.

The PC-BSD/FreeBSD boot loader is extremely basic and wasn't designed to look fancy or to be customized. If you select to install it and decide later on to replace it with another boot loader, see Section 4.7 on Dual Booting for other boot loader alternatives.

The "Partition with GPT for full disk install" checkbox needs to be checked if your hard drive is greater than 2 TB in size. You can learn more about this option in Section 4.5, Using a Custom Partition Layout.

3.1.5 Users Creation Screen

The next screen, seen in Figure 3.1.5a, requires you to set the administrative password and to create at least one user account.

Figure 3.1.5a: Users Creation Screen

The administrative password, also known as the root or superuser password, is required for system administration tasks such as installing software, setting up your printer, or changing settings that affect all users. You will need to remember this password for the times that you are prompted for it. Use this screen to type in the password you want to use; you are required to type it in twice to confirm the password.

For security reasons, PC-BSD will not let you login as the administrator; instead it will prompt you for the administrator password whenever it is needed to perform a system task. This means that you need to create a user account that you will use to login to your system. If you share your computer with other users, you should create an account for each user. That way, each user will have their own home directory where they can store their files and not interfere with the files created by other users.

To create a user, complete the following fields:

Username: you need to remember this name as it is used to log in. It is case-sensitive, meaning you have to remember if you use any capitalization. It cannot contain any spaces.

Full name: this name can contain spaces and is used as a description to help you remember who uses this user account.

Password: you will need to type this in twice. If you or another user forget their password, see Section 7.6 to learn how to use Users Manager to reset the password.

Shell: can be left as-is. This option is used by advanced users to choose their default shell when using a command prompt.

When you have filled in the information for the new user, click the +Add button and the user account should appear in the "User Accounts" field underneath. You can click a user name at any time and modify its details. If you change your mind about a user, highlight their entry and click the -Remove button to prevent the user account from being created by the installation.

If you are security conscious or if you share the computer and don't want others to automatically login to your account and access your files, leave the checkbox for "Auto-login User" unchecked. If you check this box, the first user account you create will automatically login to PC-BSD, without being prompted for their username or password.

Click the Next button when you are finished.

3.1.6 Time Selection Screen

This screen, seen in Figure 3.1.6a, allows you to select your time zone from a drop down menu.

Figure 3.1.6a: Time Screen Allows you to Select your Time Zone

There is also a check box that allows your PC-BSD system to automatically connect to a time server on the Internet to ensure it is keeping accurate time. Accurate time is sometimes needed by time-sensitive applications, such as logging into a server that uses Active Directory. You can uncheck this box if you don't think you need it or if your system isn't always connected to the Internet.

If your native language is English and you don't want to install other language support (which does take up disk space), check the box "Remove all other language support files".

3.1.7 Components Selection Screen

This screen, seen in Figure 3.1.7a, allows you to select which software components can be installed with the operating system.

Figure 3.1.7a: Components Screen to Select which Optional Software is Installed with PC-BSD

Highlight the software you would like to install in the "Available Components" box and click the blue > button to add them to the "Selected Components" box. If you change your mind, highlight the item in the "Selected Components" box and click the blue < button. Whatever shows up in the "Selected Components" box when you click the Next button, will be installed for you.

The following components are available:

Mozilla's popular web browser - (firefox)

Full featured office suite - (openoffice)

FreeBSD ports collection - (ports)

FreeBSD system source - (src)

Jail management and administration – (thewarden, discussed in Section 7.8)

Mozilla's popular E-mail client - (thunderbird)

Multimedia player with streaming capabilities - (vlc)

Note: You can still install additional software after PC-BSD is installed using Software Manager which is discussed in Section 6.1. The components in this screen are limited to those that came with the installation media. The advantage to installing here is that they can be installed quickly and don't require a connection to the Internet.

3.1.8 Installation Summary Screen

This screen, seen in Figure 3.1.8a, provides a summary of all of the options you selected in the previous screens.

Figure 3.1.8a: Summary Screen Allows you to Review your Selected Installation Options

You should review this information to make sure it is correct. If you would like to change anything, use the Back button to navigate to the option(s) you would like to change. When finished, click the Next button. A popup message will ask if you want to start the installation. If you're ready, click the Yes button.

Note: this is your very last chance to make sure you're ready. Once you click Yes, the selected hard drive or partition will be formatted and any data it contains will be lost.

3.1.9 Installation Progress Screen

This screen, seen in Figure 3.1.9a, uses a progress bar and messages so you can watch the installation's progress.

Figure 3.1.9a: The Installation Progress Screen Allows you to View the Status of the Installation

How long the installation takes depends upon the speed of your hardware, the installation type you selected, and whether or not any additional software components will be installed. A typical installation takes between 15 and 30 minutes.

3.1.10 Installation Finished Screen

This screen, seen in Figure 3.1.10a, appears once the installation is complete.

Figure 3.1.10a: PC-BSD Installation is Now Complete

You can now remove your installation media and click the Finish button to boot into your PC-BSD installation. If you installed the PC-BSD boot loader, you can choose "FreeBSD" from the list in order to boot into PC-BSD. Otherwise, your computer should load PC-BSD directly without your intervention. You can now proceed to configuring your display settings as described in Section 5.1.

4 Advanced Installation Topics

The previous section discussed a default installation of PC-BSD. This section covers the following advanced installation topics:

Upgrading PC-BSD

Restoring PC-BSD from Backup

Use PC-BSD Installer to Install FreeBSD

Install PC-BSD Over a Network

Using a Custom Partition Layout

Disk Encryption

Dual Booting

Installation Troubleshooting

Creating an Automated Installation with pc-sysinstall

4.1 Upgrading PC-BSD

PC-BSD's installation program makes it easy to upgrade to the latest version of PC-BSD. First, you need to download or obtain a copy of the new DVD for the version of PC-BSD you wish to upgrade to. Boot from the DVD as you would for a regular install, and select the "Upgrade" button when you get to the System settings screen:

Figure 4.1a: Upgrade Option Displays the Currently Installed Version of PC-BSD

As seen in Figure 4.1a, the installer should detect the current installation of PC-BSD and display a short description in the "Select the system to upgrade" box. In this example, PC-BSD 8.0 is currently installed and the user booted using the PC-BSD 8.1 installation DVD.

Highlight the detected version that you wish to upgrade. If you wish to keep the data in your home directory, check the box "Keep current users desktop configuration".

WARNING: As with any operating system upgrade it is always wise to backup important files and data beforehand to an external backup device such as a removable USB drive.

After clicking Next, you will be presented with the Components selection screen where you can choose which new PBIs to install.

The update will now take place, preserving the home data, installed PBIs, /usr/local and user accounts. When the installation is finished, simply reboot and you will booted into the new version of your PC-BSD operating system.

4.2 Restoring PC-BSD from Backup

If you have previously made a full backup of a PC-BSD system using Life Preserver (described in Section 7.7) and have a network connection, you can restore a system from the backup. If you select the "Restore from backup" option in the System screen of the PC-BSD installer, it will prompt you for your backup settings:

Figure 4.2a: Selecting to Restore from an Existing Life Preserver Backup During Installation

You will need to input the following information:

the hostname (if it is present in a DNS server) or IP address of the SSH server storing your Life Preserver backups

the username of the account which Life Preserver uses to login to the SSH server

If the SSH server listens on a non-default port, use the up/down arrows to change 22 to the correct port number.

If your network connection uses a static IP address instead of a DHCP lease, use the drop down menu to change the network interface from AUTO-DHCP to the name of your network interface. Input your system's IP address and subnet mask, the IP address of the DNS server, and the IP address of the default gateway.

When you click Next, the installer will attempt to login to the specified server. If the login is successful, a pop-up window will display the available backups. Choose the desired backup from the drop down menu and click the Select button to exit the pop-up widow. The installer will move on to the Disk screen so you can select which disk/partition to restore to. Once you click Next, the installer will skip to the Installation Summary screen. Click Next to start the restore.

4.3 Use PC-BSD Installer to Install FreeBSD

The System screen of the PC-BSD installer, seen in Figure 4.3a, allows you to install FreeBSD:

Figure 4.3a: Using the PC-BSD Installer to Install FreeBSD

Note: at this time, the PC-BSD installer can only perform a minimal install of FreeBSD. Future versions of PC-BSD may allow you to select your FreeBSD distribution sets.

Simply select FreeBSD and go through the rest of the installation screens. The only difference from a PC-BSD installation is that the Components screen will only allow you to select two components:

FreeBSD ports collection

FreeBSD source

You'll find that this is a very quick install, taking only a few minutes. Once the installation is complete, you will be prompted to click Finish and to remove the installation media. The system will then boot to a FreeBSD login where you can log into a FreeBSD command prompt. If you wish to do any post-configuration, type sysinstall as the superuser.

4.4 Install PC-BSD Over a Network

If you are installing PC-BSD from a boot-only media, you will need an Internet connection to finish the install. When you get to the System screen of the installation, shown in Figure 4.4a, select Network/Internet:

Figure 4.4a: Preparing the System for a Network Install

If you receive your IP address from a DHCP server, leave the Network Interface setting at AUTO-DHCP and click the Next button. Otherwise, click AUTO-DHCP to select the network interface from the drop down menu, then input the values for your network in the IP address, Netmask, Nameserver, and Gateway fields.

Once you click Next, the installer will attempt to use the network; if the connection is successful, you will see a pop-up screen similar to Figure 4.4b:

Figure 4.4b:

Note: if this screen remains greyed out, that means the installer was unable to connect to the network. Double-check your network settings and try again.

Once the network connection is active, you can click the drop down mirrors menu to select a mirror close to your geographic region, then click the Select button to proceed with the installation as usual.

If your company has created a custom installation of PC-BSD that you wish to install from, select "Install from specified server" and input the IP address of the server hosting the installation files and the path to those files. The server can provide the installation files through either FTP or HTTP.

4.5 Using a Custom Partition Layout

A PC-BSD installation assumes that you have an existing primary partition to install into. If your computer has only one disk and PC-BSD will be the only operating system, it is fine to accept the default partitioning scheme. However, if you will be sharing PC-BSD with other operating systems, care has to be taken that PC-BSD is installed into the correct partition; otherwise, you may inadvertently overwrite an existing operating system. See Section 4.7 on Dual Booting if you plan to install PC-BSD onto a computer with multiple operating systems.

During the installation, advanced users have the flexibility of selecting alternate filesystems and to manually set their sizes and mount points. Again, this is optional as the default disk partitioning scheme should work just fine. However, if you are already familiar with the feature differences between various filesystems or would like to try out different filesystems, this section is for you.

Note: PC-BSD uses the same disk terminology as FreeBSD, which is different than the terminology used by Windows or Linux. In FreeBSD, the portion of the disk the operating system is installed into is called a "partition". That partition is then sliced up into "slices", with each slice containing a filesystem and a mount point.

Figure 4.5a shows the Disk screen of the installation. In this example, the user has selected "Customized Disk Partitions (Advanced)", then the "Auto Setup" button:

Figure 4.5a: Using Auto Setup in the Disk Screen of the Installation

Using Auto Setup is a good way to see the default partitioning scheme so that you can decide if you wish to keep or edit the default values. The actual sizes of the slices created by auto setup will vary, depending upon the size of the disk, but always follow this logic:

the default size of the / (root) slice will be 2 GB; this slice holds the root user's home directory as well as the files needed by the operating system. You should not use a size less than 1 GB. Also, it is not a good idea to store large files on the root slice (as it should really be reserved for the operating system files), so you are safe to leave it at the default size.

the default size of the swap partition will be RAM (physical memory) size times 2. You can increase this if you want a larger swap partition (also known as a Paging File or Virtual Memory in Windows).

the default size of the /var slice will be 1 GB. This slice holds data that varies such as logs, printer queues, and the FreeBSD packages database. You can safely increase the size of this partition, though this is usually not needed on a desktop system.

the rest of the disk space will go to /usr. This slice holds everything else, such as users' home directories and installed applications.

If you decide to change the default slices, keep the following points in mind:

you must have a root slice as it holds the operating system; make sure it is at least 1 GB in size.

you really do want a swap partition.

you can have one big root slice (plus a swap partition); if you decide to do this, the installation will make /var and /usr directories within that slice as they are needed by applications. This is often discouraged on server systems, but is an option on desktop systems.

you can divide the space given to /usr into multiple slices. For example, some users like to create separate slices to hold their video files, artwork, work files, etc. When creating multiple slices, use names that makes sense to you (e.g. /usr1, /usr2 or /video, /work) and set sizes that makes sense for the amount of content that the slice will hold. If you decide to take this approach, you should still make a good sized /usr (otherwise it will be placed on root which will quickly fill up the / slice). The size of /usr should be sufficient to store any software you install.

Why do some users create multiple slices or discourage the use of one big slice? The usual answer deals with backups (some people prefer to backup specified, smaller filesystems rather than specified directories) or filesystem corruption (if you lose a filesystem, you haven't lost everything). Since there are many ways to perform backups and it is rare to corrupt a filesystem beyond repair, it becomes a matter of personal preference.

If you click the + (add) or highlight a slice and click the / (edit) button, you will see a screen similar to Figure 4.5b.

Figure 4.5b: Selecting the Filesystem Type

The PC-BSD installer allows you to choose from the following filesystem types:

UFS: the Unix File System is the original filesystem used by BSD systems.

UFS+S: the S adds soft updates to UFS. This means that the computer will boot faster after a crash as it does not have to wait to check that no data was lost during the crash. This is the default filesystem type.

UFS+J: the J adds journaling to UFS, another approach to speeding up boot time after a system crash. This technical paper compares soft updates to journaling.

ZFS: this filesystem was originally developed by Sun and adds many features such as storage pools and snapshots. You can learn more about ZFS at Wikipedia and the FreeBSD Handbook.

swap: choose this filesystem if you are creating a swap partition.

To create or edit a slice:

select a filesystem type from the drop down menu

type in a mount point (e.g. /, /usr, /var, /swap, /movies, etc.)

set the size by either moving the slider, typing in a value, or using the up/down arrows. Note that this won't work if there isn't any free space leftover in the partition; if this is the case, delete a slice and try again.

check the "Enable Encryption" box if you wish to do so. See Section 4.6 on Disk Encryption for more information on this topic.

Once you have reviewed your slices, you need to determine whether or not to check the boxes at the bottom of the screen:

Install PC-BSD bootloader: if PC-BSD will be the only operating system on your computer, you can leave this box unchecked. Check this box if you plan to use the grub bootloader, described in Section 4.7.3, on a multi-boot system. Check this box if a Windows system is already installed and you wish to use the PC-BSD boot loader to select between operating systems. However, if you wish to use EasyBCD, described in Section 4.7.4, to select between Windows and PC-BSD, do not check this box.

Partition with GPT for full disk install: GPT is a partition table layout that supports larger partition sizes than the traditional MBR layout. If any of your slices are larger than 2 TB, this box must be checked. If your computer BIOS supports EFI (most modern systems do), you can also check this box. The only time you should not check this box is on a system with an older motherboard--if it does not understand GPT, the installation will fail and you'll have to try again with the box unchecked. If you're unsure, leave the box unchecked.

When you are finished with your selections, press Next to continue the installation.

4.6 Disk Encryption

The PC-BSD installer allows you to encrypt any or all slices using the FreeBSD GELI framework. This is often desired on laptops that contain confidential information. A cryptographic key is used to encrypt the data and this encryption occurs automatically. In order to access the data on the filesystem, you need to know the passphrase that was used when the key was created. This means that it is important to remember your passphrase, to make the passphrase difficult to guess, and to not give that passphrase to others.

Note: be careful if you have changed your keyboard variant and layout. At this time, GELI only supports QWERTY passphrases, so don't use any characters not found on a QWERTY keyboard.

If you decide to encrypt any slices, you will need to watch your boot messages when the system boots as PC-BSD will prompt you to enter the required passphrase(s) so it can mount the encrypted filesystem(s) and finish booting into PC-BSD.

Note: While it may sound logical that encrypting every slice will increase the security of your system, this is actually not the case. Since most of the data on / and /usr is known (these slices contain your operating system and default applications), encrypting these partitions provides extra cryptographic data which can be used to bypass the encryption. It is usually recommended that only the home directory, which typically contains the data you wish to keep private, is encrypted. If this is your goal, you should create a separate slice called /home using the instructions in Section 4.5, Using a Custom Partition Layout, and encrypt that slice. Additionally, since the / slice contains the encryption keys, it is further recommended not to encrypt this slice. It is possible to do so, but will require you to store the keys on a removable USB drive; if this drive is lost, the operating system will be unbootable.

To encrypt a slice, click "Customize Disk Partitions (Advanced)" in the Disk screen of the installer. You can either click the "Auto Setup" button, as demonstrated in Figure 4.6a, or manually create your partitions using the instructions in Section 4.5, Using a Custom Partition Layout.

Figure 4.6a: The Advanced Disk Partition Screen

Highlight the slice you wish to encrypt and click / (Edit) or click + (Add) to add a new slice. This will open a pop-up screen, similar to the one in Figure 4.6b. If you check the "Enable Encryption" box, you will be prompted to enter and confirm a passphrase:

Figure 4.6b: Configuring Encryption on a Slice

Once you have confirmed your passphrase, click the Save button to return to the previous screen. You can repeat this process for all of the slices you wish to encrypt.

Note: passphrases are case-sensitive and can contain spaces. The passphrase should be memorable to you (e.g. a line from a song or piece of literature), but hard to guess (i.e. people who know you should not be able to guess your favourite line from a song or piece of literature). If you encrypt multiple slices, you can use the same or different passphrases. If you use different passphrases, make sure you can remember them all.

If you encrypt any slices, you will see the message shown in Figure 4.6c when you click Next to proceed to the next installation screen.

Figure 4.6c: Remember to Take a Backup of your Encryption Keys After the Installation is Complete

It is important to remember to make a backup copy of your keys either to another system or to a removable media such as a USB thumb drive. You should do so after your first boot into PC-BSD.

Once the installation is complete, watch your boot messages. When the PC-BSD splash screen loads, press any key so you can continue to see the boot messages. Right after the hard drive is probed, you should see a message similar to this:

ad0: 38154MB <FUJITSU MHT2040AH 846C> at ata0-master UDMA100
Enter passphrase for ad0p5:

If you do not enter the passphrase correctly, you'll be re-prompted:

GEOM_ELI: Wrong key for ad0p5. Tries left: 2.

If you run out of tries, that filesystem will not be mounted. If the filesystem was critical to system bootup, you will be put into single-user mode.

Once the correct passphrase is entered, you'll see a message similar to the following and the boot sequence will proceed.

GEOM_ELI: Device ad0p5.eli created.
GEOM_ELI: Encryption: AES-CBC 128
GEOM_ELI: Crypto: software

4.7 Dual Booting

If you wish to install multiple operating systems on your computer, you will need the following:

a partition for each operating system. Many operating systems, including PC-BSD, can only be installed into a primary partition. This means that you will need to use partitioning software capable of creating multiple primary partitions. We recommend Parted Magic as it is freely available and easy to use. If your hard drive already has an operating system that is using the entire hard drive, Parted Magic can be used to shrink the existing partition in order to create space to create new partitions. When creating the new partition, it does not matter what filesystem is used (as PC-BSD will overwrite it). However, it is important to make sure that the new partition is created as a primary partition. Keep track of the size and order of the partitions that you create so that you can install PC-BSD into the desired partition.

a boot loader that allows you to select which operating system you wish to boot. Depending upon the choice of boot loader and the operating systems that you install, you may or may not have to configure the boot loader to list all of the installed operating systems. Also, depending upon the order that you install the operating systems, the existing MBR data may be overwritten. This section will describe the configuration of several different boot loaders and how to restore an overwritten MBR.

a backup of any existing data--this backup should not be stored on your computer's hard drive but on another computer or on a removable media such as a USB drive or burnt onto a DVD media. If you're careful in your installations, everything should go fine. However, you'll be glad that you made a backup should something go wrong.

When installing PC-BSD onto a computer that is to contain multiple operating systems, care must be taken to select the correct partition in the Disk Selection Screen of the installation. This screen is described in Sections 3.1.4 and 4.5. On a system containing multiple partitions, each partition will be listed. Highlight the partition that you wish to install into and make sure that you do not select a partition that already contains an operating system.

Note: Make sure that the "Use Entire Disk" box is not checked. If you check this box, the installer will overwrite all of the partitions that exist on the disk!

You will also want to pay attention to the "Install PC-BSD bootloader" check box at the bottom of the installer's Disk Setup screen. Whether or not you should check this box depends upon your choice of boot loader:

if you plan to use the PC-BSD boot loader as described in Section 4.7.1, this box must be checked. This is a good choice when Windows is already installed and PC-BSD is to be the only other operating system as both entries should automatically be created for you.

if you plan to use the GAG boot loader as described in Section 4.7.2, you can leave this box unchecked. It will not hurt to check the box, but you will end up being prompted by two boot loaders whenever you boot PC-BSD.

if you plan to use the grub boot loader as described in Section 4.7.3, this box must be checked so that grub can find the PC-BSD boot code.

if you plan to add PC-BSD to the Windows boot loader using EasyBCD as described in Section 4.7.4, do not check this box.

The rest of this section will describe these boot loaders in more detail.

4.7.1 PC-BSD Boot Loader

During the installation of PC-BSD, you will be given the option to install the PC-BSD boot loader in the Disk Selection Screen. You should check this box if:

you wish to use a Linux boot manager, such as grub, to manage your boot menu. Checking this box will install the boot code needed by the Linux boot manager so that it can boot PC-BSD.

Windows is already installed and you wish to use the PC-BSD boot menu to select between the two operating systems. The alternative is to not check this box and to instead add PC-BSD to the Windows boot menu using a program such as EasyBCD, as described in Section 4.7.4.

The PC-BSD boot menu is really the FreeBSD Boot Manager. It should automatically detect your Windows installation and present you with a simple menu as the computer starts to boot. An example from a system that has Windows 7 and PC-BSD installed is seen in Figure 4.7.1a:

Figure 4.7.1a: Example PC-BSD Boot Loader Menu:

F1    Win
F2    Win
F3    FreeBSD

F6    PXE
Boot: F3

The entries in this example are as follows:

F1: Windows 7 creates a small hidden partition at the beginning of the disk to store the Windows Recovery Environment (WinRE) which is used to restore a corrupt system. Since the operating system does not reside here, you will receive an error if you press the F1 key to select this menu option.

F2: press the F2 key to boot into the Windows 7 installation.

F3: press the F3 key to boot into the PC-BSD installation.

F6: this system has a network interface that is capable of booting over the network. Don't press F6 unless you have configured a thin client server to handle PXE boot requests.

The PC-BSD boot loader is not meant to be configurable or to look fancy. If you want a quick way to boot between PC-BSD and Windows, it should just work. If you prefer to use a configurable boot manager, read the following sections.

4.7.2 GAG, The Graphical Boot Manager

GAG is a versatile boot manager, capable of booting many different operating systems. Once you have finished installing all of your operating systems, you can configure GAG to present you with a boot menu containing an entry for each operating system.

After downloading and unzipping GAG, burn the cdrom.iso file to a CD. Insert the CD and reboot the system to configure GAG. You will be presented with the initial GAG screen, shown in Figure 4.7.2a.

Figure 4.7.2a: Initial GAG Screen

Note: Your mouse won't work in GAG. Instead, use the key representing the number or letter of the option that you wish to select.

Press the 4 key in order to "Install GAG". The next screen will prompt you to choose your keyboard type by pressing the associated number key. The next screen will prompt you to choose your language by pressing the associated number or letter key. Once your selections have been made, you'll see a screen similar to Figure 4.7.2b.

Figure 4.7.2b: Press the S Key to Configure GAG

Press the S key to "Setup GAG" and see the screen shown in Figure 4.7.2c:

Figure 4.7.2c: GAG's Main Configuration Menu

Press the A key to "Add a new Operating System". GAG will display an entry for each operating system installed on the computer.

NOTE: If you are dual-booting with Linux, GAG will not find the Linux installation unless grub or lilo is installed in the / or /boot partition of the Linux system.

Press the letter associated with the operating system name. Your PC-BSD entry will probably be displayed as "A5h FreeBSD". When you press the associated letter, a pop-up menu will prompt you to type a description which will be shown in the boot menu. Type in something that is useful to you, such as "PC-BSD 8.2". When you press enter, you will be prompted to type in a password or to press return for no password. If you decide to type in a password, you will need to input this password whenever you wish to boot into that operating system.

Once you press enter, you will see the screen shown in Figure 4.7.2d.

Figure 4.7.2d: Selecting an Icon for the Boot Menu Entry

Press the letter representing the icon that you wish to associate with the operating system--it will be displayed next to the description in the boot menu. For example, you could press F to associate the FreeBSD Beastie icon next to the "PC-BSD 8.2" description. Once you press enter, you will be returned to the main menu. Press A again to add another operating system and repeat this process for each operating system that you wish to boot.

When you are finished, press H to "Save in Hard disk". You should receive a pop-up message indicating that "GAG installed successfully". You can now press R to "Return to main menu". You'll note that the screen shown in Figure 4.7.2b now contains the entries for the operating systems that you added. Remove the CD and press the key associated with the operating system you wish to boot.

Now, whenever you reboot your system, this same menu will appear. It will always contain the S option so that you can add or delete operating system entries, set the boot passwords, or set the boot timer.

4.7.3 Grub

Many Linux distros use grub as the boot loader. This section shows you how to add PC-BSD to an existing grub menu.

While booted into the Linux system, use the grub command line tool to list all devices that can be seen by grub's drivers. This will help you work out what drive options to use when setting the root option in the examples below.

sudo grubgrub> ls
grub> quit

There are two versions of grub that are in use. To see which version your Linux distro is using:

grub> grub --version

4.7.3.1 Adding PC-BSD to Grub Version 1

If the version number is less than 2, you are using legacy grub. Here is an example of adding PC-BSD to a Linux distro that is using grub version 1:

title  PCBSD 8.1
root   (hd0,1)
kernel /boot/loader

Title: This will be the text that is shown in the boot menu and can be anything that makes sense to you.

Root: The root of the partition containing PC-BSD. In the above example, PC-BSD is installed on the first hard disk (hd0) and on the first partition (,1). Start counting your hard disk from zero (e.g. disk 0 for the first hard disk, disk 1 for the second hard disk) and your partition from one (e.g. 1 for the first partition on that disk, 2 for the second partition, etc.)

Kernel: Used to load the primary boot image. For FreeBSD and PC-BSD, always use /boot/loader.

For more information on using grub version 1, refer to the Grub Legacy Manual.

4.7.3.2 Adding PC-BSD to Grub Version 2

If the version number is 2 or higher, the entry would look something like this:

title  PCBSD 8.1
root   (hd0,1,a)
kernel /boot/loader
boot

Here are some examples of more complex grub version 2 entries:

To set some sysctl values when loading the kernel:

menuentry "PCBSD (FreeBSD) 8.1" {
 insmod ufs2
 set root=(hd0,3)
 kfreebsd /boot/kernel/kernel
 set KFreeBSD.vfs.root.mountfrom=ufs:dev/label/rootfs0
 set KFreeBSD.vfs.root.mountfrom.options=rw
}

To use the specified drive UUID:

First, at a command prompt in the PC-BSD system, determine the UUID with this command:

/usr/local/sbin/grub-probe -d /dev/ad4s1 -t fs_uuid

Then, use that UUID in the grub menu entry:

menuentry "FreeBSD ad4, direct" {
 insmod ufs2
 set root=(hd0,1,a)
 search --no-floppy --fs-uuid --set 4b22f9090565ab77
 kfreebsd /boot/kernel/kernel
 kfreebsd_loadenv /boot/device.hints
 set KFreeBSD.vfs.root.mountfrom=ufs:/dev/ad4s1a
 set KFreeBSD.vfs.root.mountfrom.options=rw
}

To use ZFS on GPT Partition:

menuentry "FreeBSD" {
         insmod zfs
         search -s -l freepool
         kfreebsd /freebsd@/boot/kernel/kernel
         kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
         kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
         kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
         set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
}

After a Grub2 configuration change you need to run update-grub as the superuser or sudo update-grub.

For more information please refer to the Grub 2 manual.

4.7.4 Dual Boot with Windows Using EasyBCD

EasyBCD was developed by the non-profit NeoSmart Technologies to make it easy to add other operating system entries to the the Windows boot loader. EasyBCD allows you to add entries for multiple Windows installations as well as Linux, BSD, and Mac OS X.

Note: if you wish to use the Windows boot loader, it is important not to over-write the Windows MBR when you install the other operating systems. If you install Windows last, there is no problem as it will over-write the existing MBR for you. If you install another operating system after Windows, you have to be careful not to overwrite the Windows MBR. In the case of PC-BSD, this means that you do not check the box "Install PC-BSD bootloader" in the Disk Selection screen of the PC-BSD installer. If Windows is already installed, you'll notice that when you reboot after the PC-BSD installation, it will automatically boot into Windows. Don't worry, PC-BSD is still there. You just need to add an entry for it to the Windows boot loader.

After booting into Windows, download the latest version of EasyBCD. Once installed, launch EasyBCD. The initial screen will show the current Windows bootloader. As seen in the example in Figure 4.7.4a, it will be set to boot Windows only.

Figure 4.7.4a: Viewing the Windows Boot Loader Entries Using EasyBCD

Click the "Add New Entry" button to add an entry for your PC-BSD installation. In the Linux/BSD tab, click the "Type" drop down menu and select FreeBSD from the list. Type in something useful in the "Name" field; whatever you type here will show up in the boot menu. Click the "Device" drop down menu and select the partition holding your PC-BSD installation. It won't have a drive letter and will have a filesystem type other than NTFS or FAT32. The entry will also show its size so you can find it if you have other non-Windows partitions. An example is seen in Figure 4.7.4b.

Figure 4.7.4b: Adding an Entry for PC-BSD to the Windows Boot Loader

Once you've made your selections, click the "Add Entry" button. If you then click on the "View Settings" button, you should see a new entry for your PC-BSD installation. Figure 4.7.4c shows an example entry; click the "Edit Boot Menu" button to see your entries.

Figure 4.7.4c: Viewing the New Entry in EasyBCD

Once you reboot, a simple boot menu will appear containing entries for Windows and PC-BSD. A sample menu is shown in Figure 4.7d. Use your arrow key to select the operating system you wish to boot into.

Figure 4.7.4d: Sample Boot Menu Created by EasyBCD

4.7.5 Recovering Windows Boot Loader after Installing PC-BSD

If you accidentally overwrite your Windows boot loader, you may be unable to boot into Windows after installing PC-BSD. For example, if Windows is already installed and you check the "Install PC-BSD bootloader" checkbox during the installation of PC-BSD, you might overwrite the Windows boot loader. Depending upon the version of Windows, the PC-BSD boot loader may or may not provide an entry to boot into Windows. However, assuming you haven't accidentally installed PC-BSD into the Windows partition, your Windows installation is still there.

It is possible to restore the Windows boot loader. How to do so varies by the version of Windows:

How to Reinstall XP Bootloader

How to Restore Vista Boot Manager

How to Manually Repair Windows 7 Boot Loader Problems

Once the Windows boot loader is recovered, you can use EasyBCD, as described in Section 4.7.4, to add an entry for PC-BSD to the Windows boot loader.

4.8 Installation Troubleshooting

Installing PC-BSD is usually an easy process that "just works". However, sometimes you will run into a problem. This section will look at solutions to the most common installation problems.

4.8.1 Installation Fails

The PC-BSD installer creates a log which keeps a record of all the steps that completed as well as any errors. Should the installation fail, you can access this log to see what went wrong. To access a terminal, right-click an area on the desktop outside of the installation window and select xterm from the menu. You can read the log with this command:

more /tmp/.pc-sysinstall/pc-sysinstall.log

If you can't figure out how to fix the error or believe that you have discovered an installation bug, you can send this log to the Support mailing list. You'll probably want to get a copy of the log onto a working system so you can send an email using your favourite email program. One way to do this is to copy the log to a USB thumb drive. This command assumes that the thumb drive has been inserted and is formatted with the FAT filesystem:

mount -t msdos /dev/da0s1 /mnt
cp /tmp/.pc-sysinstall/pc-sysinstall.log /mntumount /mnt

If your network connection is active (you can check with ifconfig), you can sftp the file to an SSH server. In this example, the user has an account on the SSH server with an IP address of 10.0.0.1 and wishes to copy the log file to their Downloads directory:

/usr/bin/sftp user@10.0.0.1:/home/user/Downloadssftp> put /tmp/.pc-sysinstall/pc-sysinstall.logsftp> bye

4.8.2 No PC-BSD Welcome Screen

If you can't get to the boot screen, seen in Figure 4.8a, try unplugging as many devices as possible, such as webcams, scanners, printers, USB mice and keyboards. If this solves the problem, plug in one piece of hardware at a time, then reboot. This will help you pinpoint which device is causing the problem.

Figure 4.8a: PC-BSD Welcome Screen

It could be that your BIOS is set to prefer your built-in graphics capability or a non-existent graphics card. On some systems it is determined by the order of the devices listed, the preferred device should be first in the series. If you cannot see your BIOS settings you may need to move a jumper or remove a battery to make it revert to the default of built-in graphics, if applicable. Check your manual or contact your manufacturer for details.

4.8.3 ACPI

If unplugging all of your external devices does not solve your problem, try selecting the menu option to disable ACPI.

4.8.4 Computer Freezes

If your computer freezes after the installation boot menu (while probing hardware) and unplugging extra devices or disabling ACPI does not fix the problem, it is possible that the installation media is corrupt. If the MD5 on the file you downloaded was correct, try reburning the file and double-check that you are using your burning software correctly (e.g. are not choosing a burning speed faster than your DVD drive supports).

If the system freezes after the PC-BSD boot splash screen loads and you suspect that configuring the video card is causing the system to freeze, review your system's BIOS settings. If there is a setting for video memory, set it to its highest value.

If that change did not help, try rebooting and selecting option 7 from the boot menu. This will open the boot loader prompt where you can type the following commands:

unloaddisable-module vesaset module_path=/boot/kernel; /boot/modules;CONSOLEboot

That will disable the vesa splash screen and boot the system to an emergency console. From there you can try vesa mode, or drop to a shell and modify /etc/X11/xorg.conf to change settings.

4.8.5 LBA

A not uncommon cause for problems is the LBA (Logical Block Addressing) setting in the BIOS. If your PC is not booting up before or after installation, check your BIOS and turn LBA off (don't leave it on automatic).

4.8.6 Monitor Detection

It is possible to rerun the display settings utility again if PC-BSD starts up with the wrong resolution or video card driver. To rerun this utility, reboot the computer and select "7. Run the Display Wizard" from the welcome to PC-BSD menu. This will toggle the "disabled" to "enabled". After making this selection, press enter to continue booting the system.

Note: PC-BSD 9.0 will add a control panel setting to change your display, meaning that you will no longer have to reboot to access this utility.

If none of the above has fixed your problem, search the PC-BSD forums to see if a solution exists, try a Google search, or check Section 8 on Finding Help.

4.9 Creating an Automated Installation with pc-sysinstall

PC-BSD provides a set of scripts that allow advanced users to create automatic or customized PC-BSD installations. pc-sysinstall is the name of the master script; it reads a customizable configuration file and uses dozens of backend scripts to perform the installation. All of the scripts are Bourne shell scripts, making them fairly easy to read and understand.

Everything used by the pc-sysinstall script can be found in the /PCBSD/pc-sysinstall/ directory:

# ls -F /PCBSD/pc-sysinstallbackend/             backend-query/       conf/                examples/
backend-partmanager/ components/          doc/                 pc-sysinstall*

Tip: if you wish to start a customized installation from a non-PCBSD system, you can install this directory by running the following command. Note that all files will be copied to the current directory. This command assumes that you are on a Unix-like system (e.g. Linux or Mac OS X) and that subversion is installed. You can install a Unix-like environment on a Windows system using Cygwin.

svn co svn://svn.pcbsd.org/pcbsd/stable/pc-sysinstall

Here is a quick overview of the contents of the /PCBSD/pc-sysinstall/ directory:

backend/ contains the scripts used by the PC-BSD installer. Scripts have been divided by function such as functions-bsdlabel.sh and functions-installcomponents.sh. If you've ever wondered how the PC-BSD installer works, read through these scripts. This directory also contains the parseconfig.sh and startautoinstall.sh scripts which pc-sysinstall uses to parse the configuration file and begin the installation.

backend-partmanager/ contains the scripts which are used by the installer to create and delete partitions.

backend-query/ contains the scripts which are used by the installer to detect (e.g. detect-nics.sh) and configure (e.g. enable-net.sh) hardware.

components/ contains subdirectories, one for each software component that is available for installing with the operating system (e.g. firefox, openoffice). Each subdirectory contains the description (component.cfg), an example of a translated description (component.cfg.uk), a logo (component.png), and the installation script for the software (install.sh).

conf/ contains the configuration file for pc-sysinstall (pc-sysinstall.conf). It also contains a file indicating which localizations are available (avail-langs), a list of files which aren't touched during an upgrade (exclude-from-upgrade), and a licenses subdirectory containing text files of applicable licenses (e.g. bsd-en.txt and nvidia-en.txt).

doc/ contains the help text that is seen if you run pc-sysinstall without any arguments.

examples/ contains several example configuration files for different scenarios (e.g. upgrade, fbsd-netinstall). The README file in this directory should be considered as mandatory reading before using pc-sysinstall.

pc-sysinstall this is the script that is used to perform a customized installation.

To create a custom installation, perform the following steps:

1. Determine which variables you wish to customize.

2. Create a customized configuration.

3. Create a custom installation media.

These steps are discussed in more detail below.

4.9.1 Determine Which Variables you Wish to Customize

A list of possible variables can be found in /PCBSD/pc-sysinstall/examples/README and in Table 4.9.1. Note that the Table is meant as a quick reference to determine which variables are available. The README file contains more complete descriptions for each variable.

Table 4.9.1: Available Variables for Customizing a PC-BSD Installation

Variable

Options

Description

hostname=

should be unique for the network

installMode=

fresh or upgrade

sets the installation type

installInteractive=

yes or no

set to no for automated installs without user input

netDev=

AUTO-DHCP or FreeBSD interface name

type of network connection to use during the installation

netIP=

IP address of interface used during installation

only use if netDev= is set to an interface name

netMask=

subnet mask of interface

only use if netDev= is set to an interface name

netNameServer=

IP address of DNS server

only use if netDev= is set to an interface name

netDefaultRouter=

IP address of default gateway

only use if netDev= is set to an interface name

netSaveDev=

AUTO-DHCP or FreeBSD interface name

type of network configuration to enable on the installed system; can set multiple interfaces

netSaveIP

IP address of interface

only use if netSaveDev= is set to an interface name

netSaveMask

subnet mask of interface

only use if netSaveDev= is set to an interface name

netSaveNameServer

IP address of DNS server

only use if netSaveDev= is set to an interface name

netSaveDefaultRouter

IP address of default gateway

only use if netSaveDev= is set to an interface name

disk0=

disk device, such as ad0

see README for examples

partition=

all, free, s1, s1, s3, s4

see README for examples

mirror=

disk device such as ad1

sets the target disk for the mirror (e.g. the second disk)

mirrorbal=

load, prefer, round-robin, split

defaults to round-robin if the mirror balance method is not specified

bootManager=

none, bsd

commitDiskPart

this variable is mandatory and must be placed at the end of each diskX= section; create a diskX= section for each disk you wish to configure.

commitDiskLabel

this variable is mandatory and must be placed at the end of disk's partitioning settings. See the README for examples on how to set the <File System Type> <Size> <Mountpoint> entries for each disk.

installMedium=

dvd, usb, ftp, rsync

installType=

PCBSD, FreeBSD

installFile=

e.g. fbsd-release.tbz

only set if using a customized installer archive

packageType=

tar, uzip, split

the archive type on the installation media

ftpPath=

e.g. ftp://ftp.pcbsd.org/pub/8.0/netinstall

location of the installer archive when using a installMedium=ftp

rsyncPath=

e.g. life-preserver/back-2009-11-12T14_53_14

location of the rsync data on the remote server when using installMedium=rsync

rsyncUser=

username

set when using installMedium=rsync

syncHost=

IP address of rsync server

set when using installMedium=rsync

rsyncPort=

port number

set when using installMedium=rsync

installComponents=

e.g. amarok,firefox,ports

components must exist in /PCBSD/pc-sysinstall/components/

upgradeKeepDesktopProfile=

yes or no

specify if you wish to keep your existing user's desktop profile data during an upgrade. The default is NO, and your existing profile will be moved to .kde4.preUpgrade automatically.

rootPass=

set the root password of the installed system to the specified string

userName=

case sensitive value

create a separate block of user values for each user you wish to create

userComment=

description text can include spaces

userPass=

case sensitive value

userShell=

e.g. /bin/csh

path to default shell

userHome=

e.g. /home/username

path to home directory

userGroups=

e.g. wheel,operator

comma separated (no spaces) list of groups

commitUser

mandatory, must be last line in each user block

runCommand=

path to command

run the specified command within chroot of the installed system, after the installation is complete

runScript=

path to script

runs specified script within chroot of the installed system, after the installation is complete

runExtCommand=

path to command

runs a command outside the chroot

timeZone=

e.g. America/New_York

location must exist in in /usr/share/zoneinfo/

enableNTP=

yes or no

localizeLang=

e.g. en

sets the system console and Desktop to the target language

localizeKeyLayout

e.g. en

updates the system's xorg config to set the keyboard layout

localizeKeyModel=

e.g. pc104

updates the system's xorg config to set the keyboard model

localizeKeyVariant=

e.g. intl

updates the xorg config to set the keyboard variant

autoLoginUser=

username

make sure there is a user block to create this user

4.9.2 Create a Customized Configuration

Read through the configuration examples in /PCBSD/pc-sysinstall/examples/ to find the one that most closely matches your needs. Copy that file (to any location) and customize it so that it includes the variables and values you would like to use in your installation.

If you wish to perform a fully automated installation that does not prompt for any user input, you will also need to review and customize the /PCBSD/pc-sysinstall/examples/pc-autoinstall.conf file.

Table 4.9.2 shows some additional variables that are available for fully automatic installations. Descriptions can be found in the /PCBSD/pc-sysinstall/examples/pc-autoinstall.conf file. Note that the variables in this file use a different syntax than those in Table 4.9.1 (e.g. values follow a colon and space rather than the equals sign).

Table 4.9.2.: Additional Variables for Automated Installations

Variable

Options

Description

confirm_install

yes

should be set, otherwise booting the wrong disk will result in a system wipe

shutdown_cmd

shutdown -p now

good idea to run a shutdown, but can be any command/script you wish to execute post-install

nic_config

dhcp-all or <interface name><IP address><subnet mask

will attempt dhcp on all found NICs until the installation file can be fetched or will setup specified interface

nic_dns

IP address of DNS server to use during fetch

nic_gateway

IP address of default gateway to use during fetch

4.9.3 Create a Custom Installation Media

The installation media can be a CD, DVD, USB, or a directory on an HTTP, FTP, or SSH+rsync server.

The easiest way to create a custom installation media is to modify an existing installation image. For example, if you have downloaded an ISO (CD or DVD) for the PC-BSD version that you wish to customize, the superuser can access the contents of the ISO as follows:

mdconfig -a -t vnode -f PCBSD8.1-x86-DVD.iso -u 1
mount -t cd9660 /dev/md1 /mnt

Make sure you have cd 'd into a directory where you would like to copy the contents of the ISO. In the following examples, /tmp/custominstall was created for this purpose:

cd /tmp/custominstalltar -C /mnt -cf - . | tar -xvf -umount /mnt

Alternately, if you have inserted an installation CD or DVD, you can mount the media and copy its contents to your desired directory:

mount -t cd9660 /dev/cd0 /mntcp -R /mnt/* /tmp/custominstall/umount /mnt

Note: if you are using an HTTP, FTP, or SSH server as the installation media, untar or copy the files to a directory on the server that is accessible to http/ftp/ssh users. Be sure to configure the server so that the installation files are accessible to the systems that you wish to install.

If you are creating an automated installation, copy your customized /PCBSD/pc-sysinstall/examples/pc-autoinstall.conf to /tmp/custominstall/boot/.

Copy your customized configuration file to /tmp/custominstall/. Double-check that the installMedium= variable in your customized configuration file is set to the type of media that you will be installing from.

You may also need to add some extra files if you set the following variables in your custom configuration file:

installComponents= make sure that any extra components you wish to install exist in extras/PBI/ (if they end in the .pbi extension) or extras/components/ (if they end in .tbz)

runCommand= make sure the command exists in the specified path

runScript= make sure the script exists in the specified path

runExtCommand= make sure the command exists in the specified path

If the installation media is a CD or DVD, you will need to create a bootable media that contains the files in your directory. To create a bootable ISO:

cd /tmp/custominstallmkisofs -V mycustominstall -J -R -b boot/cdboot -no-emul-boot -o myinstall.iso

You can then use your favourite burning utility to burn the ISO to the CD or DVD media.

To begin an installation that requires user interaction:

/PBCBSD/pc-sysinstall/pc-sysinstall -c /path_to_your_config_file

To begin a fully automated installation, insert the installation media and reboot. Or, run the following command:

/PBCBSD/pc-sysinstall/pc-sysinstall start-autoinstall /path_to_your_config_file

5 Exploring PC-BSD

Once you've installed PC-BSD, you'll want to become familiar with your desktop environment. This section discusses the following topics:

Display Settings

Logon to PC-BSD

Installing True Type Fonts

Java and Flash

Multimedia

Input Methods

KDE Desktop

Working with Directories and Files

Remote Desktop Sharing

5.1 Display Settings

Once PC-BSD has finished booting for the first time, you will see the Display Settings screen shown in Figure 5.1a:

Figure 5.1a: Display Settings Wizard

Here you can select your desired screen resolution, color depth and the video driver. By default, PC-BSD should list the name of your video card. However, it will select the "vesa" driver which should always work but will give you sub-optimal performance. You should click on the drop down menu and change "vesa" to the driver that most closely matches your video card name.

You can also use the drop down menus to change the screen resolution and color depth values. If the value you desire is not listed, it may be that the selected driver does not support that resolution or depth.

Advanced users can select their monitor's horizontal sync and vertical refresh rate in the Advanced tab, seen in Figure 5.1b:

Figure 5.1b: Advanced Tab of Display Settings

Use caution and refer to your monitor's documentation if you make any changes here. If you're not sure what you're doing, leave the default values as-is.

If your computer is connected to two monitors, check the box "Enable Dual-Head support".

When you are finished, click the "Apply" button for your settings to be saved and tested. If anything goes wrong during testing, you should be taken back to this "Display Settings" screen, so you can amend the details. If you're happy with the resolution, click "Yes" in the next step. Click "No" to return to the "Display Settings" screen and try other settings.

If you wish to return to this screen at a later time, you will need to reboot the computer and select "7. Run the Display Wizard" from the boot menu, as seen in Figure 5.1c. This will toggle the "disabled" to "enabled". After making this selection, press enter to continue booting the system.

Figure 5.1c: PC-BSD Boot Menu

Note: PC-BSD 9.0 will add a control panel setting to change your display, meaning that you will no longer have to reboot to access this utility.

5.2 Logon to PC-BSD

Once you have finished configuring your display settings, you will either be presented with a login screen or automatically login to PC-BSD, depending upon whether or not you checked the the "Auto-login user" checkbox in the User Creation screen during installation. Figure 5.2a shows an example of a login screen.

Figure 5.2a: PC-BSD Login Screen

Should you logout of your session, you will be returned to the login screen, even if your user account has been set to auto-login. To logout of your current session, go to Application Launcher -> Leave -> Logout. A popup menu will ask you to confirm your selection; simply click the word Logout to continue leaving your session.

Note: to remove this extra prompt, go to Application Launcher -> System Settings -> Startup and Shutdown -> Session Management and uncheck the "Confirm logout" box.

To log into a session, input your password and press enter. If your computer has multiple user accounts, you can type in the username to login as a different user. Note that PC-BSD will not let you login as the root user account for security reasons.

If you wish to log into a different window manager, click the session button in the lower left corner (it is a circle with 3 lines). This will present a menu of installed window managers; simply select the desired window manager and input your password to login. The login manager will assume that you wish to log into the last window manager used, unless you select a different one from the session manager menu.

If you wish to install another window manager, see if it exists in the Window Managers category of Software Manager.. If you install another window manager using Software Manager, it will automatically add it to the session manager window for you.

Note: PC-BSD 9.0 will allow you to install window managers both at installation time and afterwards.

5.3 Installing True Type Fonts

If you would like to install Microsoft True Type fonts, click on the Software Manager icon on your Desktop. Search for "fonts" in the search bar and you should see a result similar to Figure 5.3a:

Figure 5.3a: Using Software Manager to Install MS TrueType Fonts

Click the download button to install the fonts PBI. It will automatically setup your system to use these fonts.

If you already have a collection of fonts that you have downloaded or purchased, you can configure your PC-BSD system to use these as well using the Font Installer utility.

Click the KDE menu → System Settings → Font Installer to start this utility. In Figure 5.3b, "All Fonts" is currently selected under the Group column, showing all of the fonts installed on this system.

Figure 5.3b: Using Font Installer to Install Fonts

To install your fonts, highlight "Personal Fonts" under the Group column, then click the +Add button. This will allow you to browse to the font you wish to add. You can add multiple fonts in the same directory by holding down the Ctrl key while making your selection. Click the Open button, which will install the font for you. When it is finished, you will see the message in Figure 5.3c.

Figure 5.3c: Fonts Have Been Successfully Installed

Your newly installed font(s) should now show up in the "Personal Fonts" section in the Groups column and be available to the applications you use.

5.4 Java and Flash

PC-BSD installs and configures the Adobe Flash player (version 10) plugin for you. This means that flash should "just work" when browsing the web. You'll find several web browsers in the Web Browsers category of Software Manager, including Firefox, Opera, and Chromium.

Software Manager also allows you to install the Java Development Kit (JDK, used by Java developers) and the Java Runtime Environment (JRE, used by java applications). Simply search for "java" within Software Manager if you wish to install these applications.

5.5 Multimedia

Your PC-BSD system has been pre-configured to allow you to play multimedia in many formats. For example, if you insert a music CD or a video DVD, device notifier will indicate that a new media is available and will offer options for accessing that media. Figure 5.5a shows an example with a music CD inserted:

Figure 5.5a: Options for Accessing a Music CD

In this example, the user can choose to play the CD using VLC (which was installed with Software Manager), with KsCD (which was installed with PC-BSD), or to browse the contents of the CD using File Manager. The user can also choose to click the eject button (circle with up arrow), which will open the media tray so the CD can be removed. You'll find additional media players in Application Launcher -> Applications -> Multimedia.

While web browsing, you should be able to play most media formats, including Youtube videos, Internet radio, and many trailer and movie sites.

Note: If you happen to come across a file that you can not play in a web browser or media player, it is probably because it is in a proprietary format that requires a licensing fee or restricts distribution of the codec that is required to play that media format.

The Multimedia category of Software Manager contains several dozen applications for playing and editing multimedia. It includes these popular applications (click the links to view screenshots):

Amarok: music player that includes integrated support for many web services such as Last.fm, Magnatune, Echo Nest, Ampache, MP3Tunes, Jamendo, OPML, and Librivox.

Ardour: digital audio workstation that provides non-destructive, non-linear editing with unlimited undo and more than 200 LADSPA & LV2 plugins.

aTunes: full-featured audio player and manager that can play mp3, ogg, wma, wav, flac, mp4 and radio streaming, allowing users to easily edit tags, organize music and rip audio CDs.

Audacity: multilingual audio editor and recorder.

gtkpod: graphical user interface for the Apple iPod.

Miro: HD video player that can play almost any video file and offers over 6,000 free Internet TV shows and video podcasts.

Rhythmbox: integrated music management application

5.6 KDE Desktop

The first time you login to PC-BSD, you'll be presented with the KDE desktop environment. KDE provides many features and applications. However, it is hardware intensive and may run slowly on a computer with an older processor or a small amount of RAM. If you find KDE too slow for your needs or prefer to use a leaner desktop environment, you can logout and select another window manager as described in Section 5.2 on Logon to PC-BSD.

This page will describe the default desktop. Note that any KDE application can be started from another window manager if you issue the command from a command line or add the path to the command to the window manager's application launcher menu.

By default, four icons are installed on the default desktop for you:

- PC-BSD Website: provides a shortcut to pcbsd.org.

Ports Jail: used by advanced users to install FreeBSD ports or packages. See Section 6.2 on Using Ports Jail for more details.

Software Manager: used to install, uninstall, and upgrade PBIs. See Section 6.1 on Using Software Manager for more details.

Users Handbook: provides quick access to the online version of the PC-BSD Users Handbook (this document).

5.6.1 KDE Panel

The taskbar, also known as the KDE panel, is located at the bottom of the desktop. It contains the following icons and areas, going from left to right. If you hover over an icon with your mouse, it will display its name and description. If you right-click an icon, you can access its settings or remove it from the panel.

Note: the look and order of icons may vary slightly, depending upon your version of PC-BSD.

Application Launcher: used to start applications. Application Launcher is discussed in more detail in the next section.

The middle section of the panel doesn't contain anything by default. When you open an application, its icon is placed here, allowing you to see which applications are currently open. Click an application's icon to minimize its window or to bring its window back onto the desktop.

Pager: used to switch between virtual desktops; click on the square representing the desktop you wish to switch to. Each virtual desktop can have its open windows. This allows you to group your tasks into logical workspaces; for example, some users may do their gaming on one virtual desktop, their graphics design in another, and their homework on yet another.

Device Notifier: if you hover over this icon it will show you any inserted media (e.g. a USB thumb drive or a DVD) as well as any recognized filesystems (e.g. a FAT32 filesystem from a Windows installation on a dual-boot computer). A pop-up menu will appear over device notifier when a media is inserted. If you click device notifier, you can access the media or eject it as described in Section 5.5 on Multimedia.

Show the Plasma Dashboard: if you click this icon a small item labeled "Widget Dashboard" will appear at the top of your screen and your panel will temporarily disappear. If you right-click this item, a pop-up menu will appear that allows you to configure icons, widgets, panels, and activities. The Plasma Guide can get you started with these configurations, but you will probably find that some experimentation will let you discover the features that you are interested in. When you are finished, click the red X to close the widget dashboard and return to the panel.

Show Desktop: clicking this icon will minimize all open windows and show only the desktop. Click the icon again to return to the open windows.

Clock: if you hover over the clock, it will display the current date and time. A click over it will show the calendar. Right-click the clock to change the time, timezone or set its appearance.

System Tray: the system tray itself is the area to the right of the clock. Depending upon the number of icons in the tray, they may or may not all be displayed. Click the arrow button to enable or disable the viewing of all the system tray icons.

Notifications and Jobs: when the system has a message for you (for example, a new device is detected or a download is complete), a pop-up message will momentarily appear over this icon and the icon will change slightly to indicate that there is a new message. Click the icon to read the message. If you click the X in the upper right corner of the message to remove the notification the icon will return to its original state.

Network Device: if any network interfaces were detected during installation, an icon for each will appear in the system tray. Hovering over the icon will shows the current settings for the interface; for example, if it is connected and if it has an IP address. You can add or remove icons for your network devices in Application Launcher -> System Settings -> System Network Configuration. Highlight the desired interface and check or uncheck the "Display system tray icon".

IBus input method framework: if you right-click this icon and select Preferences, you can select the input method for your native language. You can learn more about IBus here.

Update Manager: the look of this icon will change depending on whether or not the PC-BSD operating system and any installed PBIs are up-to-date. The various update icons and how to use Update Manager are described in Section 6.1.

Klipper: is a utility that keeps a history of your latest cuts/copies so that you can paste them. Right-click the icon to view your history; if you click on a history item it will allow you to paste it. You may want to review the "Configure Klipper" menu item as it allows you to set the size of the history. If you want to paste images as well as text, uncheck the "Text selection only" box while in the "Configure Klipper" menu. The Help menu option will open the Klipper Handbook where you can learn more about using Klipper.

KMix: click this icon to see a bar that lets you increase/decrease the sound level. It also provides a Mixer button which you can click to configure your audio channels. If you press F1 while in KMix, it will open the KMix Handbook which shows you how to use this utility.

Keyboard Layout Switcher: this icon will indicate the keyboard layout that was selected during installation. To change the layout or variant, right click the icon and select Configure from the menu. Click F1 while in this menu to read the Kxkb Handbook and learn more about the layout configuration options.

Desktop Search: if you right-click this icon and select "Configure File Indexer" from the menu, you can view and configure your Strigi settings. Pressing F1 while in this menu will open up the Nepomuk Desktop Search Configuration Handbook which will describe these settings. Nepomuk allows you to tag and comment files in Dolphin and to find files by searching their metadata.

KOrganizer: is KDE's organizer utility and reminder daemon. If you double-click this icon, you can view a calendar and create reminders, events, and to-do lists. Pressing F1 while in this menu will open a comprehensive KOrganizer Handbook so you can learn how to get the most out of this utility.

Battery Monitor: if you hover over this icon on a laptop it will show the percentage of battery power and whether or not the battery is online/charging.

Trash: if you delete a file in Dolphin, it isn't deleted immediately. Instead, it is stored in the trash can. Your trash can icon will change slightly if there are items in it. If you hover over the icon, it will tell you how many items are in the trash can. Right-click the icon to open or empty the trashcan or to modify its settings. Note: if you delete a file at the command line it does not go to the trash can; instead it is immediately deleted.

Panel Tool Box: if you click or right-click this icon, you can add or lock widgets, add or edit the panel, add spacers or change the size of the panel, or access even more settings. This page can get you started; again, you will want to experiment to see what features/settings you like.

Note: should you delete the original panel, you will have to manually re-add all of its icons and widgets if you decide to create another panel.

5.6.2 Application Launcher

The icon for the PC-BSD application launcher looks different from the traditional KDE icon as it uses the PC-BSD flame logo. Simply click this icon whenever you want to search for or start applications.

If you click the application launcher icon, you'll see the following five icons, with each icon representing a menu tab of items:

Favorites: programs that are marked as favorites are listed here. You can add any program you find in application launcher to the Favorites menu by right-clicking the item and clicking "Add to Favorites". Having your favorite programs listed on this first tab saves you time browsing through the applications menu.

Applications: this menu is divided into categories that contain all of the applications that come with PC-BSD as well as any software that you installed using Software Manager. Click on a category name to view the applications within that category. If you wish to return to the categories, click on the arrow on the left side of the menu. To launch an application, simply click its name. Alternately, if you right-click an application's name, you will have the option to add it to the favorites menu, to create a desktop icon, and/or to add an icon to the panel. Any of these options will allow you to quickly see and launch your favorite applications.

Computer: this menu provides shortcuts to system settings, the run command, your home folder, network shares, root's home folder, and the trash can.

Recently Used: this menu shows a list of the last few opened documents and applications.

Leave: this menu is used to log out of your current KDE session, lock your session, switch user, put the system into sleep or hibernate mode, or restart or shutdown the computer.

Every application launcher menu provides a search bar at the top of the menu. If you type the first few letters of an application's name, application launcher will list all of the applications that apply. This is a quick way to find applications without searching through the categories.

5.7 Working with Directories and Files

If you're running PC-BSD with the default KDE desktop environment, you can easily access your files and view the directories on your system using the Dolphin file manager. To launch Dolphin, use Application Launcher -> Dolphin. Figure 5.8a shows a screenshot of Dolphin.

Figure 5.8a: Viewing the Directory Structure Using Dolphin

Dolphin will show the contents of the user's home directory by default. This is where the user should create and store their personal files. Dolphin provides many features for manipulating files such as comments, tags, search, encryption, dealing with zipped archives, and more. Simply click F1 while in Dolphin to access the Dolphin Handbook to learn how to use its features.

The Root folder in Dolphin can be used to browse all of the directories on the PC-BSD system. It is important to realize that anything outside of your home folder came with the operating system. This means that you should not delete or modify the contents or permissions of any of these directories unless you know what you are doing. When in doubt, leave the directory or file as-is.

Like other Unix-like operating systems, the root folder is the top level of the directory structure. You can read more about the layout of the FreeBSD directory structure by running man hier at the command line. If you prefer to read manpages in Dolphin, click the View menu -> Location Bar -> Editable location. This will add a location bar where you can type in man:/hier. If you wish to read this man page while you are in Konqueror, simply type in the same command in the area where you typically type in a URL to a website.

Table 5.8.1 summarizes the contents of the directory structure on a PC-BSD system.

Table 5.8.1: PC-BSD Directory Structure

Directory

Contents

/

pronounced as "root" and represents the beginning of the directory structure

/PCBSD

only found on PC-BSD systems; contains all of the PC-BSD specific programs

/Programs

subdirectories for each installed PBI

/bin

applications (binaries) that were installed with the operating system

/boot

stores the startup code, including kernel modules (such as hardware drivers)

/compat/linux/

Linux software compatibility files

/dev

files which are used by the operating system to access devices

/etc

operating system configuration files

/etc/X11/

the xorg.conf configuration file

/etc/rc.d

operating system startup scripts

/home

subdirectories for each user account; each user should store their files in their own home directory

/lib

operating system libraries needed for applications

/libexec

operating system libraries and binaries

/media

mount point for storage media such as DVDs and USB drives

/mnt

another mount point

/root

administrative account's home directory

/sbin

operating system applications; typically only the superuser can run these

/tmp

temporary file storage; files stored here may disappear when the system reboots

/usr/bin

contains most of the command line programs available to users

/usr/local

contains the binaries, libraries, startup scripts, documentation, and configuration files used by third-party applications

/usr/local/share/fonts

system wide fonts for graphical applications

/usr/local/share/icons

system wide icons

/usr/ports

location of installed ports tree, used by advanced users to install or upgrade software

/usr/share

system documentation and man pages

/usr/sbin

command line programs for the superuser

/usr/src

location of installed FreeBSD source code used by advanced users

/var

files that change (vary), such as log files and print jobs

If you dual boot your PC-BSD system, Dolphin will display the filesystems from the other operating systems as Volumes. Simply double-click the volume name to view its data. Depending upon the type of filesystem, you may or may not be able to copy or edit files between the volume and your PC-BSD system.

5.8 Remote Desktop Sharing

The KDE desktop provides applications that allow connections between desktop sessions running on different computers. This can be very handy when troubleshooting a problem as both users will be able to see the error on the problematic system and either user can take control of the mouse and keyboard in order to fix the problem. This section will show you how to connect to a session running on another computer as well as how to invite another computer to connect to your desktop session.

5.8.1 Connecting to Another Desktop Using Remote Desktop

If the other computer you are connecting to is a Windows system, the connection can be made using the remote desktop protocol (RDP). While remote desktop has been available since Windows XP, not every edition of Windows provides a fully functional version--for example, it may not be fully supported in a home edition of Windows. If the full version of RDP is included, remote access may or may not be enabled by default. If you have trouble connecting using RDP, do a Google search for "remote desktop" and the name of the version of Windows you are using to find out how to configure its remote desktop settings. If you still can't connect, you will need to download, install and configure VNC server software on the system.

If the other computer you are connecting to is a Mac, Linux, or BSD system, you will have to first install either rdesktop or a VNC server on the other system. Depending upon the operating system, either software may or may not already be installed. If it is not, check the software repository for the operating system or use Google to find out how to install and configure one of these applications on that operating system. If you are connecting to another PC-BSD system, rdesktop is already installed for you.

If the remote system is protected by a firewall, you will need to check that it allows connections to the TCP port required by the type of connection that you will be using:

RDP: uses port 3389

VNC: uses port 5900 (for the first connection, 5901 for the second connection, etc.)

If you need to manually add a firewall rule, it is best to only allow the IP address of the computer that will be connecting. It is also more secure to remove or disable this firewall rule after the connection is finished so that other computers don't try to connect to the computer. Since your PC-BSD system is considered to be the client and will be initiating the connection, you do not have to modify the firewall on the PC-BSD system.

Once the other computer has the software it needs for the connection, you can initiate a connection request using KRDC. To launch this application, go to Application Launcher -> Internet -> Remote Desktop Client. You can also launch this application by typing krdc at the command line. If you click F1 while in KRDC you can access the Remote Connection Desktop Handbook to learn more about how to use this application.

Figure 5.9a shows the initial KRDC screen which allows you to specify which system you wish to connect to.

Figure 5.9a: Creating a Connection Using KRDC

Use the drop down menu to indicate whether the remote system is using RDP or VNC for the connection. Then type in the IP address of the system you wish to connect to. If you are connecting to a VNC system, the IP address needs to be followed by a colon and a number indicating the number of the session. Typically, the number will be 1 unless the VNC server is hosting multiple simultaneous connections. Once you press enter, the connection will be initiated and you will see the screen shown in Figure 5.9b:

Figure 5.9b: Settings for the Connection

Here is a quick overview of the settings:

Desktop resolution: since the contents of the screen are sent over the network, select the lowest resolution that still allows you to see what is happening on the other system. If you have a very fast network connection, you can choose a higher resolution; if you find that the other system is very slow to refresh its screen, try choosing a lower resolution.

Color depth: choose the lowest color depth that allows you to see the other system; you can choose a higher color depth if the network connection is fast.

Keyboard layout: this drop down menu allows you to select the desired keyboard layout.

Sound: this drop down menu allows you to choose whether any sounds heard during the connection are produced on this system, the remote system, or to disable sound during the connection.

Console login: if you are connecting to a Unix-like system, you can check this box if you wish to have access to the other system's command line console.

Extra options: allows you to specify rdesktop switches that aren't covered by the other options in this screen.

Show this dialog again for this host: if you plan on using the same settings every time you connect to this computer, you can uncheck this box. If you need to change the settings at a later time, you can right-click the connection (which will appear in a list as a past connection) and choose Settings from the right-click menu.

Remember password: KWallet is KDE's password storage system. If this box stays checked, you will only need to input the password the first time you make this connection as it will be saved for you. If this is the first time you have stored a password using KWallet, it will prompt you for some information to set up your wallet.

Once you press OK, a connection will be initiated and you will receive pop-up messages asking for a username then a password; the details you provide must match a user account on the system you are connecting to. Once your authentication details are confirmed, you should see the desktop of the other system. If you move your mouse, it will move on the other desktop as well. Click the "View Only" button in the top toolbar whenever you wish to disable this mouse behaviour. When you are finished your session, you can click the "Disconnect" button in the top toolbar.

5.8.2 Allowing Another Computer to Connect Using Desktop Sharing

If you wish another user to connect to your computer, you can use the Krfb desktop sharing application to generate a connection invitation. To launch this application go to Application Launcher -> Internet -> Desktop Sharing or type krfb from the command prompt. If you press F1 while in this application, it will open the Desktop Sharing Handbook where you can learn more about using this utility. Figure 5.9c shows the initial screen for this application.

Figure 5.9c: Initiating a Connection Request Using Krfb

There are two types of invitations that you can create:

Personal Invitation: if you click this button it will display the hostname that the other person will use to connect, a temporary password to use for the connection, and an connection request expiration time of one hour. It will include a warning reminding you to only give this information to the person you wish to connect as anyone can connect using that information. The connection itself can be made from any VNC client. If the person is using PC-BSD, they can use KRDC as described above. On other operating systems, they will need to check if VNC is installed and download a VNC client if it is not. Once you press the Close button, the invitation expiry date will be listed in the main screen.

Email Invitation: if you click this button it will display a warning that anyone who reads the email containing the invitation can connect. Once you click the Continue button, the default email program will open up containing the invitation so that you can input the email address of the recipient and send the email.

It should be noted that the most secure way to convey the invitation information is through an alternate communications channel such as a phone call. Ideally, you are speaking to the other person as they connect so you can walk them through the problem you are experiencing and they can let you know what they are doing to your system as you watch them do it. Figure 5.9d shows an example of a personal invitation:

Figure 5.9d: Connection Invitation Created Using Krfb

Once the other person has the invitation, they should input the information in the invitation into their VNC client (also called a VNC viewer) in order to start a connection. You will know when they try to connect as a pop-up message will appear on your screen similar to Figure 5.9e:

Figure 5.9e: The Other User is Trying to Connect Using the Invitation

In this example, a computer with an IP address of 192.168.1.111 is trying to connect. Buttons are provided to either accept or refuse the connection. You can also check or uncheck the box to "allow remote user to control keyboard and mouse". If you accept the connection, the other user will be prompted to input the invitation password. Once the password is accepted, they will see your desktop.

6 Installing Applications and Keeping PC-BSD Updated

There are several methods of managing software on a PC-BSD system:

Using PBIs and Software Manager, the easy PC-BSD way (recommended)

Using binary packages, the quick FreeBSD way

Using the ports collection, the slow FreeBSD way

Software Manager provides an intuitive, graphical method for managing software. Binary packages and ports use command-line tools and require previous knowledge or some time to learn how to use the tools.

This section demonstrates how to use Software Manager which is the recommended way to install and manage applications and to keep your PC-BSD system up-to-date.

It also introduces the following topics for advanced users. These advanced topics are meant for users who are already familiar with compiling FreeBSD kernels and ports and who wish to continue to do so on their PC-BSD system. If you decide to use the instructions in those topics as a learning exercise, we recommend that you use a test system rather than your primary desktop or that you practice using Ports Jail. Make a backup of your important data before proceeding, just in case something goes wrong.

Using Ports Jail to Manage FreeBSD Packages and Ports

Keeping Ports Up-to-date

Managing Packages/Ports

Rebuilding World

6.1 Using Software Manager

PC-BSD provides a unique file format known as a PBI (push button installer). PBI files end with the .pbi extension and are self-contained installation programs. When a PBI is installed using PC-BSD's Software Manager, the application and all the files and libraries it needs are placed in a subfolder of /Programs and linked into the system. This means that even novice users can safely install and uninstall PBIs without inadvertently overwriting or deleting files needed by the operating system or other applications. Software Manager automatically adds newly installed software to the KDE menu and creates application shortcuts on the KDE desktop.

6.1.1 Installing and Uninstalling PBI Software

To install a PBI, start Software Manager by double-clicking its icon on the Desktop or going to Application Launcher -> System Settings -> Software & Updates. You will be prompted for the administrative password as only the superuser can install software on a PC-BSD system. Once the password is accepted, the Software Browser will launch, as seen in Figure 6.1a:

Figure 6.1a: Browsing for Software Using PC-BSD's Software Manager

If you know the name of the application you would like to install, type its name into the Search bar. Alternately, you can click on a software category (for example, Chat-IM) to browse for available software. Use the Software Browser's forward and back arrows to navigate within the browser.

Once you find a PBI that you would like to install, click on its Download icon. Software Browser will automatically detect your PC-BSD version and architecture and download the correct PBI for you. When the installation is complete, the new PBI will be displayed in the Installed Software tab. Figure 6.1b shows a screenshot of this tab from a system with several PBIs installed.

Figure 6.1b: Viewing the List of Installed PBIs in the Installed Software Tab of Software Manager

If the installer did not ask if you would like to start the application, you can launch the application using KDE's Application Launcher. Type its name into the KDE menu's Search bar to find its location in the menu. Once you find the application, you can right-click its name to add an icon to the Favorites tab of the KDE menu, your Desktop, or your panel's taskbar. You can also create a desktop icon from the Installed Software tab. Simply right-click the application's name and select "Install Desktop Icons" from the menu.

To uninstall a PBI, simply highlight it in the Installed Software tab and click the Remove button. In the example shown in Figure 6.1b, the VirtualBox PBI is selected for removal. Software Manager will prompt you to confirm that you wish to uninstall the application. Software Manager will then remove the application's subdirectory within /Programs, as well as its entry in the KDE menu. If you have created any desktop or panel icons, you should remove those manually.

6.1.2 Updating Installed PBIs

The Installed Software tab will also indicate if there are any newer versions available for the PBIs that you have installed. PBIs are created from the original FreeBSD package and are automatically available as an upgrade whenever the underlying package version changes. Figure 6.1c provides an example of a PBI that has a newer version available:

Figure 6.1c: Using the Installed Software Tab to Upgrade Installed PBIs:

In this example, the currently installed version of VirtualBox is 3.2.8_1 and version 3.2.10 is available. To upgrade this PBI, highlight the entry and click the Update button. The status of the update will be displayed next to the entry, indicating the status of the download. When the upgrade is complete, the entry will be updated to show the new version. The upgrade process will save all of the current version's settings; for example, when you upgrade Firefox, it will keep all of your bookmarks, history, and cache.

Note: PC-BSD 8.x does not provide incremental upgrades, meaning the new PBI is downloaded, the old PBI is uninstalled, and the new PBI is installed. PC-BSD 9.x will support incremental upgrades, meaning only the changes are downloaded. Incremental upgrades will significantly reduce the download size and the time required to upgrade a PBI.

6.1.3 Applying System Updates and Security Patches

An icon located in your system tray lets you tell at a glance if any of your PBIs are out-of-date or if a system update is available. This icon has several possible states:

your system is up-to-date

the system is currently checking for updates and patches; this happens automatically whenever you boot your system

your operating system is out-of-date and system update(s) or patch(es) are available

newer versions of installed PBI(s) are available

the system was unable to check for updates, meaning you should check your Internet connection

If you right-click the icon, you will see the menu shown in Figure 6.1d:

Figure 6.1d: Right-click Menu for Update Manager

Selecting "Start the Update Manager" from the right-click menu or double-clicking the icon will open Software Manager so that you can review the available update(s).

The System Updates tab, seen in Figure 6.1e, allows you to easily apply security patches and update system drivers. If system updates are available, they will be listed; if your system is fully up-to-date, there won't be any entries in this tab.

Figure 6.1e: Using the System Updates Tab to Apply System Patches or Upgrade Drivers

Though the installation of updates is recommended as they make your system more secure, add more functionality, and fix bugs, system updates are not mandatory. For example, if you don't wish to apply an NVIDIA update because your system uses a different video driver, simply right-click the entry and choose "Ignore this update" to remove it from the menu. If you check the "Show ignored updates" box, the ignored updates will be displayed.

To receive more information about an available update, highlight the entry and click the "View Details" button. This will open up a web browser and display the details regarding what the update addresses and whether any special instructions are required, such as a reboot after applying the update.

To install an update, highlight the online update(s) you wish to install and click the "Install selected updates" button. You can watch the update's progress as seen in Figure 6.1f.

Figure 6.1f: Installing a System Update

If the update requires a reboot, you will be notified to do so after the update has been installed. If a reboot is needed, clicking the OK button at the informational message won't reboot the system. Software Manager won't automatically reboot, meaning you can continue to use your computer for other tasks while the system is being updated. Finish whatever you're doing and reboot the computer at a time that is convenient for you.

If you're curious as to where Software Manager stores its information regarding updates, check out the contents of the following subdirectories:

ls /PCBSD/SystemUpdater/system-updatesavailable ignored installed

ls /PCBSD/SystemUpdater/system-updates/available/8.1/patch-kqueue-08162010.upd patch-nvidia-08132010.upd.sig
patch-kqueue-08162010.upd.sig patch-nvidia-09012010.upd.sig
patch-libbz2-10042010.upd patch-nvidia-10272010.upd
patch-libbz2-10042010.upd.sig patch-nvidia-10272010.upd.sig

In this example, five updates have been issued since 8.1 was released. Each update ends in the .upd.sig extension and is dated and signed. Files that end in .upd are the details for an update; these files are ASCII text so can be sent to a pager or text editor:

more /PCBSD/SystemUpdater/system-updates/available/8.1/patch-kqueue-08162010.updName: KDE / QT FileWatcher Bugfix
Date: 8-16-2010
MD5: 44da6422cd20464e47056331776626bb
Size: 21
Mirror: ftp://ftp.pcbsd.org/pub/
FileURL: /system-updates/8.1/amd64/patch-kqueue-amd64-08162010.lzma
StandAlone: NO
RequiresReboot: NO
DetailsURL: http://www.pcbsd.org/content/view/173/30/>

6.1.4 Configuring Software Manager

If you click the Configuration button within Software Manager, a window will open that has four tabs, as seen in Figure 6.1g:

Figure 6.1g: Configuration Tabs in Software Manager

The Mirrors tab allows you to configure which PC-BSD mirror is used in order to check for and install updates to the operating system or installed PBIs. The default selection is to use the default US mirror. Occasionally, this mirror is busy or may not contain the PBI or update that you wish to install. Also, there may be other mirrors that are closer to your geographic location. If you would like to change the default mirror, click the "Select Mirror from list" button and select a mirror from the drop-down list.

If your company maintains its own repository of PBIs or updates, you can select the "Specify a custom mirror" button and input the IP address of the company's server.

The Software tab, seen in Figure 6.1h, allows you to configure the following options:

Automatically update software: check this box if you would like Software Manager to automatically upgrade your PBIs for you whenever an update is available. Otherwise, Software Manager will wait for you to highlight the software that you would like to upgrade in the Installed Software tab.

Automatically create desktop icons: uncheck this box if you don't want a desktop icon to be created whenever you install a PBI.

Keep downloaded software in temporary directory: check this box if you find yourself uninstalling then reinstalling software or if you want to install the same PBI on several systems. Rather than having to download the PBI each time, you can double-click the saved PBI in Dolphin in order to reinstall it. You can configure the directory that PBIs are saved to using the Misc tab.

Figure 6.1h: Software Configuration Tab of Software Manager

The System tab, seen in Figure 6.1i contains one configuration option:

Automatically install available updates: check this box if you would like Software Manager to automatically upgrade your operating system for you whenever an update is available. Otherwise, Software Manager will wait for you to highlight the update that you would like to apply in the System Updates tab.

Figure 6.1i: System Configuration Tab of Software Manager

The Misc tab, seen in Figure 6.1j, allows you to specify the temporary file directory that PBIs are saved in if you check the "Keep downloaded software in temporary directory" in the Software tab.

Figure 6.1j: Misc Configuration Tab of Software Manager

This tab also allows you to configure how often Software Manager connects to the Internet in order to check for updates.

If you make any changes, click the Save button to save them and exit the Configuration button.

6.2 Using Ports Jail to Manage FreeBSD Packages and Ports

The Ports Jail icon on the desktop provides an environment where users who are new to FreeBSD packages and ports can safely experiment and learn how to use the FreeBSD software management command line tools without affecting the software that was installed with the operating system. A jail is a type of virtual environment where anything that occurs inside the jail does not affect the rest of the operating system.

Note: advanced users who like to customize their systems should take note that ports jail requires the nat rules in PC-BSD's default firewall ruleset. If you remove these rules or disable pf, ports jail will not start. Advanced FreeBSD users can continue to use FreeBSD packages and ports on their PC-BSD installation without using ports jail. However, if you do not consider yourself to be an advanced FreeBSD user, you should experiment learning how to use ports and packages within the ports jail utility. That is, do not run the commands described in this section from a command prompt; only run these commands from within the ports jail console.

To start ports jail, simply double-click the desktop icon. You can also start ports jail from Application Launcher -> Ports Jail. As you can see from Figure 6.2a, ports jail opens in a konsole terminal:

Figure 6.2a: Ports Jail

The jail itself is like a self-contained FreeBSD installation. You can see what this means if you spend a few minutes comparing the outputs of commands such as ls /, pkg_info, and more /etc/rc.conf between the ports jail and a regular konsole. It should be noted that "self-contained" does impose limitations. For example, any ports you compile within the jail will not exist outside of the jail. If your goal is to install applications to use on your PC-BSD system, you should be using Software Manager instead. If your goal is to learn more about FreeBSD packages and ports, use ports jail.

6.2.1 Installing FreeBSD Packages

A FreeBSD package is an installation file that contains an application as well as installation information useful to the operation system, such as a list of dependencies (other software required by the application). Packages have been pre-tested for FreeBSD, meaning that they should be fairly easy to install and should work once installed. There are currently over 22,000 FreeBSD packages to choose from. FreshPorts is an excellent place to browse for packages and to research the files that get installed with a FreeBSD package.

When dealing with FreeBSD packages, the following command line utilities are used:

pkg_add: used to install packages. If you have never used this command before, take the time to read man pkg_add to get an overview of how this command works.

pkg_delete: used to uninstall packages. If you have never used this command before, take the time to read man pkg_delete to get an overview of how this command works.

pkg_info: used to get more information about the packages that have been installed. This command provides many useful switches so it is well worth your time to read through man pkg_info and to experiment with various switches.

To install a package, become the superuser from within ports jail and use the remote (-r) switch to install the specified package from the FreeBSD packages repository. For example, this command will install the electric package:

pkg_add -r electricFetching .ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/ electric.tbz.. Done.

You should receive a message indicating that the package was successfully fetched, then your prompt back. Depending upon what is already installed in your ports jail, your messages may indicate that dependent packages were also fetched. Some packages include post-installation instructions that will be displayed in the message. Occasionally you will see a warning about a version mismatch; you can ignore these as they do not affect the installation of the package. Unless the message includes an error indicating that the system was unable to fetch or install the package, the installation was successful.

Since the command is issued from within ports jail, the installed package will not appear as an entry in the KDE menu or as an icon on the PC-BSD desktop.

Most packages install their binary (executable) in /usr/local/bin and configuration files in /usr/local/etc/. You can find out exactly what was installed using the -L (list) switch. If you include -x, you will not have to type in the entire name and version of the package as pkg_info will match any installed packages containing your query string.

pkg_info -Lx electric | moreInformation for electric-7.0.0_3:
Files:
/usr/local/bin/electric
/usr/local/share/electric/lib/.cadrc
/usr/local/share/electric/lib/ALS.help
/usr/local/share/electric/lib/AllDialogs.c
<snip rest of output>

The pkg_delete command can be used to uninstall either a package or a port from within ports jail. If you include the -x switch, you don't have to give the full name and version of the software. Be sure to give enough of a name so that you don't inadvertently uninstall other software matching the name:

pkg_delete -x electric

If you just get the command prompt back, the delete was successful. You can verify this by checking that the package no longer exists in the package database:

pkg_info | grep electric

You will just get your prompt back if no installed software matches that name.

If the software has other applications that depend upon it, pkg_delete will refuse to uninstall it. If you wish to override this setting, you can use the -xf switch to force the delete. However, use the force switch with caution as forcibly removing software can adversely affect the applications that required it as a dependency.

6.2.2 Compiling FreeBSD Ports

A FreeBSD port is a set of instructions (contained within a Makefile) for successfully compiling the source code for an application on a FreeBSD system. The FreeBSD ports collection has been arranged into a series of software categories; each category contains a subdirectory for each application in that category. The application's directory contains the application's Makefile as well as any other files needed to compile and install the application. If you click on the CVSWeb link of an application at FreshPorts, you can read the port's Makefile. Figure 6.2b shows the CVSweb info for the electric port. To navigate to this page in your browser, go to FreshPorts, search for "electric", then click the link for electric 7.0.0_3, then click on CVSWeb.

Figure 6.2b Viewing a Port's Information at FreshPorts

If you click the link for Makefile, you can read the commit messages for every version of the Makefile; this can give you a good idea of how long the port has been available, how often it is updated, and any major changes that have occurred. Alternately, to view the current Makefile, click on the Rev. number--in this case, 1.22. The distinfo contains the checksums for the source files; again, you can either read the current revision or scroll through the list of commits. The pkg-descr contains a description of the software; if you read the revision, it will begin with the commit message. The pkg-plist contains a list of what is installed (i.e. it is the equivalent of running pkg_info -Lx as described in the FreeBSD packages section). When reading this list, mentally replace anything between %% markers with "/usr/local/".

If you wish to learn how to compile ports, you will need to first install the ports collection into the ports jail. There are several ways to accomplish this so you should select one of the following methods. You will know that you have the ports collection when /usr/ports/ is populated with many subdirectories, each representing a category of software.

Method 1: Go to Application Launcher -> System Settings -> System Manager -> Run in Administrator Mode. After inputting the administrative password, click on the Tasks tab, seen in Figure 6.2c.

Figure 6.2c: Installing the Ports Collection using the Tasks Tab of System Manager

In the "Ports Console" section, click "Fetch Ports Tree" and a pop-up window will indicate that it is fetching ports and that it may take a while. Be patient, as it is downloading and installing a tarball that is about 50MB in size. Note that you do not want to select the option to "Fetch System Ports Tree" as this will install ports onto the main system rather than into the ports jail.

Method 2: Make sure that you are in the ports jail, become the superuser using the su command, then issue these commands:

cd /usr
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz
tar xzvf ports.tar.gz

Method 3: Make sure that you are in the ports jail, become the superuser using the su command, then issue this command:

portsnap fetch extract

Once you have the ports collection installed into your ports jail, change to the subdirectory of the application you wish to install, for instance /usr/ports/cad/electric, and issue the command to make and install the application:

cd /usr/ports/cad/electric
make install clean

How long this command will take can range from a few minutes to many hours, depending upon the size of the application and the speed of your system. The make command will spit out many messages, most of which you can ignore as they are simply indications of what source is currently being compiled. Occasionally a menu will appear asking you to select from a list of options. When in doubt, keep the default options. If you understand the options, you can use your arrow and enter keys to toggle an option on or off. When finished, use the tab key to navigate to OK and press enter to continue the compilation process. Occasionally, make will encounter an error and will stop with an error message. If the solution for the error is not obvious to you, try Googling for the keywords in the error message. Keep in mind that this is a learning exercise and that you may be forced to learn some things along the way.

6.3 Keeping Ports Up-to-date

While Software Manager will keep your PBIs up-to-date, it won't touch the packages that were installed during the installation of PC-BSD or any ports/packages that you install yourself. If you like to always have the latest version of ports or are concerned about software vulnerabilities that may occur between PC-BSD releases, you can manually keep your non-PBI software up-to-date.

Note: only advanced users should run the commands described in this section directly from a PC-BSD command prompt; while things usually don't go wrong, if they do it will affect the software that came with the operating system. If you are learning how to use these commands, do so from ports jail, a virtual machine, or a test system. While using these practice environments won't update your main PC-BSD system, they will allow you to become comfortable with how to use the commands without adversely affecting the software that came with the operating system.

In order to manually update your software that was installed with the operating system or through packages and ports, you will need:

to create a sup file to keep your ports tree in sync with the latest version

to install a utility to upgrade FreeBSD ports

to read /usr/ports/UPDATING so you're aware of any gotchas before you attempt to upgrade your software

Note: this entire section assumes that you are the superuser.

6.3.1 Create a sup file

PC-BSD provides some sample sup files in /usr/share/examples/cvsup/. They are well commented, making it easy to edit them to meet your needs. You should copy one of the sup files, edit it, and save it to either your regular user's home directory or the root user's home directory; in other words, save it to a location that you regularly backup and which isn't likely to be overwritten by a system upgrade. Once edited, your supfile will look something like this:

*default host=cvsup.ca.freebsd.org
*default base=/usr/local/etc/cvsup
*default prefix=/usr
*default tag=RELENG_8
*default release=cvs delete use-rel-suffix compress
src-all
ports-all tag=.

Let's look at each line in more detail:

this line is mandatory and you should modify it to choose a mirror that is geographically close. You'll find the list of mirrors here.

this line is mandatory and the directory must be created if it does not exist. Be sure to choose a directory on a partition with plenty of available disk space--for example, /usr usually has more disk space than /var.

this line is mandatory and should point to /usr.

this line is mandatory and you should modify it to contain the tag for your operating system. You'll find the list of tags here. If you're running PC-BSD 8.1, use RELENG_8 if you want to receive all src changes (e.g. new drivers and features) or use RELENG_8_1 if you are only interested in receiving security fixes. You can only have one tag so you must pick one or the other.

this line is mandatory and should be left as-is.

include this line if you wish to keep your source up-to-date. Source is needed if you wish to recompile your kernel, update the operating system by rebuilding world, or to recompile the latest version of a driver. Source will be put into /usr/src and takes up about 600MB of disk space.

include this line if you wish to keep your installed ports/packages up-to-date. Ports will be put into /usr/ports/ and takes up about 1.2GB of space. That amount of disk space will grow as you upgrade your ports since downloaded source files for the software will be added to /usr/ports/distfiles/.

Once you have a supfile, you can sync your src and/or ports using the following command. If the command is successful, you'll see messages indicating that you are connected and can watch the progress as new and modified files are downloaded:

csup -L2 /pathto/supfileParsing supfile "cvs-supfile"
Connecting to cvsup.ca.freebsd.org
Connected to 206.75.218.52
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection src-all/cvs
 Edit src/bin/ps/extern.h
  Add delta 1.39.2.2 2010.10.25.15.01.40 attilio
 Edit src/bin/ps/keyword.c
<snip a lot of output>
Edit ports/x11-toolkits/phat/Makefile
  Add delta 1.10 2010.10.25.20.09.06 trasz
Shutting down connection to server
Finished successfully

If your messages instead indicate a problem with the connection, check that your Internet connection is active. If it is, try using a different mirror in your sup file.

6.3.2 Install an Upgrading Utility

The ports-mgmt section of the FreeBSD ports collection contains many utilities for managing ports. Popular utilities for upgrading ports include:

portupgrade: easy to use and effective, but requires the Berkeley DB as a backend and the ruby programming language. If you are upgrading a lot of ports, you may find it inconvenient for the process to pause while it waits for you to notice that you must attend to a configuration option screen.

portmaster: offers the advantage of not requiring a database or another programming language as a dependency. It also displays all of the configuration option screens at the beginning of the process so you don't have to worry about them pausing the upgrade.

port maintenance tools: installs a selection of utilities.

porteasy: allows you to upgrade your ports without downloading the entire ports tree.

If you don't already have a favourite upgrade utility, spend some time perusing the ports-mgmt section and experiment with the utilities that interest you. You'll also find utilities that allow you to save disk space, check for security vulnerabilities, remove unneeded dependencies, and other useful tasks dealing with ports management.

6.3.3 Read /usr/ports/UPDATING

Before upgrading any ports, always read through /usr/ports/UPDATING first. This file contains any gotchas or special instructions that are needed to upgrade certain ports. Ports maintainers add to this file as new gotchas are discovered. However, you will want to start reading the file at the entry that is closest to the date that your version of PC-BSD was released (if you have not upgraded anything yet) or the date you last upgraded, and read your way up to the top of the file.

For example, PC-BSD 8.1 was released on July 20. If you have not upgraded any ports yet, you will want to start reading at this entry:

20100715:
  AFFECTS: users of lang/perl*
  AUTHOR: skv@FreeBSD.org
  lang/perl5.12 is out. If you want to switch to it from, for example
  lang/perl5.10, that is:

as it is for the 15th of July of 2010, the first entry nearest to July 20. As you read through the entries from that date up to the last entry at the beginning of the file, make note of any entries that match the software you have installed. If you are unsure of what software is installed, this command will tell you:

pkg_info | more

Occasionally, a software upgrade (e.g. perl, kde, gnome) will affect many applications. If you come across such entries that affect your installed software, follow the instructions carefully.

Note: if there have been major changes or there are a lot of entries that affect you, you should decide if it is worth your time to upgrade or if you prefer to wait until the next version of PC-BSD is released (as each release contains the most updated software as of the release date). The more software there is up to update, the longer the time required to complete the upgrade process.

If your ports are already up-to-date and you prefer to be notified as new entries are added to /usr/ports/UPDATING, consider subscribing to its RSS feed.

6.3.4 Perform the Upgrade

After using the csup command to update your ports and reading /usr/ports/UPDATING, you are ready to upgrade your installed software.

If you are using portupgrade, you need to first update the ports database and check to see which ports need updating. Note that the following commands are installed for you when you install portupgrade:

portsdb -Fu/usr/ports/INDEX-8.bz2     100% of 1421 kB  114 kBps 00m00s
done
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22250 port entries found
........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000
.........9000....10000.......11000.........12000.........13000.........14000.........15000.........16000
.........17000.........18000.........19000.........20000.........21000.........22000.. ..... done]

portversion -l "<"linkchecker                 <
mpg123                      <
p5-Object-InsideOut         <
tomcat                      <

In this example, 4 ports are out-of-date. You can then upgrade the desired port using the following command:

portupgrade -rR tomcat

It is important to include -rR switches as this will make sure all of the ports dependencies and any ports that depend on this port are also upgraded. If you don't do this, you may find that dependency problems will start to creep up overtime. If you are concerned that the upgrade may fail or that you may not like the new version of the port, include -b which will create a package of the current port. If something happens, you can uninstall the new version and reinstall the old version using the created package. portupgrade supports many switches so it is recommended that you take the time to read through man portupgrade to see which switches are of interest to you.

If you are using portmaster, this command will look for out-dated ports and offer to upgrade them for you:

portmaster -a===>>> Gathering distinfo list for installed ports
===>>> Starting check of installed ports for available updates
<snip some output>
===>>> The following actions will be taken if you choose to proceed:
       Upgrade mpg123-1.12.3 to mpg123-1.12.5
       Upgrade p5-Object-InsideOut-3.69 to p5-Object-InsideOut-3.72
       Upgrade linkchecker-5.3 to linkchecker-5.4
       Upgrade tomcat-6.0.29 to tomcat-6.0.29_1
===>>> Proceed? y/n [y]

If you press enter to accept the default of yes, the upgrade will begin. If any of the ports have configuration options, you will be presented with some menus to make your selections. As each upgrade completes, you will be asked if you want to delete the tar.gz of the source for the old version of the software (which can save disk space); you can include -D or -d if you don't want to see this prompt. There are many switches available for portmaster so it is a good idea to man portmaster to see which ones interest you.

Once all of your ports are up-to-date, consider scheduling your upgrade process. The csup command works nicely as a cron job; you can then run the portmaster command at your leisure. Some portupgrade users create a simple script to run the csup, portsdb and portversion commands and to have the results emailed to the root user account. They can then run portupgrade manually as ports need to be upgraded.

6.4 Rebuilding World

If you csup src, as demonstrated in Section 6.3, you can choose to rebuild your world (operating system) without waiting for the next version of the operating system to be released. This process can be desirable if a hardware driver you use is fixed or given new features or if new functionality is added to the operating system and you want to start using it right away.

Note: remember, this section is meant for advanced users. If this is your first time building world, it is recommended to experiment first on a test system or virtual machine rather than on your primary desktop computer. If you do decide to rebuild your main system, first backup all of your important data to a removable media or another system.

How do you know what changes have been made to the src of your operating system? One way is to read /usr/src/UPDATING or to subscribe to its RSS feed. If this is your first time reading this file, scroll down to the COMMON ITEMS section towards the end of the file as it contains useful advice. Similar to /usr/ports/UPDATING, you want to skim through this file from the most recent entry down to the date closest to when you installed or last upgraded the operating system to see if any entries affect you. If so, be sure to follow the instructions. Another way to find changes in src is to get in the habit of reviewing the messages csup displays in order to see which src files are added or modified.

If you are only interested in updating one driver or system binary, you may or may not have to rebuild your world, depending upon if the driver or binary depends on any changes that have been made to the operating system source. The safest (but longer) way is to always rebuild world; however, you can try just recompiling the driver or binary to see if it works. If you receive an error indicating that your "userland and kernel are out of sync", this means that you must go through the build world process in order for the new functionality to work.

To build just the driver or binary, cd into its location in src. In this example, we'll rebuild the kdump utility:

cd /usr/src/usr.bin/kdumpmake && make install

To rebuild the operating system, you will issue the following commands as the superuser. If you have built world or your kernel before on this system, you should first clean out the obj directory:

rm -Rf /usr/obj/*

You can now build the world. This process will take some time, depending upon the speed of your processor.

cd /usr/src
make buildworld

When that is finished, you will want to make sure to incorporate the PC-BSD kernel options into the new kernel. If your system is 32-bit:

cp /PCBSD/conf/PCBSD /usr/src/sys/i386/conf

or, if your system is 64-bit:

cp /PCBSD/conf/PCBSD /usr/src/sys/amd64/conf

Then, build and install the kernel, install the built world, and reboot into the upgraded operating system:

make buildkernel KERNCONF=PCBSDmake installkernel KERNCONF=PCBSD
make installworldreboot

Should you be unable to boot into the new kernel, review the If Something Goes Wrong section of the FreeBSD Handbook. It will show you how to boot into the previously working kernel so that you can access PC-BSD and figure out why the new kernel failed.

7 PC-BSD Tools

In addition to the System Settings utilities provided by KDE, PC-BSD provides some extra tools written by the PC-BSD developers which are customized for usage on BSD systems. This section demonstrates how to use the following utilities on a PC-BSD system:

Firewall Manager

Networking Manager

Printer Configuration

Services Manager

System Manager

Users Manager

Making a System Backup using Life Preserver

Managing Jails with The Warden

7.1 Firewall Manager

PC-BSD uses the PF firewall to protect your system. By default, the firewall is configured to let your system make Internet connections, use the ping utility, and to communicate with other Windows and Unix-like systems.

Advanced users who are already familiar with pf will find the default rulebase in /etc/pf.conf. Users who aren't familiar with directly editing this file can instead use the Firewall Manager GUI utility to view and modify the existing firewall rules.

Note: typically it is not necessary to change the firewall rules. If you disable the firewall or remove the nat rule, ports jail will cease to work. You should not remove any existing rules unless you fully understand what the rule does. Similarly, you should only add rules if you understand the security implications of doing so, especially if the rule allows connections to your computer.

To access the Firewall Manager, go to Application Launcher -> System Settings -> Firewall. Figure 7.1a shows the initial screen when you launch this utility:

Figure 7.1a: Firewall Manager Utility

The General Settings tab of this utility allows you to:

determine whether or not the firewall starts when the system boots; unless you have a reason to do so and understand the security implications, this box should remain checked so that your system is protected by the firewall

start, stop, or restart the firewall: if you add, delete, or modify a firewall rule, you should restart the firewall for your changes to take effect

restore default configuration: this button allows you to return to the original, working configuration should you not like the changes you make to your firewall rules

To view or modify the firewall rules, click on the Exceptions tab, seen in Figure 7.1b:

Figure 7.1b: Adding a New Firewall Rule

In this example, the user has clicked on the "Add entry" button to add a new firewall rule. The following information is needed when creating a rule:

service or port number: you can either select the name of the service you wish to allow or block from the drop down menu or type in the number of the port used by the service. Which you choose does not matter as the firewall will match the name and number for you and display both after you save the rule.

policy: you need to choose whether to allow or block this service/port

direction: use the drop down menu to determine whether the policy applies to incoming or outgoing connections; the direction is from the perspective of your computer i.e. do you want others to connect to your service (incoming) or do you want to connect the service running on another system (outgoing)

protocol: use the drop down menu to select whether the service uses the TCP or UDP protocol

interface: use the drop down menu to select the interface that will make or receive the connection

Once you have made your selections, press OK to save the new rule. When you are finished, click the Apply button to save your changes.

Note: the new rule will not be used by the firewall until the firewall is restarted. Click the Restart button if you wish to test the rule or to start using it immediately.

You should take a moment to test that your new rule(s) work as expected. For example, if you create a rule to allow an SSH connection, try connecting to your PC-BSD system using SSH to verify that the firewall is now allowing the connection.

7.2 Networking Manager

Setting up your local network to access the Internet is easy with PC-BSD. During installation, PC-BSD configures your network interfaces to use DHCP. In most cases, this means that your connected interfaces should automatically work whenever you boot your system. You still have the ability to view or manually configure your network settings using the graphical System Network Configuration module, seen in Figure 7.2a:

Figure 7.2a: System Network Configuration Utility

To access this utility, either double-click the network interface icon in your system tray or go to Application Launcher -> System Settings -> System Network Configuration.

The main screen of the System Network Configuration utility will display the list of network interfaces that PC-BSD recognizes. In the example seen in Figure 7.1a, this system has one Realtek Ethernet interface that uses the re driver and a wireless interface that uses the wlan driver.

Note: the 0 next to each driver name indicates that it is the first interface that uses that driver. If, for example, the system had two Realtek cards, the second interface would be labeled as re1. You can learn more about the capabilities of a driver by reading its manpage (without the number). In this example, the associated man pages are man re and man wlan.

We'll now go through each tab of the System Network Configuration utility to demonstrate how to configure and view the network settings for both Ethernet and wireless drivers.

7.2.1 Ethernet Settings

If you highlight an Ethernet interface displayed in the System Network Configuration utility and click the Configure button in the Devices tab, or if you double-click an Ethernet interface, you will be prompted for the administrative password. Once the password is accepted, a popup Configuration window appears where you can view and adjust the Ethernet card's network settings. Figure 7.2.1a provides an example of clicking on the Ethernet interface named "re0".

Figure 7.2.1a: Network Settings for the re0 Ethernet Interface

If you wish to manually configure your Ethernet interface, there are two ways to do so:

using DHCP. This assumes that your Internet provider or network assigns your addressing information automatically using the DHCP protocol. Most networks are already setup to do this for you. This method is recommended as it should "just work".

manually type in the IP addressing information. This method requires you to understand the basics of TCP/IP addressing or to know which IP address you should be using on your network. If you don't know what IP address or subnet mask to use, you will have to ask your Internet provider or network administrator.

By default, the "Obtain IP automatically (DHCP) option is selected. If you wish to manually type in your IP address, uncheck this box. Type in the IP address, using the right arrow key or the mouse to move between octets. Then, double-check that the subnet mask (Netmask) is the correct value and change it if it is not.

By default, the "Disable this network device" box is unchecked. If you do not want this interface card to be configured whenever you boot your computer, uncheck this box. If you decide later that you do want to use this network card, you can go back into the System Network Configuration utility and recheck this box.

The Advanced tab, seen in Figure 7.2.1b, allows advanced users to change their MAC address and to use DHCP to automatically obtain an IPv6 address. Both boxes should remain checked unless you are an advanced user who has a reason to change the default MAC or IPv6 address and you understand how to input an appropriate replacement address.

Figure 7.2.1b: Advanced Tab of an Ethernet Interface's Network Settings

The Info tab, seen in Figure 7.2.1c, will display the current network address settings and some traffic statistics. If you check the checkbox to disable the network device, it will immediately stop the interface from using the network. The interface will stay inactive until this checkbox is unchecked.

Figure 7.2.1c: Viewing an Ethernet Interface's Settings and Statistics Using the Info Tab

If you make any changes within any of the tabs, click the Apply button to activate them. Click the OK button when you are finished to go back to the main System Network Configuration window.

You can repeat this procedure for each network interface that you wish to view or configure.

7.2.2 Wireless Settings

If you highlight a wireless interface displayed in the System Network Configuration utility and click the Configure button in the Devices tab, or if you double-click a wireless interface, you will be prompted for the administrative password. Once the password is accepted, a popup Configuration window appears where you can view and adjust the wireless card's network settings. Figure 7.2.2a demonstrates that this system's wireless interface is currently not associated with any wireless networks as there aren't any listed in the "Wireless network profiles" section.

Figure 7.2.2a: Wireless Configuration Window of System Network Configuration Utility

Note: if your internal wireless is activated or your external wireless card is inserted but does not appear as a wlan device, read Section 7.2.4 on Troubleshooting Network Settings.

To associate with a wireless network, click the Add button which will open the window seen in Figure 7.2.2b.

Figure 7.2.2b: Adding a Wireless Network Profile

Click the Scan button to receive the list of possible wireless networks to connect to. Alternately, if the scan is unable to find any networks and you know the SSID for the network you wish to connect to, you can manually type in the SSID.

Highlight the network you wish to associate with. If the network is open and does not require a key to authenticate, you can simply click the Add button once the desired network is highlighted. If the network uses privacy, you will need to select an option other than "Disabled", then click the Configure button. The possible options are:

WEP: this type of network can be configured to use either a hex or plaintext key. You will be prompted to type in the key twice to verify it. If the key is complex, you can check the "Show Key" box to make sure the passwords match. A wireless access point that uses WEP can store up to 4 keys; the number in the key index indicates which key you wish to use.

WPA Personal: you will be prompted to type in the key twice to verify it. If the key is complex, you can check the "Show Key" box to make sure the passwords match.

WPA Enterprise: you will be prompted to select the authentication method (EAP-TLS, EAP-TTLS, or EAP-PEAP) and to input the EAP identity, to browse for the CA certificate, client certificate (EAP-TLS only), and private key file (EAP-TLS only), and to input and verify the password.

Note: If you are unsure if the network is using WEP or WPA, ask the person who setup the wireless router what type of encryption is being used, the value of the key/password, and the value of any other settings described above. You can check the type of encryption using the ifconfig command, but you will still have to ask the administrator for the key and any other settings if you are unsure of the correct values.

Once you have input the correct values, click the Close button, then the Add button. Your entry should now show as a wireless profile. If needed, you can view or modify the settings in the profile using the Edit button. Highlight your entry and check the "Obtain IP automatically (DHCP) box if the wireless network uses DHCP. Otherwise, leave the box unchecked and type in the correct IP address and Netmask. Again, if you are unsure of these values, ask the person who setup the wireless network. When you are finished, click the Apply button to return to the main Network System Configuration window.

If all went well, there should be an IP address and status of "Active" when you highlight the wlan0 entry. If this is not the case, double-check your configuration values and read Section 7.2.4 on Troubleshooting Network Settings.

The Advanced tab, seen in Figure 7.2.2c, allows you to input a custom MAC address--similar to this setting for an Ethernet interface, this setting is meant for advanced users who understand why and how to change a MAC address. This tab also provides a checkbox to disable the wireless interface. This setting can be desirable if you want to temporarily prevent the wireless interface from connecting to untrusted wireless networks.

Figure 7.2.2c: Advanced Tab of a Wireless Interface

The Info tab, seen in Figure 7.2.2d, shows the current network status and statistics for the wireless interface.

Figure 7.2.2d: Info Tab of a Wireless Interface Displays its Network Status and Statistics

7.2.3 Advanced Network Settings and PPPoE

The Network Configuration (Advanced) tab of the System Network Configuration utility is seen in Figure 7.2.3a.

Figure 7.2.3a: Network Configuration (Advanced) tab of the System Network Configuration Utility

This tab is divided into two sections. If you wish manually edit the settings in the "System configuration settings" section, be sure that the interface that you wish to configure is highlighted in the Devices tab. If the settings are greyed out, it means that the settings were automatically obtained from a DHCP server. If they are empty, it means that you need to input the information manually. To add or override the existing settings, click the "Change Configuration" button and input the administrative password when prompted. A window will open that is similar to Figure 7.2.3b.

Figure 7.2.3b: Changing the Default Network Configuration (Advanced) Settings

The following settings can be modified in the "System-wide configuration" and "IPv6 Configuration" sections:

DNS 1: The IP address of the primary DNS server.

DNS 2: The IP address of the secondary DNS server.

Search Domain: The name of the domain served by the DNS server.

Hostname: The name of your computer.

Gateway: The IP address of the default gateway used to leave your network.

Enable IPv6 on this system: If this box is checked off, the interface can participate in IPv6 networks and the IPv6 gateway setting will be un-greyed out.

IPv6 gateway: The IPv6 address of the default gateway used to leave your IPv6 network.

The "PPPOE Configuration" section is used to configure a modem connection to a PPP or PPPoE network. If you connect to a network using a dialup or DSL modem, your Internet provider will provide you with a username and password. To configure your modem connection, check the "Enable PPPoE on this system" check box. This will un-grey out the following settings so you can input the required values:

Username: Your provider will provide you with a username; input that value here.

Password: Your provider will provide you with a password; input that value here.

Service name (optional): Some providers will provide you with a service name. If you have one, input it here; otherwise, leave this field empty.

PPPoE Device: Click the drop down menu to select the device name for your modem. If it is a dialup modem, the device name will begin with cua. If it is a PPPoE connection, select the name of the Ethernet device attached to the modem.

Always on connection: do not check this box if you are charged by the amount of time that you are connected.

Internet Connection Sharing: if you wish to share your Internet connection with the rest of the computers in your network, check this box.

The Misc section contains one configurable option:

Enable Lagg wired/wireless failover: the lagg interface allows you to seamlessly switch between using an Ethernet interface and a wireless interface. If you want this functionality, check this box.

Note: some users experience problems using lagg. If you have problems connecting to a network using an interface that previously worked, uncheck this box and remove any references to "lagg" in your /etc/rc.conf file.

If you make any changes within this window, click the Save button to apply them.

7.2.4 Troubleshooting Network Settings

While ethernet networking usually "just works" on a PC-BSD system, users sometimes encounter problems, especially when connecting to wireless networks. Sometimes the problem is due to a configuration error; sometimes a driver is buggy or is not yet available. This section is meant to help you pinpoint the problem so that you can either fix it yourself or give the developers the information they need to fix or create the driver.

When troubleshooting your network configuration, you need to be aware of the following files and commands:

/etc/rc.conf

This file is read when the system boots up. In order for the system to configure an interface at boot time, an entry must exist for it in this file. Entries are automatically created for you during installation for each interface that is active. An entry can be added (if it does not exist) or modified (if it exists and you enter different information) when you enter the Configuration section of an interface using the system network configuration utility.

Here is an example of the rc.conf entries for an ethernet driver (re0) and a wireless driver (run0):

ifconfig_re0="DHCP"
wlans_run0="wlan0"
ifconfig_wlan0="WPA"

When reading through your own file, look for lines that begin with "ifconfig". For a wireless interface, also look for lines containing 'wlan".

Note: unlike Linux interface driver names, FreeBSD/PC-BSD interface driver names indicate the type of chipset. Each driver name has an associated man page where you can learn which devices use that chipset and if there are any configuration options or limitations for the driver. When reading the man page, don't include the interface number. In the above example, you could read man re and man run.

/etc/wpa_supplicant.conf

This file is used by wireless interfaces and contains the information needed to connect to a WPA network. If this file does not exist, it is created for you when you enter the Configuration screen of a wireless interface using the system network configuration utility.

ifconfig

This command shows the current state of your interfaces. When reading through its output, you want to check if your interface is listed, has a status of "active", and has an IP address. Here is a sample ifconfig output showing the entries for the re0 ethernet interface and the run0 wireless interface:

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
       ether 60:eb:69:0b:dd:4d
       inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
       media: Ethernet autoselect (100baseTX <full-duplex>)
       status: active
run0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
       ether 00:25:9c:9f:a2:30
       media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
       status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       ether 00:25:9c:9f:a2:30
       media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
       status: no carrier
       ssid "" channel 10 (2457 MHz 11g)
       country US authmode WPA1+WPA2/802.11i privacy ON deftxkey UNDEF
       txpower 0 bmiss 7 scanvalid 60 protmode CTS wme roaming MANUAL
       bintval 0

In this example, the ethernet interface (re0) is active and has an IP address. However, the wireless interface (run0 which is associated with wlan0) has a status of "no carrier" and does not have an IP address. In other words, it has not yet successfully connected to the wireless network.

dmesg

This command lists the hardware that was probed during boot time and will indicate if the associated driver was loaded. If you wish to search the output of this command for specific information, pipe it to grep as seen in the following examples:

dmesg | grep Ethernetre0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xc000-0xc0ff mem 0xd0204000-0xd0204fff,0xd0200000-0xd0203fff irq 17 at  device 0.0 on pci8
re0: Ethernet address: 60:eb:69:0b:dd:4d
dmesg |grep re0re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xc000-0xc0ff mem 0xd0204000-0xd0204fff,0xd0200000-0xd0203fff irq 17 at  device 0.0 on pci8
re0: Using 1 MSI messages
re0: Chip rev. 0x28000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
re0: Ethernet address: 60:eb:69:0b:dd:4d
re0: [FILTER]
re0: link state changed to DOWN
re0: link state changed to UP
dmesg | grep run0run0: <1.0> on usbus3
run0: MAC/BBP RT3070 (rev 0x0201), RF RT2020 (MIMO 1T1R), address 00:25:9c:9f:a2:30
run0: firmware RT2870 loaded

pciconf

If your interface does not show up in ifconfig or dmesg, it is possible that a driver for this card is not provided with the operating system. If the interface is built into the motherboard of the computer, you can use the pciconf command to find out the type of card. Here is an example:

pciconf -lv | grep Ethernetdevice     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
pciconf -lv | grep wirelessdevice     = 'Realtek RTL8191SE wireless LAN 802.11N PCI-E NIC (RTL8191SE ?)'

In this example, there is a built-in ethernet device that uses a driver that supports the RTL8168/8111/8111c chipsets. As we saw earlier, that driver is re0. The built-in wireless device was also found but the ? indicates that a driver for the RTL8191SE chipset was not found. A Google search for "FreeBSD RTL8191SE" will give an indication if a driver exists (perhaps in a version of FreeBSD that has not been released yet) or if a driver is being developed. You can also use Google to locate a Windows driver and try using the ndisgen command, as described below, to convert it to a FreeBSD driver.

ndisgen

If your driver does not exist, you may be able to convert a Windows driver to a FreeBSD driver using the instructions on the Wireless Testing page. If your chipset is not listed in Table 1, please add an entry indicating whether or not you were able to successfully convert and use the driver for your architecture.

If you are still unable to get your network interface to work, see Section 8 on Finding Help. When describing your problem, include the following information:

the version and architecture of PC-BSD you are using (e.g. PC-BSD 8.1, 32-bit)

the name of the chipset used by the interface

the applicable entries in /etc/rc.conf

if you include your /etc/wpa_supplicant.conf, sanitize the psk value so you don't tell the world what the password is on your wireless network (e.g. replace the actual password with ***** or something similar)

7.3 Printer Configuration

Like many open source operating systems, PC-BSD uses the Common Unix Printing System (CUPS) to manage printing. If you are planning to purchase a printer or would like to know if a driver is available for your existing printer, you can look up the vendor and model in the Open Printing Database. This is an excellent way to see if the model is supported and if there are any known caveats with the print driver.

Once you know that your printer is supported, it is easy to setup your printer on PC-BSD. Make sure that the printer is plugged into your computer, or if the printer is a network printer, that it is connected to the network. Then, go to Application Launcher -> System Settings -> Printer Configuration. You will see a window similar to Figure 7.3a:

Figure 7.3a: Server Settings Window of Printer Configuration Utility

Before adding a new printer, you should review the "Basic Server Settings" options:

Show printers shared by other systems: check this box if you would like to use a printer that is connected to another computer on your network.

Share published printers connected to this system: check this box if you would like other computers in your network to use the printer connected to your computer.

Allow printing from the Internet: this box will be greyed out unless you first select the "Shared published printers" box. If you decide to check this box, you should configure the firewall that protects your network to only allow the computers you wish to be able to print from the Internet (e.g. if you would like your work computer to be able to send print jobs to your home printer).

Allow remote administration: if this box stays unchecked, only the computer connected to the printer will be able to edit the printer configuration or manage the print queue.

Allow users to cancel any job (not just their own): if this box stays unchecked, only the administrative user can cancel other user's print jobs.

Save debugging information for troubleshooting: check this box if you are having problems using the printer. This will add more verbose messages to the print log which is located in ls /var/log/cups/error_log.

If you make any changes, click the Apply button. You're now ready to create a printer.

7.3.1 Adding a Printer

If you highlight "New Printer" in the left frame of the Printer Configuration window, you'll see the two "Add New Printer" options shown in Figure 7.3.1a.

Figure 7.3.1a: First Step in Creating a New Printer

New Network Printer: this is typically the button you will use. Despite its name and description, clicking this button will allow you to connect to any of the following types of printers: a printer cabled to your computer, a network printer, or a printer connected to another computer on your network.

New Printer Class: if you have multiple printers (e.g. in an office), you can group them into classes. Print jobs sent to a printer class are forwarded to the first available printer in the class. You need to create the printers before you can add them to a class.

If you click the "New Network Printer" button, it will pause for a second or so as the wizard searches to see if any printers are connected to your computer or network. It will then display a window similar to Figure 7.3.1b:

Figure 7.3.1b: Printer Configuration Utility Has Found an Attached Printer

In this example, the printer configuration utility has found an HP Deskjet F4200 series printer attached to the computer's USB port. The wizard should find any supported printer that is attached to the computer or network and list it as the first entry in the Select Connection frame. If it finds your printer, simply click Forward to continue with the printer configuration wizard.

If it doesn't automatically list your printer, you will need to highlight and configure the type of connection to the printer:

USB: this entry will only appear if a printer is plugged into a USB port and the number of entries will vary depending upon the number of USB ports on the system. If there are multiple USB entries, highlight the one that represents the USB port your printer is plugged into.

AppSocket/HP JetDirect select this option if you are connecting to an HP network printer. You will need to input the IP address of the printer in the Host field and change the port number if the printer is using a port other than 9100.

IPP: select this option if you are connecting to a printer cabled to another computer (typically running a Microsoft operating system) that is sharing the printer using IPP. You will need to input the IP address of the printer in the Host field and the name of the print queue. You can then click the Verify button to ensure that you can connect to the print queue.

LPD/LPR: select this option if you are connecting to a printer which is cabled to a Unix computer that is using LPD to share the printer. You will need to select the hostname and queue name from the drop down menus.

Other: if you are having problems configuring your printer, you can manually type in the URI to the printer. A list of possible URIs is available here.

When you are finished, click the Forward button to advance to the window shown in Figure 7.3.1c.

Figure 7.3.1c: Selecting the Printer Manufacturer or PPD File

If the configuration wizard found your printer in the previous menu, the printer's manufacturer name will be highlighted for you. In this example, HP is highlighted. If your printer was not automatically found, you have 2 choices:

Highlight the name of the printer manufacturer and click Forward to proceed to the next screen.

Highlight the "Provide PPD file" button then click the Browse button to browse to the location of this file. A PPD is a file that contains instructions on how to print to a specific device. You'll find PPD files in the following locations: /usr/local/share/cups/model/gutenprint, /usr/local/share/foomatic/db/source/PPD, and /usr/local/share/ppd. When browsing for a PPD, look for the manufacturer name, then the model number that most closely matches your printer.

When finished, click Forward to proceed to the next screen, shown in Figure 7.3.1d.

Figure 7.3.1d: Selecting the Printer Model

This screen is used to select the printer model, and thus the driver to use for printing. If the wizard automatically found your printer, it will highlight the recommended driver for the printer. You can also manually select the driver in the left frame.

Note: while the wizard is pretty good at finding the best driver, it is not perfect. If the selected driver does not match your printer model, see if it is listed in the left frame. If it is not, use the Back button and see if you can browse for a PPD file that matches your printer model. If you can't find an exact match, try the recommended driver or the model number that most closely matches your printer.

After highlighting your selection, click the Forward button to proceed to the screen shown in Figure 7.3.1e.

Figure 7.3.1e: Adding a Description for the Printer

Changing the contents of this screen is optional. If you will be using the printer in utilities that require you to type in the printer name (e.g. xpdf), you can change the suggested printer name to something shorter. If you have multiple printers, you may wish to type in a description for the printer. You should leave the location as-is.

When finished, click the OK button to finish creating the printer. You will then be returned to the main screen and your new printer will be listed in the left frame, as seen in Figure 7.3.1f.

Figure 7.3.1f: Viewing the Settings of the Newly Created Printer

To determine that the printer is working correctly, click the "Print Test Page" button. If all went well, the test page will print. This means that the printer should now work within all of your PC-BSD applications (e.g. Okular, OpenOffice, your browser, etc.) If you can not print a successful test page, see the next section on Printer Troubleshooting.

You may wish to take a few minutes to review the settings in the Policies, Options, and Job Options tabs as these allow you to configure options such as print banners, the default paper size, double-sided printing, etc.

7.3.2 Printer Troubleshooting

If you have followed the instructions in the previous section but still can't successfully print, you may find your answer here. Here are some solutions to common printing problems:

A test page prints but it is all garbled: this typically means that you are using the wrong driver. If your specific model was not listed, click the Change button in the "Driver Details" section of the Settings tab of the printer and try choosing another driver model that is close to your model number. If trial and error does not fix the problem, see if there are any suggestions for your model in the Open Printing database. A Google search for the word freebsd followed by the printer model name may also help you to find the correct driver to use.

Nothing happens when you try to print: in this case it is useful to review the messages in the print error log which is located at /var/log/cups/error_log. A useful test is to type tail -f /var/log/cups/error_log in a konsole and then to try printing. Any new messages will be printed to the konsole. If the solution is not obvious from the error messages, try Googling the error message. If you're still stuck, post the error, the model of your printer, and your version of PC-BSD to either the Hardware Support forum or the Support Mailing List.

7.4 Services Manager

Services Manager, seen in Figure 7.4a, provides an easy-to-use graphical utility for managing some KDE and PC-BSD services. The listed services can be enabled/disabled at system startup and their current status can be toggled to stopped or running. To access this utility, go to Application Launcher -> System Settings -> Services Manager. You will be prompted to input the administrative password.

Figure 7.4a: Managing Services Using Services Manager

The following services can be managed with this GUI:

ACPI notebook module: this service should be enabled on laptops and can be disabled on PCs.

Avahi: KDE uses this service to discover printers and folders that are shared on the local network.

cpufreq: a control framework installed with PC-BSD to adjust CPU speed and voltage on the fly. This can save battery power because the lower the clock speed, the less power the CPU consumes. It is recommended for laptop users. You can learn more about this framework by reading man cpufreq.

CUPS: used by PC-BSD to provide access to printers.

Denyhosts: this script is installed with PC-BSD and analyzes log messages to determine what hosts are attempting unauthorized SSH access to your system.

NFS: the Network File System is installed with PC-BSD and used to share files between computers.

PF: the default PC-BSD firewall. It's recommended to keep the PF firewall enabled. Advanced users may be interested in reading the section on the Firewall Manager.

SSH a network protocol that allows data to be exchanged over a secure channel between two computers by using data encryption. SFTP and (SCP) capabilities are also handled through the SSH protocol.

swap monitor: a PC-BSD script that monitors swap space usage and activates 256MB increments as needed. The script itself is located in /usr/PCBSD/Scripts/swapmonitor.sh.

Note: PC-BSD 9 will include a control panel module that allows you to view every service on the system, configure their start-time behaviour, their current status, and to start/stop the service.

7.5 System Manager

The System Manager, shown in Figure 7.5a, is launched by clicking Application Launcher -> System Settings -> System Manager. You will have to input the administrative password to allow the System Manager window to open.

Figure 7.5a: General Tab of System Manager Utility

The General tab displays the following system information:

the version of PC-BSD

the version of the underlying FreeBSD base

the CPU type and speed

the amount of physical memory

The Generate button can be used to create a report that includes the following items:

the output of the dmesg command, which shows messages from the kernel

the last few lines of the /var/log/messages log file

the output of the pciconf -lv command, which lists all the devices that were found when the system booted

your X configuration file, which shows your display settings

your /etc/rc.conf file, which shows your startup settings

your /boot/loader.conf file, which shows which drivers are loaded at boot time

the output of the command df -m, which shows your amount of free disk space

a listing from the top command, which shows the currently running processes

When you click the Generate button, you will be prompted to input the name and location of the text file that will be created. Since it is a text file, you can view its contents in any text editor. When troubleshooting your system, this file is handy to include in your forum post or mailing list message.

The kernel tab of System Manager is seen in Figure 7.5b:

Figure 7.5b: The Kernel Tab of the System Manager Utility

This tab contains two configuration options:

Enable ATAPI DMA Mode: this setting determines the type of access mode used by CD/DVD (optical) drives. The default is to use PIO, which should work on most hardware. If you have an older optical drive, it may need to use DMA mode. Otherwise, leave the default as-is since DMA mode will slow down disk access on newer systems.

Boot delay (seconds): this indicates how many seconds the boot menu will wait for your selection before booting into PC-BSD. It can be set from 0 to 60 seconds. Don't set it too low or you won't be quick enough to be able to select another boot menu option such as single-user mode, vesa mode, or rerunning the display wizard.

The tasks tab, is seen in Figure 7.5c:

Figure 7.5c: Tasks Tab of the System Manager Utility

This tab is divided into two sections:

Ports Console: this section contains one option, to "Fetch Ports Tree". This will install the FreeBSD ports collection into Ports Jail.

System Tasks - Advanced Users Only: this section contains two options, to "Fetch System Source" and to "Fetch System Ports Tree". These options will install src or the ports tree into /usr. If you're not familiar with how to build FreeBSD kernels, world, or ports, you should not perform these tasks on your primary desktop. Instead, practice inside a virtual machine or on a test system.

The Misc tab is seen in Figure 7.5d.

Figure 7.5d: Misc Tab of the System Manager Utility

This tab allows you to configure whether or not the PC-BSD splash image appears during boot and the language of the splash screen. Uncheck this box if you prefer to watch the boot messages instead of the splash image. You can preview the splash images in Dolphin; they are located in the /usr/PCBSD/splash-screens/ directory.

7.6 Users Manager

The PC-BSD User Manager utility allows you to easily add and delete users and groups on your system, as well as change a user's or the administrative password. To access this utility, go to Application Launcher -> System Settings -> Password & User Account. After inputting the administrative password, you should see a screen similar to Figure 7.6a, though the names of your users accounts will vary:

Figure 7.6a: Viewing User Accounts in User Manager

In this example, the system has 2 user accounts. The "dru" account has the ability to become the superuser as the "Can administrate system" checkbox is checked. The password for any user can be changed by first highlighting the user name then clicking the "Change Password" button. Since the superuser is is using this utility, you will not be prompted for the old password in order to reset the password; this can be handy if a user has forgotten their password and can no longer log into the PC-BSD system. If you click the "Change Admin Password" button, you can change the password that is used whenever you are prompted for administrative access.

If you click the "Advanced View" button, this screen will change to show all of the accounts on the system, not just the user accounts that you created.

Figure 7.6b: Viewing All Accounts and Their Details

This screen allows you to add or remove accounts. Figure 7.6c shows the add user account creation screen--click the Add button to open this screen.

Figure 7.6c: Creating a New User Account

The accounts that you did not create are known as system accounts and are needed by the operating system or installed applications. This means that you should not delete any accounts that you did not create yourself; doing so may cause a previously working application to stop working. Advanced view provides additional information associated with each account, such as the user ID number, full name (description), home directory, default shell, and primary group. System accounts usually have a shell of "nologin" for security reasons, meaning that an attacker can't try to login to the system using that account name.

The following information is needed to create a new user or system account:

Username: this is the name the user will use when they log in to the system; it is case sensitive and can not contain any spaces. If you are creating a system account needed by an application, use the name provided by the application's installation instructions. If the name that you type in already exists as an account, it will be highlighted in red and the utility will prompt you to use another name.

Full Name: this field provides a description of the account and can contain spaces. If it is a user account, use the person's first and last name. If it is a system account, you can input a description to remind you which application uses the account.

Home Directory: you can leave this field empty for a user account as the system will automatically create a home directory for them under /home/username. However, if you are creating a system account it is important to override this default by typing in /var/empty or /nonexistent unless the application's installation instructions specify that the account needs a specific home directory.

Shell: this drop down menu contains the shells that are available for user accounts when they work from a command prompt. You can either keep the default or select a shell which the user prefers.

Primary Group: if you leave the default button of "New Group" selected, a group will be created with the same name as the user. This is usually what you want unless you are creating a system account and the installation instructions specify a different group name. Note that the drop down menu for specifying a group name will only show existing groups, but you can quickly create a group as described in the groups tab below.

Password: the password is case-sensitive and needs to be typed in twice in order to confirm the password.

Once you have made your selections, press the Ok button to create the account.

If you click the Groups tab, you can view all of the groups on the system, as seen in Figure 7.6d:

Figure 7.6d: Managing Groups Using User Manager

This screen has 3 columns:

Groups: shows all of the groups on the system.

Available: shows all of the system and user accounts on the system in alphabetical order.

Members: indicates if the highlighted group contains any accounts.

To add an account to a group, highlight the group name in the first column. Then, highlight the account name in the available column. Click the right arrow and the selected account will show in the members column. You should only add user accounts to groups that you create yourself or when an application's installation instructions indicate that an account needs to be added to a group.

If you click the Add button, a pop-up menu will prompt you for the name of the new group. Once you press OK, the group will be added to the groups column.

If you click the Remove button, that group will automatically be deleted after you press the Apply button, so be sure to do this with care. Again, don't remove any groups that you did not create yourself or applications that used to work may stop working.

7.7 Making a System Backup using Life Preserver

The built-in Life Preserver utility allows you to make a full backup of your PC-BSD system and store it on a remote system; for the purposes of this section, we'll refer to the remote system as a backup server. Life Preserver uses SSH and rsync, meaning that the remote system must have SSH and rsync installed. If the backup server is another PC-BSD system, these are already installed and configured for you. If the remote system is running another operating system, you will have to ensure that SSH and rsync are installed and that SSH is listening for connections.

Life Preserver is not the only way to make a backup on your system. For example, you may find it easier to drag and drop the files/directories that you wish to backup to an external device, such as a USB drive, using Dolphin. You'll also find a few PBIs of backup utilities using Software Manager. The advantage of Life Preserver is that it allows you to easily schedule backups to a backup server and the PC-BSD installation media supports restoring your system from a Life Preserver backup.

7.7.1 Creating a Backup

To make a system backup, go to Applications -> System -> Life Preserver Backup. Once you have input the administrative password, you will see the screen in Figure 7.7a.

Figure 7.7a: Initial Life Preserver Screen, Before Creating a Backup

By default, there aren't any preservers (backups) listed. To create a backup, go to File -> New Preserver which will launch the add new life preserver wizard. Click the Next button to get started and to see the screen in Figure 7.7b.

Figure 7.7b: Remote Device Configuration Screen

You will need to input the following information:

Host Name: of the remote system that will store your backup. If the backup server is on your local network, the host name must be in your hosts file or in the database of the local DNS server. You may find it easier to instead input the IP address of the backup server as this will eliminate any host name resolution problems.

User Name: this user must have permission to log in to the system that will hold the backup. If the account does not already exist, you should create it first on the backup server.

SSH Port: port 22, the default port used by SSH is selected for you. You only need to change this if the remote system is using a non-standard port to listen for SSH connections. In that case, use the up/down arrows to change the port number.

Note: if there is a firewall protecting the remote system, make sure that it allows connections to the specified port number from the IP address of the system that you wish to backup. If the backup server is running PC-BSD, you can use Firewall Manager to add an entry for SSH.

Once you click the Next button, you can decide whether or not to schedule regular backups, as seen in Figure 7.7c:

Figure 7.7c: Selection Screen to Automate Backups and Determine Their Frequency

By default, automatic backups are disabled, meaning you will have to manually start a backup when you wish to do so. If you decide to automate backups, you can choose to backup daily or weekly. Select a time (e.g. early morning) when you don't expect heavy network traffic between your computer and the backup server. After making your selection, click Next and you will see the informational message in Figure 7.7d.

Figure 7.7d: Life Preserver is Now Ready to Test the Connection to the SSH Server

Click the Finish button and a terminal will open where you can enter the password for the user account you specified, as seen in Figure 7.7e:

Figure 7.7e: Logging into the SSH Server

If this is the first time you have ssh'd to this host, you will have to type yes to accept the RSA key fingerprint before being prompted to type in the password. If the connection is successful, the terminal will close and your new preserver will show in the main panel, shown in Figure 7.7f:

Figure 7.7f: Life Preserver Shows a New Preserver

This entry indicates the username and IP address of the backup server, no previous backup has been made, automatic backups are disabled, and a backup is not currently in progress (running). To create a backup, click the Start button. Life Preserver will automatically connect to the backup server and the Status will change to Running. The backup will take some time as the entire system will be backed up.

Note: Backups will be quite large--about 6 GB in size, not counting the files that you have created--so you will want to choose a time when the network isn't being heavily used. If you are on a slow network, the backup will take some time. It is also important to make sure that the backup server has sufficient disk space to store your backup.

The backup will be stored on the remote system in the home directory of the user that was used by Life Preserver to login. The contents of the backup will be found in the life-preserver/<backup>/ subdirectory where <backup> is named according to the date and time stamp of the backup. The contents of the directory will mirror the directory structure of your PC-BSD system, making it very easy to find and restore individual files or directories from the backup server to your PC-BSD system. Here is an example listing of a backup on a remote server:

ls -Fa ~dru/life-preserver/back-2011-01-05T14_09_18/.cshrc            PCBSD@            home@             sbin/
.profile          Programs@         lib/              sys@
.rnd              bin/              libexec/          usr/
.snap/            boot/             mnt/              var/
.tar-extract.log  compat/           rescue/
COPYRIGHT         etc/              root/

7.7.2 Troubleshooting and Configuration Options

If there is a problem with the backup, you will find the Life Preserver logs in /PCBSD/lifePreserver/preservers/<host>/logs/, where <host> is the name of the preserver entry--in this example, dru@192.168.1.111. The log files will be dated and time stamped and will end with a .bz2 extension, indicating that they are compressed. You can read a compressed log file by typing bzcat in front of the log file name as seen in this example:

bzcat back-2011-01-05T13_45_22.log.bz2 | more

If the backup fails right away and there is only a few lines in the log file, the connection attempt was unsuccessful. Check that your network connection is up, that SSH is running on the remote server and that the SSH connection is not being being blocked by a firewall. If it is a non-PC-BSD system, double-check that rsync is installed on the backup server and that there is sufficient space to hold the backup.

If the backup proceeds for a while then ends with a Failed message in the "Last Backup" section of the entry, rsync found a file that it cannot backup. You'll know that this is the case if the log file includes the error message "rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c". Typically, this is not a problem but more of an indication that the rsync algorithm encountered a temporary file or file lock that disappeared before it could back it up. However, Life Preserver's default behaviour is to remove failed backups from the server in order to preserve disk space, meaning that the backup will have "disappeared" from the backup server. To change this default in order to preserve a backup that is marked as failed, right-click the preserver, select Edit, and uncheck the box "Remove incomplete or failed backups". This box is shown in Figure 7.7g:

Figure 7.7g: Life Preserver Settings

Press OK to save your configuration change and repeat the backup.

You can also modify the following settings seen in Figure 7.7g:

Number of backups to keep: make sure that there is enough disk space on the SSH server to store this amount of backups. If you do daily backups, a setting of 7 will keep a week's worth. If you do weekly backups, a setting of 4 or 5 will keep about a month's worth.

Remove incomplete or failed backups: by default, Life Preserver attempts to conserve disk space on the backup server by removing any failed backups. Uncheck this box if you are troubleshooting Life Preserver.

Disable automatic backups: if this is selected, a backup will only occur when you manually press the Start button.

Backup daily: if this is selected, a backup will occur every day at the time you select.

Backup weekly: if this is selected, a backup will occur on the day of the week and time you select.

Remote directory: a subdirectory with the name you specify will be created in the home directory of the user that logs in to the SSH server; this is where backups will be stored. The default subdirectory name is life-preserver.

Modify exclude list: provides a graphical interface for adding files/directories to exclude from backups. Clicking this button will open the screen seen in Figure 7.7h:

Figure 7.7h: Adding Entries to the Exclude List

Be sure to use the full pathname to the file or directory that you wish to exclude from the backup. Type it into the "Custom Exclude List" then click Add to save the entry. To delete an entry from the list, highlight it and click the Remove button.

If you read your backup logs, you'll note that Life Preserver already has its own exclude list. This list is stored in the hidden file /PCBSD/lifePreserver/preservers/<host>/.working-exclude-list. When you add your own entries, they do not affect this file. Instead, a file named exclude-list is created for you in the same directory.

7.7.3 Restoring a Backup

To restore files from a backup, right-click the preserver entry and select "Restore From". Life Preserver will query the backup server and show a list of available backups as seen in the example in Figure 7.7i:

Figure 7.7i: Selecting a Backup from the List of Available Backups

When reading the backup name, the number before the "T" is the date in YYYY-MM-DD format and the number after the T is the date stamp in HH_MM_SS format. Highlight the backup you wish to restore and click the "Select Backup" button to open the window seen in Figure 7.7j:

Figure 7.7j: Selecting the Files to Restore

If you wish to restore an individual file, input the full path of the file. In the example shown in Figure 7.7j, the user is restoring the file /etc/rc.conf. If you wish to restore a directory, input the full path of the directory. For example, "/etc" will restore the /etc directory and all of its files and subdirectories.

If you just input the name of the file or directory and click the Restore button, it will be restored to its original location. For example, the backup version of /etc/rc.conf would overwrite the current version of /etc/rc.conf on your PC-BSD system. This can be handy if you mess up this file on your PC-BSD system and wish to restore the original, working version.

If you instead check the "Restore Relative to specified directory" box, the selected file/directory will be restored to the location you specify. In the example shown in Figure 7.7j, the file /etc/rc.conf will be restored to /home/dru/Documents. In other words, it will not overwrite /etc/rc.conf on the PC-BSD system.

7.8 Managing Jails with The Warden

The Warden is an easy to use jail management program for PC-BSD and FreeBSD. Using The Warden, it is possible to create virtual environments which can be used to run services, such as Apache, PHP, or MySQL, in a secure manner. Each jail is considered to be a unique FreeBSD operating system and whatever happens in that jail will not effect your desktop or other jails running on the system.

The Warden is available for PC-BSD in the PBI format and a package is available for FreeBSD systems. Use Software Manager to install the PBI on a PC-BSD system. Figure 7.8a shows a search for warden within Software Manager.

Figure 7.8a: Installing The Warden Using Software Manager

Once the PBI is installed, you can launch The Warden by clicking on Application Launcher -> Utilities -> Warden. You will be prompted for the administrative password as only the superuser can create and manage jails.

To install and initiate The Warden on a FreeBSD system, use these commands as the superuser:

pkg_add -r warden

/usr/local/warden/scripts/rc.d/warden.sh

Which network interface do you want to run jails on?

nic: input your interface name here

Using for jails

This can be changed by running the following command at a later date:

pbreg set /PC-BSD/TheWarden/NIC <nic>

Reminder: You will need to create a default world environment for creating new jails!

To do so, use the following commands in your /usr/src (or alternate source dir)

# cd /usr/src

# make buildworld installword DESTDIR=/usr/local/warden/worlds/defaultworld

To start The Warden on a FreeBSD system, type warden gui (to use the GUI as shown in this section) or warden menu (to use the ncurses version) at the command line.

Note: the ncurses version allows you to perform the same tasks from a console. The screen layout is different and the screens are accessed using the arrow and enter keys rather than the mouse.

The first time you start The Warden, you will be presented with the main window, which should be empty as seen in Figure 7.8b.

Figure 7.8b: Initial Warden Screen

To create your first jail, go to File -> New Jail. A pop-up menu, seen in Figure 7.8c, will prompt you to enter the details for the jail.

Figure 7.8c: Creating the New Jail

The following information is needed to create a jail:

IP Address: this is the address you will use to SSH into the jail and access its contents. Choose an address that is not already in use on your network by another computer or jail. Use your arrow keys to move between the octets of the address as you type it in.

Hostname: you can change the default of "Jailbird" to another value. The hostname must be unique on your network.

Include system source: if you check this box, /usr/src/ will be populated with FreeBSD source. Source is needed if you wish to build world or recompile the kernel (both are described in Section 6.4, within this jail.

Include ports tree: if you check this box, the ports tree will be installed into /usr/ports/. This will allow you to compile FreeBSD ports within this jail, as described in Section 6.2.2.

Start jail at system bootup: if this box is checked, the jail will be started (become available) whenever you boot your main system. If the box is not checked, you can manually start the jail whenever you wish to access it using The Warden.

When you are finished, click the Create button. You will be prompted to set the root password and create a user account for this jail, as seen in Figure 7.8d. Since the jail will be accessible using SSH, both of the passwords should be secure.

Figure 7.8d: Setting the Login Information for the Jail

Once you click the Save button, The Warden will display status messages as it builds the new jail, as seen in Figure 7.8e. If you chose the options to include the FreeBSD source and/or ports tree it may take some time before the messages indicate that the jail was successfully created. When it is finished, a Close button will appear that you can click on to return to the main screen.

Figure 7.8e: The Warden is Creating the New Jail

Once the jail is created, it will be listed in the main screen. In the example shown in Figure 7.8f, there is one jail with an IP address of 192.168.0.23 and a hostname of Jailbird. This jail is currently stopped and it is not set to automatically start when the PC-BSD system boots.

Figure 7.8f: Viewing the Current Status of a Jail

To view the jail's configuration, highlight its entry then select Jails -> Configuration. Figure 7.8g shows an example of this jail's configuration:

Figure 7.8g: Viewing a Jail's Configuration

The following information is configurable:

Jail Network Interface: Warden will automatically select the interface that is connected to the network containing the jail's IP address. In this example, the IP address is on an internal, private network attached to the re0 Ethernet address.

Jail Directory: this is the directory on the PC-BSD system that contains the jail's filesystem. There will be a sub-directory for each jail with the same name as the jail's IP address. If you ever wish to backup your jail, this is the directory to backup.

Temp Directory this is the directory that will hold any temporary files created by the jail.

To start a jail, right-click its entry and select "Start this Jail" from the menu seen in Figure 7.8h. Once the jail has been started, you will be able to SSH to its IP address using the username and password you provided. You may need to open firewall port 22 using Firewall Manager, described in Section 7.1, if you are unable to connect to the jail. Once you have logged into the jail, you can do anything that you could do on a FreeBSD system. This is a good way to learn how to use FreeBSD without affecting your PC-BSD desktop. The FreeBSD Handbook is a handy reference for learning how to perform almost any task on a FreeBSD system.

Figure 7.8h: Options Available For a Jail

A jail's right-click menu contains the following options:

Start this Jail: will change a jail's Status from Stopped to Running. You will not be able to SSH into a jail until it is Running.

Toggle Autostart: will toggle a jail's Autostart between Disabled (does not automatically start when the PC-BSD system is booted) and Enabled (will start the jail when the PC-BSD system is booted).

Install Inmate into jail: inmates are described in the next section.

View installed packages: will show the output of pkg_info to determine which software, if any, has been installed within the jail.

Export jail to .wdn file: this type of file is described in the Exporting/Importing Jails section.

Delete Jail: this will remove the jail and all of its contents from the PC-BSD system.

7.8.1 Installing Inmates

An inmate is a pre-configured software installation that allows you to quickly get a service up and running within a jail. Software Manager can be used to find and download inmates. Figure 7.8.1a shows the results of searching for "inmate" within Software Manager's software browser:

Figure 7.8.1a: Using Software Manager to Find Inmates

In this example inmates are available to install an Apache/PHP environment and a Joomla/Apache/MySQL environment. Installing an inmate can save a lot of time installing the individual packages needed to setup either of these environments. Once installed, you will still be able to customize the configuration of the installed software to suit the jail's purpose.

Note: before downloading an inmate, it is important to make sure that Software Manager is configured to save downloaded files. To do so, click the Configuration button -> Software tab. Make sure the box "Keep downloaded software in temporary directory" is checked. The location of this temporary directory can be viewed and edited in the Misc tab.

Click on the inmate you wish to install and select its Download icon. Once the download is complete, highlight the jail in The Warden and select "Install Inmate into jail" from the right-click menu. This will open up a screen where you can browse to the location of the .wit file that you downloaded using Software Manager. Once the inmate is installed, you can verify which software was installed by right-clicking the jail and selecting "View installed packages". You can now configure the installed packages to meet your needs.

7.8.2 Exporting/Importing Jails

Exporting a jail allows you to save the jail (and all of its software, configuration, and files) as a .wdn file. This allows you to quickly clone a pre-configured jail to a new jail.

To create a .wdn file, right-click the jail and select "Export jail to a .wdn file". You will be prompted to choose the directory in which to store the backup. A progress bar will indicate that the backup is in progress. Creating the .wit file may take some time, especially if you have installed src or ports or have installed inmates or other software.

Note: you should not be logged into the jail while exporting it as Warden will need to stop the jail in order to back it up. If your jail is running services (e.g. a webserver), you should select to export the jail at a time that will least impact network connections to the jail.

The exported jail will end with a .wdn extension and the filename will be the IP address of the jail.

To create a new jail using the .wdn backup, select File -> Import Jail. You will be prompted to browse to the location of the .wdn file. Once selected, you will be prompted whether or not to use the same IP address for the new jail. If you are creating a new jail on the same system that still has the original jail installed, select No and input the IP address for the new jail. However, if you have deleted the original jail or need to restore that same jail on another computer (for example, there was a hardware failure on the system containing the original jail), you can choose to use the same IP address. You will then be prompted whether or not to use the same hostname. Again, only say Yes if that hostname is no longer in use; otherwise, select No and input a unique hostname for the jail. Warden will then recreate the jail with all of the original settings. Whether or not those settings include the original IP address and hostname depends upon your selections.

8 Finding Help

While professional PC-BSD support is available from iXsystems, most users turn to the Internet for help. We are doing our best to make PC-BSD as easy as possible for newcomers. Should you need help, there are plenty of ways to get in touch with the PC-BSD community. This section discusses the following help resources:

PC-BSD Forums

FAQS

IRC Channel

Mailing lists

FreeBSD Handbook and FAQ

Forums

Social Media

Search and Portals

Other Resources

8.1 PC-BSD Forums

The PC-BSD Forums contain a wealth of information, tips and solutions which you can access from a web browser. There are many active members and you will find that most questions are replied to quickly. If you are having problems with something on your PC-BSD system, try using the forum's search utility. You'll often find that someone else has posted a similar question and that other users have responded with a fix or a how-to.

The Forums have been categorized, allowing users to skim through the categories that interest them while learning some things along the way. You do not have to create a login account in order to search or read through the forums. However, if you wish to ask or answer a question on a forum or subscribe to a forum or a thread (to be automatically notified when a new post is added), you will need to be logged in. To subscribe to a forum, open the page for the forum and select Forum Tools -> Subscribe to this Forum. You will be prompted to choose how often to be notified whenever a post is added to the forum. If you wish to subscribe to a specific post, open the post and select Thread Tools -> Subscribe to this Thread. You will be notified whenever someone responds to that post.

The current categories and the forum descriptions are described below:

The General category contains the following forums:

Announcements: this is a read only forum containing announcements of new releases and news related to PC-BSD. Subscribing to this forum is a good way to keep up-to-date with the latest news about PC-BSD.

General Questions: use this forum if your question does not fit into any of the other forum categories.

The Lounge: this is a general discussion area for PC-BSD users. Posts in this forum are not of a technical nature. Posts should be of interest to other PC-BSD users and not contain any mature or slanderous content.

Advocacy: this is a brainstorming area for promoting PC-BSD.

Guides: this forum contains how-tos and guides for performing specific tasks on PC-BSD.

Tips and Tricks: this forum contains suggestions for configuring and tweaking your PC-BSD system.

Books on PC-BSD: this forum contains errata and discussion for published books about PC-BSD.

PBI developers subscribe to the PC-BSD Software (PBI files) category to become aware of any problems with current PBIs and to receive requests for software that should be made into a PBI. If you start a post a in any of these forums, you should subscribe to it so you can be notified of any responses to your post. The forums in this category include:

PBI Discussion: a general discussion area for resolving PBI problem reports. If you have a problem installing or using a PBI, post the details in this forum.

PBI Requests: do you have a favourite software that is not currently available as a PBI? You can request it in this forum. Be sure to read the Readme first post if this is your first PBI request.

Finished PBIs: once a new PBI is created as the result of a PBI request, the original request is moved to this forum.

Port Requests: do you have a favourite software that is not currently available as a FreeBSD port? You can request it here; if someone does make a port it can also be converted into a PBI as PBIs are based on FreeBSD ports. Again, read the Readme first file if this is your first port request.

The Support category deals with the following types of support questions. PC-BSD developers are subscribed to this list so they can help determine what is causing the problem, and if a fix is made available, can commit it for the next version of PC-BSD. If you start a post a in any of these forums, you should subscribe to it so you can be notified of any responses to your post.

General Bug Reports: if you are having a problem on your PC-BSD system that does not match any of the other forum categories, you can report it here. Read any posts marked as "sticky" (they will always be at the top of the forum) if this is your first bug report.

Installing PC-BSD: if you are having problems installing PC-BSD, post the details of your problem to this forum.

Startup Bug Reports: if you have been able to install PC-BSD but are having problems booting into PC-BSD, post the details of your problem in this forum.

Usage Bug Reports: if you are having problems performing a task or using the software that was installed with your PC-BSD system, post the details of your problem to this forum.

FreeBSD Help: if you suspect that your problem is not with PC-BSD but with the underlying FreeBSD operating system, post the details of your problem in this forum. The Looking for FreeBSD Help? README FIRST! post should be read first.

The Hardware Support category is for reporting hardware-related problems. PC-BSD developers are subscribed to this list so they can help determine what is causing the problem, and if a fix is made available, can commit it for the next version of PC-BSD. If you start a post a in any of these forums, you should subscribe to it so you can be notified of any responses to your post. Be sure to read the README first before posting.

General Support: if your hardware problem does not match any of the other forum categories, post the details of your problem in this forum.

Graphics Cards: if you are having problems with your video card settings, post the details of your problem to this forum.

Sound and Multimedia: if you are having problems with sound or in playing multimedia such as CDs or videos, post the details of your problem to this forum.

Networking: if you are having problems using or configuring a network interface, post the details of your problem to this forum.

Laptops: if you are having problems with power management or other laptop-specific issues, post the details of your problem to this forum.

Drives: if you are having problems accessing or formatting CD, DVD, USB or hard drives, post the details of your problem to this forum.

The Development category contains the following forums:

Creating PC-BSD Packages (.pbi files): this is a discussion area for PBI developers who need help with or have questions about creating a PBI.

Feature Requests: do you have an idea for a feature that you'd like to be available in PC-BSD? This is the forum to request it.

Translations: this is a discussion area for translators who localize PC-BSD menus or translate PC-BSD documentation.

Documentation Project: this is a discussion area for those who wish to help with PC-BSD documentation.

PC-BSD Installer: this is a discussion area for feature requests and testing of the PC-BSD installation program.

The Testing category is for PC-BSD beta testers to report problems found in upcoming versions of PC-BSD. It contains the following forums:

General Testing: if your problem is not related to one of the following desktop environments, report the problem in this forum. Be sure to read the sticky threads first as they contain useful information about beta testing and any known issues with the testing snapshot.

KDE: if your problem is related to the KDE desktop or KDE applications, report the problem in this forum. Be sure to read README first for instructions before posting.

Gnome: if your problem is related to the GNOME desktop or GNOME applications, report the problem in this forum. Be sure to read README first for instructions before posting.

XFCE: if your problem is related to the XFCE desktop, report the problem in this forum. Be sure to read README first for instructions before posting.

LXDE: if your problem is related to the LXDE desktop, report the problem in this forum. Be sure to read README first for instructions before posting.

Fluxbox: if your problem is related to the Fluxbox desktop, report the problem in this forum. Be sure to read README first for instructions before posting.

Ports Testers: if your problem is related to a FreeBSD package or port, you can report the problem in this forum. Be sure to read README first for instructions before posting.

The International category contains forums for non-English speakers for PC-BSD related discussions in their native language. Each forum has its own categories for organizing posts. The following forums are available:

Spanish - Español

French - Français

German - Deutsche

While logged into the forums, a link called UserCP will appear in the upper left hand corner. This is your control panel and it contains many settings to customize your forums experience. You should review the settings in your Control Panel.

Before asking a question on the forums or starting a new thread, first use the search utility to see if a similar thread already exists. If one does, you can add to the conversation by using the Reply button. If you find a thread useful, feel free to click the Thanks button to let the original poster know that you benefited from their knowledge.

If a similar thread doesn't already exist, review the forum categories to determine which one is the best fit for your post. When creating a new thread, use a useful Title name to describe your problem or question--remember, other users may be researching a similar issue and you want them to find your thread. Include enough details in your message so that others can quickly understand what you are experiencing--otherwise, they will have to ask you additional questions to understand your problem. Make sure you are subscribed to your thread so that you will receive a notification when someone responds to it.

You can ask a question by clicking on the "New Thread" button in the forum category that most closely matches your question. For example, if you are having problems with your video settings, you should create a new thread in the Graphics Card forum. If you don't see a category that matches your question, try the General Support category.

In addition to the forums available from the PC-BSD Forums website, the following forums may assist you in troubleshooting your PC-BSD system:

FreeBSD Forums: many PC-BSD problems are related to the underlying FreeBSD operating system. The FreeBSD forums are very active and full of useful information that can apply to your PC-BSD system.

BSD Nexus: contains categories for each of the BSD operating systems as well as general BSD information.

BSD Foren: these forums are in German and contain many categories for each of the BSD operating systems.

FreeBSD Mexican Community: these forums are in Mexican Spanish and contain categories for the FreeBSD operating system.

BSD Guru PC-BSD Forum: this forum is in Polish and is specific to PC-BSD. Additional Polish forums for the other BSD operating systems are available here.

8.2 FAQS

The acronym FAQ stands for Frequently Asked Question. For that reason, you should always check the FAQS before asking a question, just in case it has been answered many times before.

You can find the most current version of the PC-BSD FAQS here. The FAQs are currently a work in progress as we migrate the older FAQS and ensure that their answers work on current versions of PC-BSD. You can suggest an FAQ that you would like to see answered here.

8.3 IRC Channel

Like many open source projects, PC-BSD has an IRC channel to connect supporters and users. To get connected, use the following information in your IRC client:

Server name: irc.freenode.net

Channel name: #pcbsd

Software Manager has a "Chat -IM" category where you can find PBIs for IRC clients. If unsure which IRC client to use, we suggest KVirc or XChat.

IRC is a great way to chat with other users and get answers to your questions. A few things to keep in mind if you ask a question on IRC:

Most of the regular users are always logged in, even when they're away from their computer or are busy doing other computing tasks. If you don't get an answer right away, don't get mad, leave the channel and never come back again. Stick around for a while to see if anyone responds.

IRC users represent many different time zones. It is quite possible that it is late at night or very early in the morning for some users when you ask a question.

Don't post error messages in the channel as the IRC software will probably kick you out. Instead, use a pasting service such as pastebin and refer to the URL on channel. If you prefer to paste an image of your error, you can upload it to a temporary screenshot hosting service such as Upload Screenshot and post the URL to your uploaded image.

Be polite and don't demand that others answer your question.

It is considered rude to DM (direct message) someone who does not know you. If no one answers your question, don't start DMing people you don't know.

The first time you join a channel, it is okay to say hi and introduce yourself.

8.4 Mailing lists

Mailing lists are a handy way to discuss problems, solutions, and requested features as they create a searchable archive of discussions. The PC-BSD Project offers the following mailing lists to cover a wide variety of discussion topics:

Announcements: a read-only, low frequency list used by the PC-BSD team to make announcements to the community.

Commits: lists SVN commits as PC-BSD code is added or modified by developers.

Dev: for discussion related to PC-BSD technical development.

Docs: for communications between those involved, or interested in contributing to, the PC-BSD documentation effort.

Installer: for discussions about the backend to the pc-sysinstall utility.

PBI-bugs: for users to report and discuss bugs found in PBI applications.

PBI-dev: for discussions between PBI developers and users concerning PBI construction and maintenance.

PBIbuild: lists SVN commits as PBIs are added or modified by PBI developers.

PCBSD-Malaysia: general discussion list for Malaysian users in their native language.

PCBSD-warden: the place to discuss The Warden software for PC-BSD.

Public: general public list for discussion not related to the other mailing lists.

Support: if you have a problem, you should report your issue or error messages on this list.

Testing: for those wishing to participate in PC-BSD beta testing and feedback.

Trac-bugs: lists notifications about changes to PC-BSD bug reports in Trac database.

Translations: for those involved in translating for PC-BSD.

Each mailing list includes a description of topics suitable for discussion on that list and indicates if it is read only or available for user discussion. Anyone can read the archives for a list. If you wish to send an email to mailing list, you will need to first subscribe to the list. The link for each mailing list provides an interface for subscribing to that list. When you send an email to the list, remember to use the mailing address that you used when you subscribed to the list.

Several of the mailing lists are archived at gmane. Gmane allows you to read the archives in several different formats. It also provides RSS feeds in various formats for keeping up-to-date on new messages and topics.

Apart from these official mailing lists, there's also a number of non-official mailing lists set up by PC-BSD users. Many of these lists are designed for discussion in other languages. A list of alternative PC-BSD mailing lists can be found here.

8.5 FreeBSD Handbook and FAQ

PC-BSD has FreeBSD as its underlying operating system, so everything in the FreeBSD Handbook and FreeBSD FAQ applies to PC-BSD as well. Both are very comprehensive and cover nearly every task you can accomplish on a FreeBSD system. They are also an excellent resource for learning how things work "under the hood" of your PC-BSD system.

Note: some configurations described in the FreeBSD Handbook already "just work" on your PC-BSD system as they have been pre-configured for you. In these instances, reading that FreeBSD Handbook section can help you to understand how your system was configured and how it works.

8.6 Social Media

The PC-BSD project maintains several social media sites to help users to keep up-to-date with what is happening and to provide venues for developers and users to network with each other:

Official PC-BSD Blog

PC-BSD on Twitter

PC-BSD Facebook Group

PC-BSD LinkedIn Group

Spread PC-BSD Wiki

8.7 Search and Portals

Many BSD related search portals exist. If you can't find the answer that you're looking for in the forums or mailing lists, try searching these websites:

Google BSD

The OpenDirectory

FreeBSD mail archives search

FreeBSD News

BSDFreak

BSD News Network

About BSD

BSD Guides

O'Reilly's BSD Devcenter

Slashdot BSD

DistroWatch

LinuxBSDos

8.8 Other Resources

The following BSD sites and resources may also contain useful information:

PC-BSD Germany

PC-BSD Poland

PC-BSD Russia

The FreeBSD Diary

A Year in the Life of a BSD Guru

BSD Guru (Polish)

Ilmu BSD (Indonesian)

Mfaridi.com (Farsi)

BSD Youtube channel

PC-BSD Youtube channel

PC-BSD Videos

BSD Talk

The BSD Show

BSD Magazine

BSD Hacks (book)

Definitive Guide to PC-BSD (book)

PC-BSD Section at Polish Linux (in English)

PC-BSD Section at Jaki Linux (Polish)

Screaming Electron's tutorials

FreeBSD How-Tos for the Lazy and Hopeless

KDE Documentation

9 Supporting PC-BSD

PC-BSD is a community project and relies on involvement from its users and supporters. This section lists some ideas for becoming involved. We also have a list of Tasks Looking for People if you are looking for a specific task to assist with.

Become a Beta Tester

Become a Translator

Become a Developer

Report Bugs

Submit PBI Requests

Test PBIs

Create PBIs

Donate Money

Host a Mirror

Become an Advocate

9.1 Become a Beta Tester

If you like playing around with operating systems and have a bit of spare time, one of the most effective ways you can assist the project is by reporting problems you encounter using the current release of PC-BSD.

If you have a spare system or virtual machine, you can also download and try out the latest alpha, beta or release candidate snapshots. These versions are still in testing and haven't been officially released yet. Having as many people as possible using PC-BSD on many different hardware configurations assists the project in finding and fixing bugs. This makes using PC-BSD better for everyone.

Note: As of November, 2010, alpha testing snapshots for the upcoming 8.2 and 9.0 releases are available and are updated every few weeks to address bug reports. PC-BSD releases occur shortly after the FreeBSD release to allow for some extra testing. Currently, the projected release date for 8.2 is January 2011 and for 9.0 is June or July 2011. Subscribing to the PC-BSD blog is a good way to keep up-to-date on the availability of testing snapshots and any major bugs that are found within a snapshot.

If becoming a tester interests you, subscribe to the testing mailing list. As new testing versions become available they will be announced on this list. You will also be able to see what problems other testers are finding and can check to see if the problem exists on your hardware as well. You can also subscribe to Gmane's RSS feeds if you want a quick way to keep up with the subjects being discussed on the testing mailing list.

Anyone can become a beta tester. Follow these tips so that you can accurately describe your findings so they can be fixed as soon as possible:

before sending an email, search the testing mailing list to see if anyone else has reported a similar problem.

when reporting a new issue, use a descriptive subject in your email that includes the error and the version of PC-BSD. Ideally, the subject is short (8 or less words) and contains key words about the error. An example would be "Warden on 8.1 fails to export jail".

ensure that the body of your email includes the PC-BSD version and architecture (e.g. 8.1 RC2, 64 bit version).

give a short (2-3 sentences) description of how to recreate the error (e.g. when I right click a jail in warden and select Export jail to a .wdn file, it lets me select a file name, but then it freezes). If there is an error message, include its text.

include any other info that may be useful (e.g. this seems to work on my 32 bit system or this used to work on 8.0).

if the problem appears to be hardware related, include a copy of /var/run/dmesg.boot as this file shows the hardware that was probed the last time the PC-BSD system booted.

9.2 Become a Translator

PC-BSD uses Pootle for managing localization of the menu screens used by the installer and the PC-BSD utilities. Pootle makes it possible to find out if your native language has been fully localized for PC-BSD. Pootle also makes it easy for users to check and submit translated text as it provides a web editor and commenting system. This means that translators can spend their time making and reviewing translations rather than learning how to use a translation tool.

To see the status of a localization, open up the PCBSD Translation System in your browser, as seen in Figure 9.2a:

Figure 9.2a: The PC-BSD Pootle Translation System

The localizations PC-BSD users have requested are listed alphabetically on the left. If your language is missing and you would like to help in its translation, send an email to the translations mailing list so it can be added.

The green bar in the Overall Completion column indicates the percentage of PC-BSD menus that have been localized. If a language is not at 100%, it means that the menus that currently aren't translated will appear in English instead of in that language.

If you click on a language name then click on the pcbsd hyperlink under the "Name" column, you'll see each menu item that is available for translation. The example shown in Figure 9.2b is for the Greek localization:

Figure 9.2b: Viewing a Language's Available Menus

In this example, the menu for CrashHandler is complete, but the one for LifePreserver is not.

If you click on the Review tab, you'll see a list of statistics as seen in Figure 9.2c. This page will indicate the results of Pootle's quality checks, helping translators to notice any problematic items. A description of each quality check can be found here.

Figure 9.2c: Reviewing a Language's Quality Checks

If you wish to help localize your language, you should first join the translations mailing list and introduce yourself and which language(s) you can assist with. This will allow you to meet other volunteers as well as keep abreast of any notices or updates that may affect the translations. You will also need to create a Pootle login account.

Once you are logged in to Pootle, navigate to the menu item that you wish to translate. Figure 9.2d continues the earlier example by clicking on the link for the Greek version of LifePreserver.po.

Figure 9.2d: Using the Pootle Interface to Edit a Translation String

In this example, the first string (the word Disabled) has been translated but is failing 2 of the quality checks. The translator can check the correctness of the translation as well as fix the whitespace and double-spacing issue. Once finished, the translator can click the "Add Comment" link to type in an optional comment then press the "Submit" button to save any changes. Each text field (string) in the menu is numbered--click on the hyperlink associated with the number to open that text field in the Pootle editor, or use the Next and Previous links to navigate between text fields.

If you need help with a translation or using the Pootle system, you can ask for help on the translations mailing list or in the PC-BSD Translations Forum.

9.3 Become a Developer

If you like programming, and especially coding on FreeBSD, we'd love to see you join the PC-BSD Team as a PC-BSD committer. Developers who want to help improve the PC-BSD codebase are always welcome! If you would like to take part in core development, and possibly earn a commit bit, a good place to get started is by signing up for the developers mailing list. Once you've signed up feel free to browse our active TODO list, or search for bugs that need fixing in the PC-BSD Trac database. If you see something of interest you want to work on, or have a proposal for a project you wish to add to PC-BSD, please feel free to let us know via the developers list and we'll be happy to help get you started.

Most of the PC-BSD specific GUI tools are developed in C++ using the QT Libraries, and other non-GUI development is done using standard Bourne shell scripts. There may be cases where other languages or libraries are needed, but those will be evaluated on a case-by-case basis, so feel free to let us know your proposals on the developers mailing list.

Developers will also find the following resources helpful:

Commits Mailing List

Development Wiki

Getting PC-BSD Source

qmake Manual

9.4 Report Bugs

Found a bug in PC-BSD? If so, please take the time to read through this section first to ensure that your bug gets reported to the correct group and is resolved in a timely fashion.

The first thing to determine is the type of bug you are encountering. Is it a bug that is preventing you from properly installing and running PC-BSD (a system bug), or is it an issue with an installed software package such as FireFox (an application bug)?

An application bug can fall into a few different categories:

Application Packaging Bug

The first is a packaging bug, which is when you cannot install the application or it simply crashes on startup. For these types of bugs, please report them on our Trac Database (after logging in) and for the Type, select "PBI Packaging Bug". Please provide as much detail as possible about the bug, such as:

Name of Program

What version of PC-BSD you are running

What architecture you are using (32bit or 64bit)

Detailed description of the bug, including a copy of the crash logfile, if generated

Application Runtime Bug

An application runtime bug occurs when an application installs and is able to start successfully, but during use, it crashes or displays some other type of undesired behavior. An example would be OpenOffice failing to import a type of document properly or a chat client unable to keep a connection to a network. These types of bugs are best reported to the developers of the application. The best way to locate them is by searching for your application in Software Manager, then clicking the "Vendor" link. Most software sites have a "bug report" link or another way to contact the original developer to report your issue.

A system bug is any bug which prevents the initial installation of PC-BSD or issues with hardware. Some examples would be a non-bootable system, failed installation, missing drivers for your hardware, or a non-functional desktop after installation. To report this type of issue, please follow the instructions below for your type of system bug:

System Driver Bugs

An example of a driver bug would be a missing network driver, no sound output, or no disk drives detected. Most of these types of issues are directly related to the FreeBSD base upon which PC-BSD is built, and are best fixed by discussing them with the FreeBSD team directly. Reporting a bug to FreeBSD can be done using the Send PR page. You should also search the FreeBSD mailing lists as other users may have already discovered the bug or have a work-around for your particular hardware. Below are some of the related mailing lists:

ACPI - Power Management and ACPI Development

Emulation - Place to discuss Linux, VirtualBox, Wine and Linux Flash plugin support

Multimedia - Sound Drivers and Multimedia Applications

USB - USB Support and Development

Xorg - Xorg / Video Drivers and Development

System Installation Bugs

Any bugs encountered during the installation routine of PC-BSD should be reported to the Trac Database, with as much detail as possible, including:

PC-BSD version and architecture

hardware information, disk sizes, amount of RAM and CPU

specific installation notes such as any non-standard features chosen or a custom disk layout

information in the "more details" box of the installation failed dialog box

Other System Bugs

Please report any bugs with HAL or external USB disk mounting using the instructions here. Report issues specific to running the KDE desktop to the KDE on FreeBSD Bug Tracker and general KDE bugs to the KDE Bug Tracking system.

9.5 Submit PBI Requests

Is an application that you need not currently available as a PBI? Making a PBI request is an excellent way to let PBI developers know which applications are most useful to PC-BSD users. Before requesting a PBI, please do the following:

check in Software Manager to see if a PBI already exists. If one does but you want to request a more recent version, please say so in your request.

search at Freshports to see if there is an existing FreeBSD package as it is much easier and quicker to make a PBI from an existing package. If a package does not already exist, please say so in your request.

check to see if a request has already been made in the PBI Requests Forum or PBI-dev Mailing list.

To make your request, start a new thread in the PBI Requests Forum. If this is your first forum post, you will need to use the Register hyperlink to create a username and password so you can login to make your request.

Note: you don't need to login to read the content in the PC-BSD forums; you do have to login in order to start a new thread or respond to an existing one.

Once you have submitted your request, click the Thread Tools link -> Subscribe to this Thread -> and select your Notification Type so that you can be notified of any responses to your request. If you would like to receive notifications about all of the PBI requests in this forum, click Forum Tools -> Subscribe to this Forum while in the forum.

When creating a new forum thread, include the name of the PBI you are requesting in the thread name. That way it is easy for PBI developers and other PC-BSD users to know which applications have been requested.

People who create PBIs are subscribed to both the PBI Requests forum. Usually, someone will respond to a request within a few days either indicating that they are working on creating the PBI or with an explanation if creating a PBI will be problematic. The PBI process is as follows:

a user requests a PBI

someone responds to the request and creates a PBI module

the PBI module is sent to the pbi-dev mailing list so it can be added to the PBI build server

the PBI module is built on the PBI build server

once the PBI is built, PBI testers test for basic functionality such as verifying that the application starts and its menus appear to be present and working

once the PBI is tested, the PBI is uploaded to PBIDir so it can be available in Software Manager

once the PBI is uploaded, the PBI request is moved from the PBI Requests Forum to the Finished PBIs forum

Please note that it takes at least 2-7 days for a new PBI to go from step 3 to step 7 as it needs to be fully tested. If there is a delay, that usually means that a problem was found in the PBI and that the testers are trying to resolve the problem.

The next section explains how you can assist in the PBI testing process.

If you wish to be notified whenever a new PBI is added or an existing one is upgraded to a newer version, subscribe to the Latest PBI RSS feed.

9.6 Test PBIs

The previous section indicated that new PBI modules are uploaded to the PBI build server. There are actually several build locations, according to PC-BSD version and architecture:

PC-BSD 7.x - i386

PC-BSD 7.x - amd64

PC-BSD 8.x - i386

PC-BSD 8.x - amd64

PC-BSD 9.x - i386

PC-BSD 9.x - amd64

Figure 9.6a shows a sample from the PC-BSD 8.x 32 bit location.

Figure 9.6a: Viewing the Status of PBIs on the Build Server

There are two ways you can assist in testing PBIs.

First, if you wish to help test a PBI before it has been approved, go to the build location for your version and architecture. Find the name of the PBI you wish to test in the Module column and click its hyperlink. You can then download the file with the .pbi extension. If you double-click the downloaded PBI in Dolphin, it will install the PBI for you. If you find any problems with the PBI, send an email to the PBI-dev mailing list describing how to recreate the problem. Include the text of any error messages you receive.

Second, you can try to resolve PBI modules that have a Build Status of FAILED. If you click on the name of a failed module, you can download the build.log.bz2 for that module. To access this file, you can either:

bunzip2 build.log.bz2 to unzip the file so you can send it to a text processor to read it.

or

bzcat build.log.bz2 to read the file without unzipping it. It will scroll down to the end, where the error occurred. Use bzcat build.log.bz2 | more if you prefer to scroll through the file.

If you think you know the cause of the problem after reading the error messages, you will need the module itself to try to resolve the problem. Modules are located in the PC-BSD subversion repository. To download the module, you can use the svn command. To give an example, the math/scilab PBI was flagged as FAILED in Figure X-XX. To download that module, cd to a suitable directory and issue the following command. Note that the svn command uses the svn:// URI (instead of http://) and does not include the /browser/ section you see in the URL if you use your web browser to browse the modules.

svn co svn://svn.pcbsd.org/pbibuild/ modules/math/scilab

This example command will create a directory called scilab and place the module's files in that directory. If you make changes to these files to correct the problem, create a tar.gz of the directory and send the tarball to the PBI-dev mailing list so the changes can be uploaded to the build server.

9.7 Create PBIs

If you wish to create a PBI for PC-BSD versions 7.x or 8.x, refer to the instructions in the The PBI Module Builder Guide.

The PBI format for 9.x is different and the PBI Format for 9.0 and Beyond describes the changes. Documentation will be added to the PC-BSD 9 Handbook describing how to build PBI modules in the new format.

9.8 Donate Money

To help the PC-BSD project financially, why not consider making a donation if you're happy with our product? Alternatively you can buy your PC-BSD installation CD/DVD and cool stuff from FreeBSD Mall, PC-BSD's sister company. Companies may consider buying professional support from iXsystems.

9.9 Host a Mirror

We are always interested in more download mirrors. If you have spare web space and bandwidth on your server, you can greatly help the PC-BSD project and PC-BSD users by becoming a mirror. More mirrors means higher download speeds and more geographic locations for users to download from.

Note: You don't have to run a server to help increase download speeds for other users. PC-BSD is also distributed as a torrent and you can help us with seeding, especially the first two weeks after a new release. If you're new to seeding, check out the FAQ.

Mirrors are the lifeblood of any open source project such as PC-BSD. If you have a system with a high-speed connection, 150-200GB of space, and the ability to rsync with a host, then we need you!

As an example, this rsync command will mirror the entire ISO and PBI collection:

rsync -vaz --delete isc.pcbsd.org::ftp .

That command should be run as a cron job with a recommended frequency of once daily.

Once you've begun the rsync process, please send an email to kris@pcbsd.org letting him know of the mirror URL so the new mirror can get listed and become available to users.

9.10 Become an Advocate

So you love PC-BSD? Why not tell the world about it? Your family, your friends, fellow students and colleagues? You won't be the only one that likes a free, virus-free, spyware-free and adware-free operating system. Here are some suggestions to get you started:

You can brainstorm and network with other PC-BSD advocates at the Spread PC-BSD Wiki.

You can burn a couple of DVDs and pass them out. If your school or user group has an upcoming event where you can promote PC-BSD, you can request additional DVDs at sales@pcbsd.com.

Webmasters and bloggers can put a Spread PC-BSD button on their site.

Consider giving a presentation about PC-BSD at a local community event or conference. Let us know about it and we'll help you spread the word.