From owner-freebsd-current@FreeBSD.ORG Tue Apr 11 14:04:09 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84E3416A437 for ; Tue, 11 Apr 2006 14:04:09 +0000 (UTC) (envelope-from b.candler@pobox.com) Received: from proof.pobox.com (proof.pobox.com [207.106.133.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0935B43DDC for ; Tue, 11 Apr 2006 12:38:30 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id 5025FE0C13; Tue, 11 Apr 2006 08:38:30 -0400 (EDT) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id 13CFC39629; Tue, 11 Apr 2006 08:38:29 -0400 (EDT) Received: from lists by mappit.local.linnet.org with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FTI8Z-000KE8-Qt; Tue, 11 Apr 2006 13:38:27 +0100 Date: Tue, 11 Apr 2006 13:38:27 +0100 From: Brian Candler To: "Ricardo A. Reis" Message-ID: <20060411123827.GB77666@uk.tiscali.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: current@freebsd.org Subject: Re: [RFC] Ideas for new distribuition: base-jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 14:04:09 -0000 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.