Use PC-BSD Installer to Install FreeBSD

Disk Encryption

Using a Custom Partition Layout

THIS SECTION NEEDS UPDATING AND GEOM/GPART DESCRIBED

The "Detected Hard Drives" field lists the disks that PC-BSD has found during boot up, from which one needs to be selected. If you want PC-BSD to use the entire disk, for instance if you don't have any other operating systems on your PC, and no separate partition is used to store documents, you can check the "Use entire disk" option underneath to use all disk space of your hard disk drive. Be very careful when you select "Use entire disk" as it will overwrite all partitions!

In FreeBSD, and hence PC-BSD, each partition has a code in front of them, such as /dev/ad0s1, which is the path to the device (dev) file. Naming convention is as follows:

ad0 or da0 means "first drive"

---s1 means the first "partition" or slice in FreeBSD vocabulary

FreeBSD, starts counting disk drives from "0", and starts counting partitions from "1". Here are a few examples:

/dev/ad0s1 — First drive, first partition

/dev/ad1s1 — Second drive, first partition

/dev/da0s3 — First drive (SCSI), third partition

/dev/da1s1 — Second drive (SCSI), first partition

You also need to select the partition on which you want to install PC-BSD. If you already have more than one partition, all of them will be listed under the "Partition Selection" box. Select the one you want to use.

If Microsoft Windows is already installed and if you wish to have PC-BSD on the same computer, check the "Install the PC-BSD bootloader" option. The next time your computer boots up, a welcome screen will allow you to select which operating system you want to use. If you wish to use only PC-BSD on your computer or if you already have a Unix-based operating system installed with a bootloader such as Grub, GAG or Lilo, uncheck this option to keep your existing bootloader. When Windows is installed after PC-BSD, the FreeBSD bootloader will be overwritten and PC-BSD will be unbootable, which can be easily fixed. More information on the boot process, the FreeBSD bootloader and troubleshooting can be found here.

If you want to make a custom partition layout mark the corresponding checkbox (recommended for advanced users only).

Figure X-XX:

Figure X-XX:

If you marked the checkbox for a custom partition layout, you may now edit the partition layout to your needs.

On the partition editing screen the BSD disk partitions can be customised. PC-BSD (and FreeBSD) have two levels of partitioning:

Regular partitions, also known as "Slices" by FreeBSD (ie: C:, D:, etc...);

Sub-partitions invisibles by non-BSD systems, and known as "Partitions" by FreeBSD (ie: /boot, /var, /home, etc....)

You can keep all your mount points under "/", or you can spread them across several partitions or disks, or even across raid arrays for maximum performance. At the very least, you need a "/" partition with enough room for your files (4GB+) and a SWAP partition for virtual memory. Typically, SWAP space is advised to be set twice as big as your amount of RAM. This is not always necessary, for instance if you have 1GB of RAM, 1 GB of SWAP is probably sufficient for ordinary users. More information and examples check the "Allocating Disk Space" from the FreeBSD Handbook.

For more security, you can check the "Use Encrypted Swap Space" option, which will not leave any passwords or credit card numbers visible in your swap space. Swap Space Encryption can also at a later stage be turned of or off with the Services Manager.

Dual Booting

When setting up a dual boot or a multi boot system, it is best to first backup any important data, and to fully investigate what boot manager you will use.

Please note: none of these procedures are guaranteed to work. If performed incorrectly, you might render some of your systems unbootable or you might lose data. Always make a backup first!!!

FreeBSD Boot Manager

During the installation of PC-BSD, you will be given the option to install the FreeBSD boot manager. If you plan to use or install a Linux distro on the same computer you are installing PC-BSD, be sure to install the FreeBSD boot manager. Even if you don't plan on using this boot manager, this is a necessary step as it will install the boot blocks needed by other boot managers. This section demonstrates both the FreeBSD boot manager as well as other freely available alternatives.

Please note that recent versions of Windows have been found not to work with the FreeBSD boot manager as Windows requires the Windows Boot Manager to be installed in the MBR. If you wish to dual boot with Windows, For please refer to the EasyBCD section.

For information on understanding and using the FreeBSD boot manager, please refer to this section of the FreeBSD Handbook.

For more information regarding the FreeBSD boot process, refer to the following man pages:

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 workout what drive options to use when setting the root option in the examples below.

$ sudo grub
grub> ls
grub> quit

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

Adding PC-BSD to Grub Version 1

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 first partition on that disk, 2 for second partition, etc.)

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

3: In the second primary partition install PC-BSD. Don't check the boot loader option. This will prevent the install from interfering with the Windows boot loader.

4: When the install is finished, reboot into Windows.

5: In Windows, download the latest version of EasyBCD.

6: Run EasyBCD. Add an entry for your BSD partition. Go to the Linux/BSD Tab (older version might only read Linux for the tab) and from the dropdown menu options select FreeBSD and the relevant partition / drive.

Recovering Windows Boot loader after installing PC-BSD

Windows users often end up overwriting their Windows boot loader, thus losing access to Windows and only being able to boot into PC-BSD. This happens when the boot loader option is checked during the installation of PC-BSD. It is recommended that you first recover your Windows boot loader and then use the EasyBCD instructions above to setup a boot option for PCBSD.