Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 2013 17:54:22 +0000
From:      "Teske, Devin" <Devin.Teske@fisglobal.com>
To:        Bernt Hansson <bah@bananmonarki.se>
Cc:        questions FreeBSD <FreeBSD-questions@freebsd.org>, "Teske, Devin" <Devin.Teske@fisglobal.com>
Subject:   RE: Jail question
Message-ID:  <13CA24D6AB415D428143D44749F57D7201EB027E@ltcfiswmsgmb21>
In-Reply-To: <5130DDD8.3080704@bananmonarki.se>
References:  <512CB738.50502@bananmonarki.se> <13CA24D6AB415D428143D44749F57D7201EAE456@ltcfiswmsgmb21> <512DDD9C.5070502@bananmonarki.se>,<5130DDD8.3080704@bananmonarki.se>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13CA24D6AB415D428143D44749F57D7201EB027E>