From owner-freebsd-questions@FreeBSD.ORG Tue Apr 1 22:50:48 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20C8B37B401 for ; Tue, 1 Apr 2003 22:50:48 -0800 (PST) Received: from sffwd0.suedfactoring.de (port-212-202-224-251.reverse.qsc.de [212.202.224.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8791D43FA3 for ; Tue, 1 Apr 2003 22:50:46 -0800 (PST) (envelope-from axel.gruner@suedfactoring.de) Received: from pcs28 (pcs28.SUEDFAC.COM [10.2.1.228]) SMTP id h326NLbt001800 for ; Wed, 2 Apr 2003 08:23:22 +0200 Date: Wed, 2 Apr 2003 07:45:27 +0200 From: Axel Gruner To: freebsd-questions@freebsd.org Message-Id: <20030402074527.30a449b1.axel.gruner@suedfactoring.de> In-Reply-To: <20030401143251.GA4560@poecilotheria.netmails.net> References: <20030401143251.GA4560@poecilotheria.netmails.net> Organization: suedfactoring GmbH X-Mailer: Sylpheed version 0.7.2claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Cloning a jail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: axel.gruner@suedfactoring.de List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 06:50:48 -0000 Hi. On Tue, 1 Apr 2003 08:32:51 -0600 Hari Bhaskaran wrote: > When I need to clone a jail, would a cp -Rp do? Yes and no. To do a exact copy of a jail, use the "cpdup" program (it is in the ports). > (and change rc.conf). Or do I have to go through > the jail(8) steps again? (make hierarchy, install etc). No. That would take to much time ;). Use "cpdup". Just change the IP and stuff in rc.conf. Also use a new startup script on the host system /usr/local/etc/rc.d/ Thats it. > By 'clone', I meant an identical jail session, > on top of which I will install other packages, > not necessarily same on both. see above. > Also can I hardlink a tree (outside) to inside > the jail? assuming I don't mind it being writeable. > Would it open a hole to the rest of the system? You can use "mount_nullfs" from the host system. Or NFS to on the hostsystem. With that you can do a NFS mount from /usr/ports of the hostsystem to /jail/usr/ports. I do that with my jails. Works great.