For the Kernel problem,
I invite you to read the handbook on
http://www.freebsd.org/handbook
search for kernel
read the doc about how to compile your kernel, i suggest you to start with the generic just to understand how it works after you could easily edit the generic and compile it. if something goes wrong you know it's because of your change.
to fix your corruption problem i suggest you to do :
cd /usr/src
make clean
cd /usr/src/i386/sys/conf/
edit your kernel
mkdir /root/kernel
mv yourkernel /root/kernel/
ln -s /root/kernel/yourkernel /usr/src/i386/sys/conf/
(this will create a link to your kernel file this way you just have to edit the file in your root directory to get it edit in the src directory. The compile system will follow the symlink and all will be fine) (tricks to make administration easier).
after taht just compile your kernel.
i think it could be a good idea too to do a make clean in your /usr/src/i386/sys/conf/ just to be sure the clean will not affect only the os source but the kernel source too.
The make clean just clean up the compile process (it doesn't touch the source file) it just delete the last compile binary or what we name build source. You will just start again from scratch as if you never did a make buildkernel before
One more thing : when you begin do not try to delete anything from generic kernel file, you don't know what is necessary, just add don't delete stuff. You will get your life better. Deleting stuff doesn't get you any better performance anyway (or not anything that you can see or not enought for all the problem you will get trying to delete stuff). The generic is kinda already a minimal kernel for normal operation.
ShadowLight
Unix Administrator Syrius-Network
shadowlight@syrs.com
www.linu-z.net