1.2. Updating and installing needed packages

SmallWall will always lag behind FreeBSD -RELEASE versions. However, in order to get the latest security patches, the freebsd-update system is used. Additionally, some packages are needed and are installed by the pkg system, which will need initializing and updating.

1.2.1. Initializing the package system

Simply run pkg as root for the first time and follow the prompts to set it up.


In rare cases, this will generate an error saying the pkg system needs configuration. If so, simple copy the sample configuration file.

cp /usr/local/etc/pkg.conf.sample /usr/local/etc/pkg.conf

1.2.2. Updating the system with freebsd-update

Update the entire system with freebsd-update. This will take some time, and list all of the update files, which will take many pages. First the updates must be fetched, and then installed.

freebsd-update fetch
freebsd-update install

1.2.3. Installing Packages

The SmallWall build scripts require bash, which is not installed by default. I have also find nano to be a much more user friendly editor then vi or edit. So I install those tools. First, update the package list, and then install the packages. FreeBSD will install the latest packages, so there is no need to run freebsd-update again.

pkg update
pkg install bash nano

1.2.4. Enabling ssh for root

Almost everything you will need to do to build an image will require root. Also, any mounting of the file system by another OS will need to mount as root to even see many of the needed files. So for this reason, enabling ssh root logins can be handy. Of course, this is a huge security risk and should not be done on any system that is facing the Internet, or left on all the time, or that you even care about at all. (This is why we recommend this is done in a VM.) This is also optional, and totally at your own risk.

nano /etc/ssh/sshd_config

Use ctl-w to search for "root" and remove the has from PermitRootLogin and change no to yes. Then reboot the OS to restart sshd and reload all of your updated programs.