Table of Contents
This guide explains, in detail, all the steps that are required in order to build a complete m0n0wall 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 m0n0wall and all of its parts are built.
This guide assumes that FreeBSD 4.11-RELEASE is used. Note that there are other ways of doing this, like keeping a separate copy of the FreeBSD source tree and installing world into a subdirectory to leave the build system itself untouched. However, it is assumed that a separate, dedicated (possibly virtual) machine is going to be used for this task anyway, which is also recommended since many steps need to be done as root (among other things to get the file ownership and permissions right without too much effort).
Note that this is not "m0n0wall image building for dummies", and readers are expected to know what they're doing. As such, not all necessary commands and full file paths are listed (the obvious ones have been left out), so don't expect it to work if you just run all the commands listed in this guide.
Finally, many of these tasks can and should be automated (especially the image building part). How this is done is left to the reader - there are no official m0n0wall build scripts.
Install FreeBSD 4.11-RELEASE as usual, but use one file system only (i.e. don't create a separate partition for /usr)! See the section about make world for an explanation why this is necessary. Make sure that you choose the "Developer" distribution set. Installing the ports collection is also a good idea.