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