From owner-freebsd-isp@FreeBSD.ORG Tue Oct 27 19:49:34 2009 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 781D11065694 for ; Tue, 27 Oct 2009 19:49:34 +0000 (UTC) (envelope-from blake@ekalb.net) Received: from rupert.ekalb.net (rupert.ekalb.net [65.49.170.80]) by mx1.freebsd.org (Postfix) with ESMTP id 3EFEB8FC2D for ; Tue, 27 Oct 2009 19:49:34 +0000 (UTC) Received: from [10.1.0.164] (ip-208-47-103-98.mwv.sta.beamspeed.net [208.47.103.98]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by rupert.ekalb.net (Postfix) with ESMTPSA id 242516932F; Tue, 27 Oct 2009 12:31:21 -0700 (MST) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Blake Covarrubias In-Reply-To: <4AE73ED9.5000505@quip.cz> Date: Tue, 27 Oct 2009 12:32:01 -0700 Content-Transfer-Encoding: 7bit Message-Id: <2E43F01D-92BD-425A-B0A9-F29178B60200@ekalb.net> References: <4AE6C7BD.907@interazioni.it> <4AE7232E.2070208@quip.cz> <4AE728F8.7020809@interazioni.it> <4AE73ED9.5000505@quip.cz> To: Miroslav Lachman <000.fbsd@quip.cz> X-Mailer: Apple Mail (2.1076) Cc: freebsd-isp@freebsd.org Subject: Re: Jails creation X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 19:49:34 -0000 Hi, This is how I perform binary updates and installation of jails. I used a file called install.cfg to hold my sysinstall variables. ### install.cfg ### installVarDefaults releaseName=7.2-RELEASE _ftpPath= ftp://ftp.freebsd.org/pub/FreeBSD/ mediaSetFTP dists=base man distSetCustom installRoot=/srv/jails/example.domain.tld/root installCommit ################ # Install mkdir -p /srv/jails/example.domain.tld/root sysinstall configFile=/root/install.cfg loadConfig freebsd-update works within the jail to update patches. For migrating point releases (7.1 to 7.2) after updating the host OS I use the commands below. env UNAME_r=7.1-RELEASE-p5 freebsd-update -b /srv/jails/ example.domain.tld/root -r 7.2-RELEASE upgrade freebsd-update -b /srv/jails/example.domain.tld/root install /etc/rc.d/jail restart freebsd-update -b /srv/jails/example.domain.tld/root install Works great in my environment. -- Blake Covarrubias On Oct 27, 2009, at 11:41 AM, Miroslav Lachman wrote: > Tonix (Antonio Nati) wrote: > >> Miroslav Lachman ha scritto: > [...] >>> You are not the first one with this idea. You can easily use >>> nullfs mount of directories from base system, but people mostly >>> prefer independent directory with jail install shared by many jails. >>> >>> And sometimes somebody needs jails with modified binaries, so it >>> is not possible to share theme with base system in all cases. >>> >>> There are many ways to get jails running without sources, it is up >>> to you to choose one. > > [...] > >> I have nothing against shared dirs, but my question is this: why >> the basic jail creation command requires compilation? Given the >> fact jail must have exactly the same version of base system, why >> the base create command dos not simply copy the existing binaries? >> It would avoid local source, remote packages, etc... > > It is not true. Jail command does not requires compilation, nor > exactly same version. I am running 6.x version jail on system with > 7.2 and you can run 32bit (i386) jail on 64bit (amd64) system. > The `jail` command is there just for starting the jail, not for > building it. The jail even does not need to be a full installed > system! > There are too many different scenarios with jails, that there can > not be "one command to satisfy them all". > It is up to administrator to prepare the best environment for his/ > her needs. > > If you need the full copy of the base system, you can do it really > easily (by tar as was suggested by Vincet Hoffman or dump & > restore), and if you do it for each jail, you loose the benefits of > shared read-only base directory (you will need more disk space and > more memory). > > If you do not want to spend some time by compilation, you can > install the jail from installation media you already have from > system install. > > cd /some/media/7.2-RELEASE/base > mkdir /path/to/myjail > setenv DESTDIR /path/to/myjail > sh install.sh > > That's all! It is too simple in contrast to source build or manually > copy something from base. > > If you are using ZFS, you can use snapshots and clones... > > And many more scenarios exist. > > I am CCing freebsd-jail@, it is more appropriate list to contionue. > > Miroslav Lachman > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"