1.4. Running the SmallWall build scripts

At this point you can run the doall.sh script which will complete each of the following steps as one. But the documentation will cover executing them individually to assist with troubleshooting and to give a better understanding of what is happening.

1.4.1. Running 1makebuildenv.sh

This script creates the directory structure at /usr/SmallWall for the build environment and completed images. It also sets up paths and other environment variables.

1.4.2. Running 2makebinaries.sh

This script creates all of the binaries for SmallWall. They come from packages, ports, and in some cases are compiled with SmallWall specific patches. This does mean a lot of downloading, and compiling, however.

1.4.3. Running 3patchtools.sh

This is a separate section for tools that require more complex patching and compiling. It is separated to make troubleshooting easier, as it has considerably less packages to compile.

1.4.4. Running 4buildkernel.sh

The default kernel is quite different from what is used in SmallWall. To begin with, everything not needed is removed. This saves both space, and makes for a more efficient system. And since network speeds have surpassed buss speeds, every little efficiency helps. But it is not just removal. Several default have been changed or increased to better handle network forwarding.

As this is a tiem consuming and critical step, it is also logically separated to make troubleshooting easier.

1.4.5. Running 5makeimage.sh

And finally! This is where the image is actually built. The mfsroot is the disk image that is loaded into memory on boot. By default, it has 4 meg free for logs and other modification. In some rare cases this can fill up, and this is where you can change it.

the "img" is what is written to disk. It contains the current config, and the mfsroot image. By default it has 2 meg free, and unless you plan on having a very large config file (Complex captive portal, or many users) you probably do not need to ever change this.

1.4.6. Other unsupported stuff in scripts

There are a few other interesting tools in the scripts directory that should be mentions.

  • README - A very basic walk through in image building.

  • TODO - Things to work on, but not a key priority.

  • experimental-syslinux.sh - An untested script to build a bootable USB FAT32 based image.