An Absolute Beginners Guide to FreeBSD
This project was started on Feb 13, 1997. If you have anything to comment on, please email us at fbsd-book@vmunix.com
:This book is designed for the new user and new system administrator of FreeBSD. This was written to help those who have no real UNIX background easily get started using FreeBSD. No matter what application, whether as a desktop system, or installed as a Internet server, FreeBSD has the power and the flexibility required to meet even the most demanding situations. FreeBSD, however, requires more of an administrative approach than most over-the-counter operating systems. Yet, because of this approach, FreeBSD requires less administration per functionality than Windows 95 and certainly several other operating systems. Given the correct approach, managing a FreeBSD system is simple and can be quite fun.
Even if you are just using FreeBSD as a desktop machine, it has the full power of a server and you are the new system administrator. Its hard to imagine yourself as a ``system administrator'' on a single Win95 machine, but technically it is a system, and you do administrate it. The reason it seems odd to call yourself a system administrator is because only one person can use a Win95 computer at a time.
FreeBSD is a multi-user system: Several people can access the same computer at the same time. This includes more than the ``File Serving'' capabilities of WinNT and Novell Servers. The users connected to the FreeBSD machine have access all their normal functionality as though they were actually at the server console. Users can even interact if they choose. FreeBSD also gives you much more control over the system than DOS or Windows 95. You have the ability to modify system parameters ``live'', not just edit the configuration file and have the changes take affect after you have rebooted. For example, you can change the IP address of your machine and then test immediately to see if it is working. You don't have to wait 5 minutes for your computer to reboot to see if a change has worked.
More and more as the Internet becomes a part of our lives and shapes the way we do business, companies and individuals are looking for economical ways of enhancing their abilities. Companies, in particular, are now in the position of providing Internet and intranet services to attract customers and improve business processes. At the same time, although hardware costs are coming down, software and support costs are steadily increasing. For the individual, the Internet is an entrepreneur's paradise. However, as they start up, they have to find inexpensive ways to provide the same range of services as large businesses on a budget that barely permits purchasing the hardware.
In a sense, UNIX is the touchstone of the Internet. There is now a strong emphasis on the standard protocols of the Internet---TCP/IP, DNS, HTTP, FTP, SMTP, POP3, IMAP, and the rest of the alphabet soup--- and most of those standards were developed or refined on the UNIX operating system. FreeBSD addresses both issues: It's based on one of the standards of the UNIX world, BSD 4.4, optimized for common, inexpensive Intel-based hardware, and (as the name implies) it's free.
Internet protocols are some of the strongest and most reliable features of FreeBSD. FreeBSD has many powerful WWW, DNS, and E-mail servers available. It also has a wide variety of TCP/IP related software available.
FreeBSD has may practical applications:
Server Applications
Run a "turnkey" WWW server.
Handle Internet E-Mail(including Pop3 E-Mail and IMAP protocols).
Domain Name Service.
Allow dial-up access to the Internet through PPP.
Allow Windows 3.x and Win95 users to map network drives and share server resources.
Act as a network router.
Be an Internet firewall or gateway.
Network file sharing with a Novell server.
Translate network addresses, allowing you to conserve your registered IP addresses.
An affordable UNIX X Window Workstation.
Run a wide range of FreeBSD Desktop applications:
Word Processing
Spreadsheets
Database processing
Personal finance
Multi-media
Video conferencing
Run applications from other platforms:
Linux
BSDi
SCO
Windows 3.1/DOS
Windows 95/NT
Provide security control for a single user.
Plus, lots of other company specific applications.
Information about FreeBSD is available from several sources. Most of the documentation is on-line, in a wide variety of formats.
Internet Web Sites:
There are a lot of good web sites out there on FreeBSD. The simplest method to find information is to start with the Official FreeBSD web sites.
http://www.freebsd.org/ (Official Site)
http://www.freebsd.org/handbook.handbook.html (FreeBSD Handbook)
http://www.freebsd.org/FAQ/FAQ.html (FreeBSD FAQ)
http://www.de.freebsd.org/de/cgi/man.cgi/ (FreeBSD manual pages)
The above are part of the ongoing FreeBSD Documentation Project, which includes tutorials written by FreeBSD experts, and references to useful books.
There are also a lot of other web pages out there that have to do with FreeBSD and UNIX in General.
http://www.ugu.org(Unix Guru Universe)
The people at freebsd.org also provide a wide variety of mailing lists to talk about FreeBSD, report bugs, ask questions, keep you up to date on developments, and so on-- all the support you could want, and you don't have to pay anybody $195/hour. You can find out more about these at http://www.freebsd.org/support.html
CD-ROM:
Most of the Documentation is also available on the Installation CD-ROM, and can be accessed through DOS or Windows. It might be a good idea to look at the online documentation, and if you anticipate problems, print off the appropriate sections before trying to install FreeBSD.
Documentation, in limited forms, is available during installation.
Your system:
On your system you can find the most documentation. Including:
A full set of manual pages.
The FreeBSD Handbook and FAQ in HTML format. You will find these in /usr/share/doc. They can be viewed with Netscape or Lynx.
Examples included with the operating system.
Unix is case-sensitive.
FreeBSD treats uppercase and lowercase versions of a word as different words. Operating systems such as DOS and Windows 95 don't care if you use capital letters in filenames, or passwords. To those operating systems, FileName, filename and FiLeNAmE are all the same. In FreeBSD this is NOT true.
Keep the Caps Lock key off, almost everything is in lowercase.
E-mail me if you have any suggestions for this section. I am looking for things that you would have liked to have known about FreeBSD when you first started.
A mailing list is an easy way for a group of people to keep in contact about a specific topic. Once you have subscribed to a particular mailing list, you will receive a copy of all the e-mail sent to that list. You will see people's questions as well as the answers. FreeBSD has several mailing lists designed to help people with their questions, to report problems, and to announce new releases.
Sending a question to the appropriate mailing list is an easy way to get a fast, correct answer. Responses come back usually in a couple of hours, but may take just minutes if someone knows the answer and responds immediately. You will not only get answers---you'll get solutions to your problems, because the participants on the list have often had the same experience, and a few of them were probably involved in writing the software in question.
Before you post a question, however, you will want to search the mailing list archives and read the on-line documentation mentioned previously. If you can't find what you are looking for in the documentation, pick the right list, and send the e-mail.
There are several lists available to open subscription. You will probably want to subscribe only to the lists you are actually going to use, and then just send letters to the other lists as the need arises. Otherwise, your message traffic will be unbearable.
You should avoid ``cross-posting''; that is, posting the same question to more than one list. Many of the people who receive your e-mail are members of several lists, and if you cross-post, they'll see your message several times. Pick the list you think the message should go to, and if it's wrong, you will be told, and your message will probably get forwarded for you.
Most likely you will start out subscribing to the freebsd-questions List. All questions pertaining to how to use and run FreeBSD belong on this list.
When writing to the mailing list about a problem, try to include as much information as possible about the system you are using, such as:
The version of FreeBSD you are using.
Amount of RAM installed
Hard drive type and size.
Hardware make and model,
All other computer configuration stuff related to the problem.
Include all error messages exactly as they appear.
Note: Also mention that you have searched the online documentation, and specify which documentation, because they may be able to direct you to something that you haven't looked at yet. |
Here is a list of available FreeBSD mailing lists. This is only a partial list, intended to get you started. This list changes as new lists are created to keep track of the development of FreeBSD.
When subscribing to a mailing list, there are two addresses to be aware of. The subscription address and the distribution address. The subscription address is the address where you send an e-mail to become part of the list. The subscription address for all FreeBSD lists is the same: majordomo@freebsd.org. ``majordomo@freebsd.org'' is an automated mailing list manager. He only understands requests that are specially formatted, such as subscribe, unsubscribe, and help.
Each FreeBSD mailing list has it's own distribution address. This is the address that you send e-mail to if you want people to read it. Each member of the list receives a copy of the e-mail that you send to it's distribution address. Do not send subscribe, or unsubscribe commands to distribution addresses.
Plus several other mailing lists.
To subscribe to a mailing list, send an e-mail message to majordomo@freebsd.org
In the body of the message type:
subscribe freebsd-questions
subscribe freebsd-announce
END
The above example will add your name to the freebsd-questions and the freebsd-announce mailing lists. Majordomo will send you a confirmation notice that you have been added to the mailing list, and shortly thereafter you will begin receiving e-mail from the list.
The end command tells majordomo that you are done issuing requests. If you don't use end in your e-mail to majordomo, it will try to parse anything else in the document, such as your name and e-mail address, as a request for it to do something.
As soon as majordomo receives your request to join a mailing list, he will send you a confirmation e-mail. This e-mail will contain a special autorization code that you must re-send to majordomo. If you do not send this authorization code back, you will not be added to the mailing list.
This protects you from being subscribed to a FreeBSD mailing list with out you wanting to. It also prevents people with bogus accounts from subscribing.
:FreeBSD is a work in progress, continually developing and improving. A release is a stable snapshot of the development process. It is given a version number followed by -RELEASE. There are several releases to choose from, each providing unique opportunities for stability and innovation.
Currently there are three different lines of development.
2.1.X-STABLE
The development on this branch has all but stopped. Only security and bug fixes make it in to this branch. The last verstion of this branch was FreeBSD-2.1.7.1-RELEASE. There will be no more versions of this branch.
2.2.X-STABLE
This branch of development contains all of the stable, production ready applications and improvements. This is not the newest technology, however it is rock-solid. The last version of this branch was FreeBSD-2.2.6-RELEASE and it is available on CD-ROM. The next version will come from this branch.
3.0.X-CURRENT
This branch is where all the development takes place. As things are developed, tested and proven to be stable, they are added to 2.2.X-STABLE. There has not be a stable version of 3.0-CURRENT released yet, however daily snapshots are available from current.freebsd.org
The three branches can be found in either ``binary''(pre-compiled, ready to run) distributions, or as ``source'' distributions.
BINARY RELEASES:
-RELEASE
Considered the most stable. This is the Official Release. The 2.2.X-STABLE branch is compiled, given a -RELEASE number and shipped out on CDROM. However this may not be the most current, depending on the release date. Currently, the latest version is FreeBSD-2.2.6-RELEASE.
-SNAP
This is a binary release or "snapshot" of the -CURRENT or -STABLE version. It is not always stable. SNAPs are also available on CD-ROM, and are only for those who wish to easily track the state of FreeBSD's development, and are open to experimentation. -SNAP versions are available on a daily basis for all three branches of development.
SOURCE RELEASES:
-STABLE
This is the most current and stable release. It is the version that will become -RELEASE when it totally solidifies and has all the projected upgrades completed to it. It may however be incomplete in some areas depending on when you access it. -STABLE is also used to supply users who require absolute stability with minor bug fixes to a particular -RELEASE. For example, if you have installed FreeBSD 2.2.5-RELEASE, all of the bug fixes that have happened since the release date will be held in 2.2-STABLE (RELENG_2_2).
-CURRENT
This is the most up to date version out there. It may or may not be stable depending on which day you down load it. The parts of -CURRENT that are deemed stable get moved to -STABLE. This is where the bleeding edge developments takes place, and for that reason may not even be bootable depending on when you download it. Again, only recommended for people with an insatiable curiosity and FreeBSD developers. If you run -CURRENT you should be subcribed to the freebsd-current mailing list.
Note: Source Releases require that you already have FreeBSD installed and running. The Source Releases are provided for upgrade, testing, and experimentation purposes. If this is your first install, you will want to use the -RELEASE distribution. |
When a computer starts up it requires a certain amount of instructions to be able to start the operating system. This is called ``booting'' or ``boot-strapping'' a computer. The ``boot'' code must be stored on a device that the computer considers bootable. In other words, there are set boot devices that the computer checks for the code required to start the operating system.
The two main boot devices are the floppy drive and the hard disk. CD-ROM Drives and certain network cards can also be configured as boot devices on some systems. Once the boot code finishes initializing the computer, it loads the kernel. The kernel is the single most important part of FreeBSD. The kernel establishes the link between the hardware and the software, it contains all the device drivers, executes any programs, and controls all system resources.
FreeBSD has a floppy disk that contains this ``boot'' information, the kernel, and setup/install utility. This is often referred to as a ``boot floppy''. The boot floppy is stored as a disk image, a sector by sector copy of the contents of the floppy disk. The contents of each and every sector of the disk is copied into the contents of a 1.44 Meg file, thus preserving the native FreeBSD formatting and file structure. A conventional file by file copy of the disk would not preserve the FreeBSD file system across platforms. When this disk image is transfered to a floppy disk, using a low-level disk tool called rawrite.exe , or fdimage.exe, it transforms the floppy disk from a DOS-formatted disk, into a FreeBSD formatted, bootable installation floppy disk.
There are two ways to go about this, depending on which operating system you have most readily available. DOS or UNIX.
Obtaining the File:
The easiest method of obtaining the file requires a Web-Browser such as Netscape, or a FTP client such as NCFTP or WS-FTP and a formatted floppy disk. A 1.44M disk drive is required because the disk images are 1.44Meg in size. Start your web browser or FTP client and open to: ftp://ftp.freebsd.org/pub/FreeBSD/
Remember!: * (Case is important!) FreeBSD recognizes the difference between Uppercase letters and Lowercase letters and considers them as different from each other. Windows and DOS systems don't. |
Boot Floppies are -RELEASE specific. You need to know which version of FreeBSD you want to install and change to the matching directory. All of the versions available for download will be listed as a directory. If you have trouble selecting a -RELEASE, see the section on Selecting a -RELEASE to install. Once you have changed to appropriate -RELEASE directory, go to the floppies directory. Click on the boot.flp file and down load it to your computer.
Warning: If any text appears on your screen, then it is not being downloaded to the harddisk, but to your screen. You will need to right-click on boot.flp and select save link as in order to save it to your computer. This happens mostly on Netscape. |
Caution: Do NOT Save it to your Floppy Drive at this point! Save it to a temporary directory on your hard disk or filesystem. You will transfer it to the floppy later using a special utitlity. |
Caution: If you are using FTP to download the floppy disk image, be sure to use ``binary mode'' to do the transfer. If you select ``ASCII'' mode, the file will be too big to fit on the floppy, and it will be corrupted. |
The UNIX METHOD:
If you are creating the disk from a FreeBSD, or other UNIX workstation, you need access to the dd program and `` write permissions '' to the floppy disk.
Note: This may require SuperUser access. Insert floppy into the SERVER now. If you are using a telnet connection, Do not put the floppy into your local machine, it still belongs in the server. |
At the prompt, type:
dd if=boot.flp of=/dev/fd0
The floppy drive light should come on and after a few minutes you will get a message telling you how many bytes of information were transferred and how fast. If you have any trouble or questions about dd read the dd man page.
The DOS METHOD:
To use the DOS method, you have to download the program rawrite from the FreeBSD FTP site. You can use Netscape or any other ftp client.
Open to ftp://ftp.freebsd.org/pub/FreeBSD/tools/ Then download the
rawrite.exe
file. To use the program, from the DOS prompt, type rawrite When it prompts for the source file type: boot.flp and press ENTER. When it asks for the destination drive type a: and press ENTER.
Now it should go though a bunch of "Writing Sector XX" stuff and the floppy disk light should come on for a while.
Win95 Users: If you are using Win95, you should download and use fdimage.exe instead. It can be found in the same directory as rawrite.exe. However if you use rawrite under Win95, you must Maximize the DOS window by pressing P.S. Be sure Win95 doesn't rename it to something like rawrite(3).exe instead, when you make several attempts to download it. |
When the programs have finished writing to the floppy disk, you will have a FreeBSD Install/Boot floppy disk. Use it to install FreeBSD on all of your Machines.
This section explains how to prepare a custom media to install FreeBSD from. These medias include:
Floppy Disks
MSDOS partitions
NFS servers
Local FTP Sites
Existing FreeBSD Partitions
Note: If you are not using one of these medias, please SKIP this section. (These are not the easiest or the recommended methods of installation. But they work.) |
Each installation media looks for its files in a different directory. Inorder for the install program to find the installation files, you have to copy them into the correct directory.
For example, you want to install the Minimal Distribution Set from floppies. The Minimal Distribution Set requires the /bin distribution, ie. the /bin directory, be copied onto the floppies. The /bin directory can be found on the CD-ROM or from the FreeBSD FTP site, in the directory /pub/FreeBSD/2.2.6-RELEASE/. The bin directory and all its contents need to be copied onto MS-DOS formatted floppy disks. You will be able to fit about 6 files per disk. The files are named bin.aa, bin.ab, etc.
Important: You will need to copy the file bin.inf onto the first disk. |
When you get them on to the floppy disk you should be able to put it in a DOS machine and type dir

When all the files have been copied onto the floppy disks, you will have a set of FreeBSD installation floppy disks. Use them when prompted for during the installation.
To install from a DOS partition, you must first copy all of the required directories to C:\FreeBSD\.
To install from an Custom FTP site, copy all of the files into a publically accessable directory followed by FreeBSD/2.2.6-RELEASE/.
An NFS install utilizes a Network Shared Filesystem. This the method of filesystem shareing used by UNIX over a network. A directory will need to be exported on the distribution site. Copy all the required directories onto FreeBSD/2.2.6-RELEASE/ on that exported filesystem.
Listed below are the standard Distribution Sets that you can install and the directories that you will have to copy on to the media you are installing from.
/bin
/doc