Configure the FreeBSD jail
Once your FreeBSD jail is installed, you will need to configure a couple of things to make it usable.

I recommend creating a simple shell script that will put you in the jail environment and ensure that dev is mounted. Here is the shell script I created. I put it in the /root directory of my FreeBSD Host Machine. Download it by clicking here, or use fetch by typing the following:

cd /root

Save the script and make it executable by typing the following:

chmod 0700 /root/

(Note: You should always look over a script before you execute it and make sure you understand what it's doing.)

Using this script will ensure that dev is mounted within the FreeBSD jail before you chroot into it. But before you enter the FreeBSD jail, there are a couple of more thing you will want to do.

First, copy the /etc/resolv.conf and /etc/localtime file from the FreeBSD Host Machine to /usr/jail/etc by typing the following:

cp /etc/resolv.conf /usr/jail/etc
cp /etc/localtime /usr/jail/etc

If your computer stores its time in UTC, you can skip this part. (See the adjkerntz(8) man page for for information.) If your computer stores its time as local time, make sure to copy over /etc/wall_cmos_clock as well by typing the following:

cp /etc/wall_cmos_clock /usr/jail/etc

(Note: or just create an empty file by typing: touch /usr/jail/etc/wall_cmos_clock)

Next, edit the /usr/jail/root/.cshrc file and add the following line to the very bottom:

set prompt = "MiniBSD %~ %# "

That will set the prompt so that you won't confuse which shell you are logged in at. This is extremely helpful and I highly recommend that you do this step.

You are now ready to enter the FreeBSD jail. If using my script, type the following command:


If you're not using my script, type the following:

touch /root_check
mount -t devfs devfs /usr/jail/dev
chroot /usr/jail /bin/csh

That's it. Continue to the next section.

(Note: The FreeBSD jail can be configured where you could build your miniBSD image from the relative safety of an ordinary user account. I will address the steps necessary to accomplish that setup soon.)