1.3. make world

Now that the latest FreeBSD patches have been installed, it's time to recompile the entire operating system. Note that this would be necessary even if there weren't any patches: by default, 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.

1.3.1. Editing /etc/make.conf

Create /etc/make.conf and put the following lines in it:


The last line ensures that IPFW2 is built (instead of the older IPFW1 version, which is the default) when we compile the kernel/modules/ipfw executable later.

1.3.2. making world

Execute the following commands to rebuild and install the entire operating system:

cd /usr/src
make -j4 buildworld


This will take a while.

shutdown now
cd /usr/src
make installworld
make buildkernel
make installkernel