Agus Priyadi and Mafia.Or.ID

blog all about (brains colocations)

Make FreeBSD Jail

Posted by mafiaid on 14 August 2007

FreeBSD 4.x Jail make-jail4.sh

#!/bin/sh
D=/usr/local/jail # is do use a special mounted partition
mkdir -p ${D}
cd /usr/src
make hierarchy DESTDIR=$D
make obj
make depend
make all
make install DESTDIR=$D
cd etc
make distribution DESTDIR=$D NO_MAKEDEV=yes
cd $D/dev
sh MAKEDEV jail
cd $D
ln -sf dev/null kernel

FreeBSD 6.x Jail make-jail6.sh

#!/bin/sh
D=/usr/local/jail # is do use a special mounted partition
mkdir -p ${D}
cd /usr/src
make hierarchy DESTDIR=$D
make obj
make depend
make all
make install DESTDIR=$D
cd etc
make distribution DESTDIR=$D NO_MAKEDEV=yes
mount_devfs devfs /usr/local/jail/dev
cd $D
ln -sf dev/null kernel

make-stand.sh

#!/bin/sh
mkdir -p /usr/local/jail/stand
cp /stand/sysinstall /usr/local/jail/stand

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: