FreeBSD is an advanced operating system for modern server.

This post describes one way of customizing and updating FreeBSD.

Updating the src and ports trees

# vi /etc/csupfile
------------------------------ cut here ------------------------------
*default host=cvsup3.FreeBSD.org
*default release=cvs tag=RELENG_9_0
*default delete use-rel-suffix
*default base=/usr
*default prefix=/usr
src-all
*default tag=.
ports-all
------------------------------ cut here ------------------------------

# /usr/bin/csup -g -L 2 /etc/csupfile

Customizing the system

# mkdir /root/kernels
# cp /usr/src/sys/amd64/conf/GENERIC /root/kernels/CUSTOM
# ln -s /root/kernels/CUSTOM /usr/src/sys/amd64/conf/CUSTOM

# cd /usr/ports/ports-mgmt/portmaster
# make clean all install
# make clean
# rehash

# portmaster -d misc/rpl
# rehash

# rpl GENERIC CUSTOM /root/kernels/CUSTOM

# vi /etc/make.conf
------------------------------ cut here ------------------------------
KERNCONF=CUSTOM
WITHOUT_X11=yes
WITHOUT_ATM=yes
WITHOUT_IPX=yes
WITHOUT_NIS=yes
------------------------------ cut here ------------------------------

# vi /etc/src.conf
------------------------------ cut here ------------------------------
WITHOUT_ATM=yes
WITHOUT_I4B=yes
WITHOUT_IPX=yes
WITHOUT_NIS=yes
------------------------------ cut here ------------------------------

# vi /root/kernels/CUSTOM
------------------------------ cut here ------------------------------
options         IPDIVERT
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=100
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPFIREWALL_FORWARD

device          disc
device          pf
device          pflog
------------------------------ cut here ------------------------------

Updating the system

# cd /usr/src
# make clean
# make cleandir
# make cleanworld
# make -j4 buildworld
# make buildkernel KERNCONF=CUSTOM
# make installkernel KERNCONF=CUSTOM

## reboot in single user mode
# boot -s
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# adjkerntz -i
# /etc/rc.d/hostid start
# mergemaster -p
# cd /usr/src
# make install
# make installworld
# mergemaster -i
# reboot

Updating the ports

# portmaster -a -d -n
# portmaster -a -d

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required