Compile Kernel on FreeBSD

Posted: July 20, 2010 in Freebsd

I have to blog this;

How To Compile kernel on FreeBSD i386

bsd# cd /usr/src/sys/i386/conf/

bsd# cp GENERIC MYBSD

bsd# pico MYBSD

add this for new kernel

# Squid Enhance
options UFS_ACL
options MAC
options AUDIT
options DEVICE_POLLING
options HZ=1000
options MAXDSIZ=”(1380*1024*1024)”
options DFLDSIZ=”(1380*1024*1024)”
options MAXSSIZ=”(1024*1024*1024)”
# Firewall using pf
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_PRIQ
options ALTQ_NOPCC
device pf
device pflog
device pfsync
# Firewall using ipf
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK

save MYBSD ctrl + o and ctrl + x

bsd# /usr/sbin/config MYBSD

bsd# cd ../../compile/MYBSD

bsd# make depend && make && make install

bsd# reboot

after reboot your new kernel will load

################################################################

If problem load new kernel and you want to load old kernel

just push the space bar when loading the time.

unload all

load /kernel.old or load /kernel.GENERIC/

boot

than it will boot on old kernel.

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