Linux vs FreeBSD kernel rebuild
By Rayed
For the past couple of week, I am trying to refresh my Linux skills, I abandoned Linux as the server platform of choice in favor of FreeBSD, but recently unfortunately FreeBSD isn’t supported as Linux, and sometimes Linux have this weired feature that isn’t available in FreeBSD, e.g. DRDB.
I am big FreeBSD fan, and I loved it even more when I worked with Linux, Ubuntu, the Linux distribution I use, is really impressive as a desktop OS, but if you want to hack the system, and play with its internal it doesn’t give much room, and this the exact reason I switched from Windows to Linux 10 years ago.
What triggered me to write this post is my attempt to rebuild new Linux kernel on Ubuntu, I downloaded the kernel from kernel.org and searched for documentation on how to rebuild 2.6 kernel, and to my surprise there isn’t any official documentation on that subject and old Kernel-HOWTOs now refer to Kernel Rebuild Guide.
I followed every step and waited to reboot my new kernel, some of the command didn’t work or have different syntax, and rebooted to get this message “Fatal error couldn’t load modules.dep”, did some Internet search and no one really knows what is the problem. Tried different things, the problem fixed, but I have another problem now, and still didn’t boot to my new kernel (I still can access my system using the Ubuntu default kernel) ….
For the past 6 years working with FreeBSD I never had any problems with rebuilding the kernel, all I need to do is this:
# cd /usr/src/sys/i386/conf # cp GENERIC MYKERNEL # vi MYKERNEL # cd /usr/src # make buildkernel KERNCONF=MYKERNEL # make installkernel KERNCONF=MYKERNEL
and it is all documented in the official FreeBSD Handbook, and it takes half the time Linux kernel needed to recompile the kernel.
Viva FreeBSD!!