jail in file
Posted on .
# uname -a
# dd if=/dev/zero of=/storage/jails/192.168.1.100.img count=204800FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 16:18:26 UTC 2011 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
# chmod 0700 /storage/jails/192.168.1.100.img
# mdconfig -f /storage/jails/192.168.1.100.img
# bsdlabel -w md0 auto
# newfs /dev/md0a
# mkdir /storage/jails/192.168.1.100
# chmod 0700 /storage/jails/192.168.1.100
# mount /dev/md0a /storage/jails/192.168.1.100
# cd /usr/src
# make buildworld
# make installworld DESTDIR=/storage/jails/192.168.1.100
# make distribution DESTDIR=/storage/jails/192.168.1.100
# cd /storage/jails/192.168.1.100
# mount -t devfs devfs /storage/jails/192.168.1.100/dev
# ln -s dev/null kernel
# touch /storage/jails/192.168.1.100/etc/fstab
# cp /etc/resolv.conf /storage/jails/192.168.1.100/etc/resolv.conf
# vim /etc/rc.conf
# /etc/rc.d/jail start j100jail_enable="YES" jail_list="j100" jail_j100_rootdir="/storage/jails/192.168.1.100" jail_j100_ip="192.168.1.100" jail_j100_hostname="j100.chaosophia.net" jail_j100_devfs_enable="YES"