Edit your custom kernel under /usr/src/sys/i386/conf, then compile it:
# /usr/src/make buildkernel KERN=MYNAME
where MYNAME is the name of the custom kernel to compile. After compilation, you install the new kernel with the following:
# /usr/src/make installkernel KERN=MYNAME
If you want to also compile/install new version of the system, you can run the following:
# make buildworld # make buildkernel KERNCONF=MYNAME # make installkernel KERNCONF=MYNAME # mergemaster -p # make installworld # mergemaster <reboot>
If you are compiling remotely via telnet/ssh, you can start the
compile process, disconnect, and reconnect later to check the status
using SCREEN terminal window manager, from the ports misc/screen.
To start the process:
# cd /usr/src # screen make buildworld
Disconnect from the buildworld by entering <Ctrl+a><d>. To view the list of currently running screens: screen -list. To restore the session, screen -R
It is possible to build your kernel(s) on another, faster machine,
and just install them on the slower machine. To do this, you need to
be able to remotely mount usually through NFS the /usr/src and /usr/obj directories on the machine that is building the kernels.
See http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html for more information.
