From owner-freebsd-isp@FreeBSD.ORG Tue Oct 27 16:53:26 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 1A94C106566C for ; Tue, 27 Oct 2009 16:53:26 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from ostracod.unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3925D8FC2B for ; Tue, 27 Oct 2009 16:53:24 +0000 (UTC) Received: from vhoffman.lon.namesco.net (75.69-246-213.ippool.namesco.net [213.246.69.75]) (authenticated bits=0) by ostracod.unsane.co.uk (8.14.3/8.14.3) with ESMTP id n9RGrSsD044466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Oct 2009 16:53:30 GMT (envelope-from vince@unsane.co.uk) Message-ID: <4AE72580.8030001@unsane.co.uk> Date: Tue, 27 Oct 2009 16:53:20 +0000 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "Tonix (Antonio Nati)" References: <4AE6C7BD.907@interazioni.it> <4AE6D302.9010100@unsane.co.uk> <4AE706A0.8050409@unsane.co.uk> <4AE708AF.4070705@interazioni.it> In-Reply-To: <4AE708AF.4070705@interazioni.it> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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 16:53:26 -0000 Tonix (Antonio Nati) wrote: > Hi Vincent, > > I'm trying as much as possible to not install sources. > I'm designing a general architecture with very small machines, > smallest as possible, as I'd love to avoid sources (both locals and > remote). > As i said, i'm not a regular user of jails so i may be missing something, but I rather thought that was my point. Using the ezjails framework, I didnt need the sources installed. ezjail is a shell script so it doesnt install anything else (no dependancies.) It installed the base jail using the binary install packages from a remote FTP server. It minimises your disk usage afterwards by using nullfs for the base system in each jail, and it lets you update the base jail using freebsd-update. I now have 2 jails (basic, just the freebsd base system) using a total of 140M, each additional jail will start off taking just 1.8M. Since on my host system my freebsd-update database alone is 665M I can see this system as a big win for diskspace not to mention the nice centralized update for all the jails. Back to your original question, you dont have to install a jail from source, I see no reason you couldnt just copy the base system into a directory and use it as a jail if you wanted. In fact a very quick test shows that taring up an existing system then untaring and editing rc.conf and fstab comes up as a working jail. (working as in network works and i can enter it by running jexec $jailid sh ) Vince > Thanks, > Tonino > > Vincent Hoffman ha scritto: >> Vincent Hoffman wrote: >> >>> Tonix (Antonio Nati) wrote: >>> >>>> Is there any architectural reason for which jails must be created only >>>> starting from sources? >>>> Would not it be simpler to create a jail cloning the host environment >>>> binaries (and then using the normal freebsd-update to keep it >>>> updated)? >>>> Would it be possible to suggest a funded project with this goal? >>>> >>>> >>> I dont tend to use jails but my understanding is that you can use the >>> standard install to create a jail (based on info from >>> http://pbraun.nethence.com/doc/sysutils_bsd/dragonfly-freebsd-jail.html) >>> >>> >>> mkdir -p /var/jails/base >>> sysinstall >>> then, >>> sysinstall > Custom > Options > Install Root > /var/jails/base >>> sysinstall > Custom > Distributions > Minimal >>> sysinstall > Custom > Media > File System > /cdrom (I just used ftp >>> myself, this meant i had to change the release from 7.2-RELEASE-p4 to >>> 7.2-RELEASE in options) >>> sysinstall > Custom > Commit >>> [Visit the general configuration menu ?] > No >>> Note. don't do the post-install, it would modify the host, not the >>> guest. >>> >>> A quick >>> jail /var/jails/base footest 10.0.0.2 /bin/sh >>> gives me a shell in the jail so it seems to have worked, Time to add >>> devfs etc i guess. >>> >>> >From here i'm going to have a look at sysutils/ezjail as that keeps >>> coming up as a good way of managing jails, but I seem to have an >>> working >>> base system in /var/jails/base without compiling anything. I might have >>> a play now and get updates etc working. >>> >> >> Ok now I have played with sysutils/ezjail, forget the first part ;) >> just "ezjail-admin install" will do a binary install for a base jail >> from an ftp server. >> you can use "ezjail-admin update -u" to update the base jail using >> freebsd-update for some reason this isnt in the manpage. >> Not exactly what you have asked for but close enough if you dont like >> installing from source. >> >> >> Vince >> >> >>> regards, >>> Vince >>> >>>> Regards, >>>> >>>> Tonino >>>> >>>> >>> _______________________________________________ >>> 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" >>> >> >> _______________________________________________ >> 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" >> >> > >