System: How to compile a new kernel

(last edit: 2001-09-10) Make sure your logged on as root. Got to the '/usr/src/sys/i386/conf' directory. The file GENERIC and LINT live in this directory. Copy the GENERIC file to a new file with the name capitaliesed e.g. MYKERNEL. Now open the MYKERNEL file in a texteditor and change it to match your configuration. See the LINT file for explanations and/or the files '/usr/share/doc/handbook/kernel*' 1) When you're done edditing the MYKERNEL file, type the following: "/usr/sbin/config MYKERNEL" or if you have your paths configured just type "config MYKERNEL" 2) Go to the directory '/usr/src/sys/compile/MYKERNEL' and type 'make depend'. 3) When 'make depend' finishes type 'make' 4) when that one finished type 'make install'. 'Make install' will copy the '/kernel' file to '/kernel.old' and wil replace the '/kernel' file with the new kernel. Nowadays this is considered to be the "old" way. But it still works fine for me. Anyway, reboot and see if the new kernel works

Click here to go back to the index.