FreeBSD  Release  11.0  Install  Guide



Managing your configuration changes

Experience has taught me that it's a very good procedure to make a copy of all the configuration files you change during the process of configuring your FBSD system. You can copy them to a USB thumb drive for safe keeping just in case you happen to lose your hard drive where you cannot even boot from it or to install the next Release version of FBSD and populate it with your saved configuration files. My USB thumb drive containing only the changed configuration files has saved my butt before, and I highly recommend you do the same. You will be surprised at how few of the FBSD config files you really change during the process of installing your operating system and that they are mostly in the /etc directory. When you install ports or packages they also have config files that you may have to configure. Those files should also be saved. Then there are the password files, the group file and the log files you may have created to support new applications. I call these the primary config files which make your installation unique from all the other systems.

I find that having a USB thumb drive that contains all the primary config files in a matching directory tree structure is very convenient when I install the next production X.X-RELEASE from scratch. All I have to do is copy the files from the USB thumb drive to their normal locations with one command and I have my basic system all configured.

Installer Note: The concept presented here is just a skeleton directory configuration to convey how to set it up and use it. There will be other directories which contain configuration files. Itís your responsibility to modify the /custom directory to contain these other directories and the backup and restore scripts so they work correctly with the additional directories you added.

I create a directory named custom off the / base directory. Then make the directory tree inside it for the directories that contain the config files I change.

Follow these commands

cd /             # point to the base of the FBSD directory tree
mkdir custom     # create directory named custom
cd /custom       # change into custom directory
mkdir root       # create sub-directory named root
mkdir etc        # create sub-directory named etc

Example: Following the instructions in the install guide you changed the /root/.cshrc file, so you would make your backup copy this way

cd /root       # Change into the directory where the file lives

cp .cshrc /custom/root/

Here is some information you need to know about the copy command.

The cp command has mandatory fields that must be there for the command to work. The 'from location' and the 'to location'. In the above example you changed into the location where the file to be copied lives, so there was no requirement to give the path as part of the from location. As in:

cp /root/.cshrc /custom/root/

If you happened to leave the last / off the 'to location'

cp .cshrc /custom/root

then the file would be copied to the /custom directory and renamed as root. This was not what you wanted to do. As you see, the syntax of the from and to location is very important. Every time you change a configuration file, you have to copy it to the correct location in the /custom tree directory.


Personal Scripts

FBSD is a command line driven operating system. It's very hard to remember where all the config files are and what they are called. You have to be constantly working on your FBSD systems on a daily basis to remember all the commands you use to do repetitive things. I found that if I build a simple shell script and place the command I use, or the sequence of commands I used to perform repetitive tasks, I can give the script a long name that self describes what it does. All users have a bin directory which they can save their canned scripts in. The users bin directory is not created as part of the FBSD install so you must make one for your user id, in this case root.

cd /root

mkdir bin

Now lets say for example I use IPFILTER for my firewall. I repeatedly edit the filter rules, load the rules, edit the NAT rules, and load the NAT rules. I simplify these admin functions by creating simple scripts with meaningful names.


Here is how to create simple script.

cd /root/bin

ee ipf.edit.rules

#! /bin/sh
ee /etc/ipf.rules

Close and save the file.

ls -l     # will show you that this file only has read and write permission. It needs execute permission to run.

chmod 700 ipf.edit.rules   # give it execute permission for root owner only

rehash    # let the shell know about it

Enter ipf.edit.rules on the command line, and you find yourself looking at the screen displaying your rules file open and ready to edit.

Every time you want to create another script, copy an existing one and it will already have the correct permissions to execute.


ISO FTP download script

#! /bin/sh
# There is not enough disk space on the FBSD slice to hold the
# iso-image of the new FBSD x.x-RELEASE-i386-disc1.ISO version file
# so putting it in /usr where most of the free space is allocated
# replace the x.x with the version number you want to download

cd /usr
fetch -avrAF$path/x.x/FreeBSD-x.x-RELEASE-i386-disc1.ISO
fetch -avrAF$path/x.x/CHECKSUM.MD5
echo ' '
echo ' '
echo 'Run these steps to verify download is good'
echo 'ls -l to verify file sizes'
echo 'md5 x.x-RELEASE-i386-miniinstall.iso >> CHECKSUM.MD5 to create value & append to end of file'
echo 'ee CHECKSUM.MD5'
echo 'second to last line = official hash value'
echo 'last line = downloaded file hash value'
echo 'if they do not match download again'
echo ' '


Technical Support

FBSD is an all volunteer supported operating system. There is not any phone number to call to get technical support. The only avenue is the official mailing lists and the lists archives. See the following link for a list of the different mailing lists and instructions on how to subscribe to the mailing list of your choice.

The mailing list you should subscribe to is the FreeBSD-Questions list. Not only is it the list to ask your questions on, but it is the list most experienced users routinely read. It has the largest number of subscribers and has a large amount of traffic (IE: 30 to 100 posts per day). The volume goes up as new development releases are prepared to deploy as stable releases. You can learn a lot from just reading the posts for help and their replies.

When you need help with something you should first review the appropriate man pages on your system or use the online FBSD command lookup function for manual documentation on the command.

Then search the different list archives at

These official FBSD archives are not user friendly and do not have search ability.

It uses the mailing.freebsd.question news group. Itís only 8 hours behind the real time activity on the FBSD questions list. It presents the answers to your search in thread format. Be sure to click on option to search within this newsgroup, or it will search all newsgroups which dilutes the results.

When searching the archives donít bother going back further than 24 months, generally information older than that is outdated as it does not reflect the current production X.X-RELEASE.

When it comes time to submit a request for help to the questions list, the email subject line is the most important field to fill in when asking a question. Many readers just blow right by any post that has blank subjects or subjects that have been covered in the list in the past few months. They know you have not done your homework. Always try to write the subject so itís easy for the reader to understand what your question is about.

The general rule is you can never post to much information about your problem in the body of your email. Always say what FBSD version you are running, the age of the PC, and what hardware it uses. Post the full content of any config files that may shed light on your problem, like /etc/rc.conf, /var/run/dmesg.boot, firewall rules file, whatever. The more info you post the better the answer you will receive. Specially if you are a newbie and donít know the technical words to use, the more you describe the environment in your own words, the easier it is for the reader to comprehend what you are trying to say.

Nothing ticks off a responder to your post more than to see another post later from you where itís obvious you did not try the responders solution. If you are not going to take the responders advance, you have no business posting to the questions list in the first place. You will be labeled as a troll and people will ignore your posts as background noise. You know the story about the sheepherder boy who called wolf.

When someone goes off list to work with you one on one, consider yourself privileged. When you have a solution that you have tested, itís a courtesy to post the solution to the list using the original subject line so the next person can find it in the archives.


Previous Page                                        Next Page         

This FreeBSD Install Guide is an public domain HOW-TO. This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.