Mercurial > docs
view FreeBSD/jails.md @ 4:49956537f483
FreeBSD: typo in poudriere.md
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 28 Aug 2017 09:02:10 +0200 |
parents | 1fcfc84724ca |
children | c32b5c002aad |
line wrap: on
line source
FreeBSD jails howto =================== This guide will let you create your own jails for FreeBSD. In this guide, we will build jails from sources. What are jails? =============== Jails are confined environments that run on host kernels. They are similar to chroots but have much more features. Fetching source tree ==================== In this guide we will assume that we are running FreeBSD 11.1-RELEASE, to fetch the source tree, you need this following URL: svn://svn.FreeBSD.org/base/releng/<VERSION> In our case: svnlite co svn://svn.FreeBSD.org/base/releng/11.1 /usr/src Customizing the build ===================== The source tree can be built with and without a lot of options. This is tweaked in the `src.conf(5)` file. Removing options will let you build lighter jails, for example I use the following one: # /etc/src.conf WITHOUT_APM=yes WITHOUT_AMD=yes WITHOUT_AUTHPF=yes WITHOUT_BLUETOOTH=yes WITHOUT_CTM=yes WITHOUT_FLOPPY=yes WITHOUT_GAMES=yes WITHOUT_IPFILTER=yes WITHOUT_IPFW=yes WITHOUT_IPX=yes WITHOUT_NDIS=yes WITHOUT_OBJC=yes WITHOUT_PORTSNAP=yes WITHOUT_PPP=yes WITHOUT_PROFILE=yes WITHOUT_RESCUE=yes WITHOUT_WIRELESS=yes See the manual page to know what they control. Build the source ================ To build the source, use these commands: cd /usr/src make buildworld Note: this only builds the source tree and does not install anything. The jail template ================= To avoid doing the same step again and again each time we build a jail, we will create a template one that we will clone. We will create that jail in **/jails/template** dataset. zfs create zroot/jails zfs create zroot/jails/template And now install everything in that template directory. cd /usr/src make DESTDIR=/jails/template installworld make DESTDIR=/jails/template distribution