Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2006 13:38:27 +0100
From:      Brian Candler <B.Candler@pobox.com>
To:        "Ricardo A. Reis" <ricardo_bsd@yahoo.com.br>
Cc:        current@freebsd.org
Subject:   Re: [RFC] Ideas for new distribuition: base-jail
Message-ID:  <20060411123827.GB77666@uk.tiscali.com>
In-Reply-To: <op.s7s63sntp1tyz6@localhost>
References:  <op.s7s63sntp1tyz6@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 10, 2006 at 05:27:18PM -0300, Ricardo A. Reis wrote:
>    I think in one new distribution, this idea is for decrease create time  
> for start jails after release install, the base-jail is distribute in CD1.
>    After install RELEASE and update with freebsd-update a admin create a  
> jail
> with ( cd /usr/local/base-jail; make jail DESTDIR=/XXXX ) very fast

How about prototyping this? I offer as a starting point:

-- 8< --------------------------------------------------------------
DISTBASE?=/cdrom
DESTDIR?=.
jail:
	cd $(DISTBASE)/base && ./install.sh DESTDIR=$(DESTDIR)
-- 8< --------------------------------------------------------------

What else does it need to have? I guess you could automatically add jail_*
entries in /etc/rc.conf, but it would need to prompt for several pieces of
information in order to be able to set them all.

    jail_enable="YES"
    jail_list="foo"
    jail_foo_rootdir="/XXXX"
    jail_foo_hostname="foo.example.com"
    jail_foo_ip="192.168.1.1"
    jail_foo_exec_start="/bin/sh /etc/rc"
    jail_foo_exec_stop="/bin/sh /etc/rc.shutdown"
    jail_foo_devfs_enable="YES"
    jail_foo_devfs_ruleset="devfsrules_jail"

You might also want to prompt for, and set, the jail's root password.

You could copy some key files from the host environment assuming they will
be the same within the jail (e.g. /etc/resolv.conf, /etc/hosts,
/etc/localtime)

You might also want a template directory for other files to be installed
into the jail (e.g. /etc/rc.conf might have sshd_enable="YES" as its
default), but the contents of these files are likely to be very specific to
your particular needs. The same goes for installing additional distribution
sets or packages. Perhaps the jail builder could invoke sysinstall somehow,
such that it can be driven from an install.cfg script.

Regards,

Brian.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060411123827.GB77666>