Create a Debian Squeeze Jail (GNU/kFreeBSD)ΒΆ

This section shows the process to set up a Debian (GNU/kFreeBSD) jail. GNrUkFreeBSD is a Debian userland tailored for the FreeBSD kernel.

The examples in this section use a jail with the custom name debjail. Remember to replace debjail with your jail’s UUID or NAME!

Warning

This is not recommended for production use. The intention is to show iocage can do almost anything with jails.

Create an empty jail with Linux specifics:

# iocage create -e -n debjail exec_start="/etc/init.d/rc 3" exec_stop="/etc/init.d/rc 0"

Install debootstrap on the host:

# pkg install debootstrap

Grab the mountpoint for the empty jail, append /root/ to it, and run debootstrap:

# iocage get mountpoint debjail

# debootstrap squeeze /iocage/jails/debjail/root/

Replace squeeze with wheezy, if needed.

Add lines to the jail fstab file:

Use iocage fstab -e [UUID | NAME] to edit the fstab file of debjail directly. Add these lines to the file:

linsys   /iocage/jails/debjail/root/sys         linsysfs  rw          0 0
linproc  /iocage/jails/debjail/root/proc        linprocfs rw          0 0
tmpfs    /iocage/jails/debjail/root/lib/init/rw tmpfs     rw,mode=777 0 0

Start the jail and attach to it:

# iocage start debjail

# iocage console debjail

The result is a 64bit Debian Linux userland.

To install a Linux only Debian jail, follow this tutorial: debian-linux-freebsd-jail-zfs