Introduction

This lab will guide you through the process of installing and configuring the open source FreeBSD operating system in a virtual environment. The installation will include creating partitions, apply/formatting file systems, a swap partition, create user accounts and modify groups. The lab will also cover how to properly reboot and shutdown the operating system, Determine disk usage and monitor running processes. You will also have the chance to review shell commands like mount, umount, du, ps and df, as well as learning some new commands like setenv, rehash, pkg_add and chsh.

Notes for this Lab:

See the FreeBSD Handbook Section on Installing and get very familiar with this Handbook, it will be the main reference throughout this course. Man (manual) pages are also an invaluable reference and there are excellent FreeBSD Hypertext "man pages" available as well. Please note, you will not be able to complete these labs without using the on-line documentation.
The installation will be from ISO images and the install will be in a virtual emvironment using VMWare. Sysinstall is the "arcane" but very flexible installer used by FreeBSD. Follow the instructions provided by your instructor during the demo installation to learn about the user interface. Sysinstall is also very useful for post installation system administrative tasks and we will use it to configure some of our services after the successful installation.

On the host machine:

Create BIOS Partitions (Called "Slices" in BSD):

sysinstall runs fdisk and prompts for you to create partitions (slices) of the disk /dev/ad0 for IDE (PATA/SATA) or /dev/da0 for SCSI/USB drives. There is a BIOS limition of 4 primary Partitions (Slices), and this is why FreeBSD subdivides the BIOS partitions, instead of having to create extended partitions like linux does.

Create BSD Partitions

The disk Label Editor further subdivides the slices into BSD partitions which are attached to specific locations (mount points) in the file system. The first slice of an IDE drive would be /dev/ad0s1 and once it is carved up into BSD partitions each partition will be identified by a letter. The root partition would look like this: /dev/ad0s1a and by default the file system will be ufs2. The letter b is reserved for SWAP partitions, and the letter c is reserved as a special character device for the raw data, the remainder of your partitions will be labeled alphabetically.

sysinstall - choose a packaged installation:

FreeBSD boots

Once all of the questions have been answered exit sysinstall and the installation is complete and the system will reboot. The boot process on unix is very verbose and may seem like unnecessary information but it can be extremely useful for troubleshooting when there are problems. Hardware related messages are written to /var/run/dmesg.boot and can be accessed with the dmesg command. Post Installation tasks.

using the root account, login or su?

Shutdown, reboot and single user mode:

There is a proper way to shutdown a unix OS and that is with the shutdown command. shutdown takes several arguments, indicating when to shutdown, what type of shutdown to perform, and what to do afterwards.

Returning/Continuing to Multi-User Mode

To continue booting when in single user, you can type exit, or press Ctrl-D. As well, if you made changes you may want to enter the reboot command to make sure they apply properly.

System Resources

Network services

Questions

      What types of files are stored in the /sbin directory?

  _________________________________________________________________________________________

  _________________________________________________________________________________________

      What types of files are stored in the /usr/local/bin directory?

  _________________________________________________________________________________________

  _________________________________________________________________________________________

      What is the difference between the types of files in /bin and /usr/bin ?

  _________________________________________________________________________________________

  _________________________________________________________________________________________

      Where are the configuration files for third party programs (ports/packages) stored?

  _________________________________________________________________________________________

      

Last updated: 2009-09-11
Updated by: Allan Jude

Written by: Cheri Weaver