From owner-freebsd-questions@FreeBSD.ORG Fri Mar 1 17:54:35 2013 Return-Path: Delivered-To: FreeBSD-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4BA131CE for ; Fri, 1 Mar 2013 17:54:35 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id EA340D15 for ; Fri, 1 Mar 2013 17:54:34 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa06.fnfis.com (8.14.5/8.14.5) with ESMTP id r21HsNVw025430 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 1 Mar 2013 11:54:23 -0600 Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by LTCFISWMSGHT05.FNFIS.com ([10.132.206.16]) with mapi id 14.02.0309.002; Fri, 1 Mar 2013 11:54:23 -0600 From: "Teske, Devin" To: Bernt Hansson Subject: RE: Jail question Thread-Topic: Jail question Thread-Index: AQHOFCR6XJTq8ossF0OSsNIkS5Q8B5iML2mogAG0pACAA5PPAP//oj9k Date: Fri, 1 Mar 2013 17:54:22 +0000 Message-ID: <13CA24D6AB415D428143D44749F57D7201EB027E@ltcfiswmsgmb21> References: <512CB738.50502@bananmonarki.se> <13CA24D6AB415D428143D44749F57D7201EAE456@ltcfiswmsgmb21> <512DDD9C.5070502@bananmonarki.se>,<5130DDD8.3080704@bananmonarki.se> In-Reply-To: <5130DDD8.3080704@bananmonarki.se> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.120] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327, 1.0.431, 0.0.0000 definitions=2013-03-01_05:2013-03-01,2013-03-01,1970-01-01 signatures=0 Cc: questions FreeBSD , "Teske, Devin" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 17:54:35 -0000 On Fri, 01 Mar 2013, Bernt Hansson wrote: > On 2013-02-27 11:19, Bernt Hansson wrote: >=20 > > 2013-02-26 15:18, Teske, Devin skrev: > >=20 > > > Yes, this is possible. > > > > > > When I get into work, I'll share with you the recipe > >=20 > > Please do share with us. >=20 > Ok I rephrase my question. How do I install freebsd 4.9 in a jail on 8.3 > amd64. Step 1. Download the following files/directories... bin/ catpages/ cdrom.inf compat1x/ compat22/ compat3x/ compat4x/ crypto/ dict/ doc/ games/ info/ manpages/ proflibs/ from: ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/4.9-REL= EASE/ NOTE: For example, download those files/directories to /usr/repos/FreeBSD-4= .9/4.9-RELEASE Step 2. Download my "jail_build" script from: http://druidbsd.sourceforge.net/download.shtml#jail_build Step 3: Run jail_build NOTE: If you put your downloaded files in /usr/repos/FreeBSD-4.9/4.9-RELEAS= E then jail_build will automatically find them and present 4.9 as an option= . After selecting FreeBSD-4.9, it will then prompt you to enter the root di= rectory where to unpack the jail to. When jail_build completes, you'll have a freshly unpacked FreeBSD-4.9 in th= e desired root directory. Step 4: Grab and install my vimage package: http://druidbsd.sourceforge.net/download.shtml#vimage About: http://druidbsd.sourceforge.net/vimage.shtml Step 5: Configure your vimage in /etc/rc.conf (see /etc/rc.conf.d/vimage fo= r a sample). Example: vimage_enable=3D"YES" vimage_list=3D"fbsd4_9" vimage_fbsd4_9_rootdir=3D"/usr/jails/fbsd4_9" vimage_fbsd4_9_hostname=3D"fbsd4_9" vimage_fbsd4_9_bridges=3D"bge0" vimage_fbsd4_9_devfs_enable=3D"YES" vimage_fbsd4_9_procfs_enable=3D"YES" Step 6: [Pre-]configure the network interface for the visage Example: chroot /usr/jails/fbsd4_9 vi /etc/rc.conf NOTE: Since the vimage (aka vnet jail) isn't running yet, we use chroot ins= tead of jexec. (Also note that the chroot is only for pedantic safety ... i= t prevents things such as "what if /etc/rc.conf is a symlink to /etc/rc.con= f.other -- without the chroot you'd accidentally edit the host machines /et= c/rc.conf.other). Add the following: ifconfig_ng0_fbsd4_9=3D"inet 192.168.1.123 netmask 255.255.255.0" defaultrouter=3D"192.168.1.1" # or whatever fits your network # Don't forget /etc/resolv.conf # Don't forget to set sshd_enable=3D"YES" in rc.conf(5) if you want to be a= ble to ssh into the vimage Step 7: Fix some binaries in the 4.9 distribution to work under the 8.3 ker= nel... Download my "update411binaries.sh" script (should work fine for 4.9 jails t= oo) from... http://druidbsd.sf.net/download/update411binares.sh Step 8: Run update411binares.sh with a first argument of (for example) /usr= /jails/fbsd4_9 Step 9: Fire up the vimage service vimage start fbsd4_9 Step 10: Check things out... jls ssh 192.168.1.123 jexec fbsd4_9 csh etc. etc. --=20 HTH Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.