Table of Contents
This guide explains, in detail, all the steps that are required in order to build a complete SmallWall image from scratch. The primary intention is not that people will use the guide to actually build their own images from scratch, as that is rarely necessary, but to document and preserve all the details so that people who would like to make changes to an existing image can see how SmallWall and all of its parts are built.
This guide assumes that FreeBSD 8.4 i386 is used. It is preferred that a separate, dedicated (possibly virtual) machine is going to be used for this task, since a clean environment is best, and many steps need to be done as root. (among other things to get the file ownership and permissions right)
Note that this is not "SmallWall image building for dummies", and readers are expected to know what they're doing. Nor is it an introduction to FreeBSD and Unix like operating systems. As such, not all necessary commands and full file paths are listed (the obvious ones have been left out). It is expected that the user have some Unix like experience before using this guide.
Finally, many of these tasks are automated (especially the image building part). How this is done is left to the reader, and if the scripts do not run it is often a problem with the environment.
Install FreeBSD 8.4 i386 as usual, but use one file system only (i.e. don't create a separate partition for /usr)! See the note below for an explanation why this is necessary. Make sure that you choose the "Developer" distribution set. Installing the ports collection is not required if space is tight. The scripts will install the few ports needed.
FreeBSD has all the essential system binaries (mostly those in /bin and /sbin) linked statically so that the system can boot even if /usr (which holds important libraries like libc) is not available (which is often the case when it's on a separate file system). This takes up huge amounts of space though, so we obviously want all the binaries to be linked dynamically for our m0n0wall image.