Tuesday, February 19, 2013

Compiling Kernel under CentOS 6

Step 1. Install Development Packege.

At least, you need to install gcc & ncurses-devel

yum install gcc ncurses-devel

For someone, they might need more development packages, you could just type below command to install all of the popular kits.

yum groupinstall "Development Tools"

Step 2. Download Kernel Source code

http://www.kernel.org/

Step 3. setup config

It's better to copy the configuration file from your system(if you don't have any idea to setup it)

cp /boot/config-`uname -r` ./config

If you don't have any additional settings, just exit and save the configuration 
make menuconfig


Step 4. Compiling

(Here is an example under 8 Cores CPU)
make -j8


Step 5. Installing Kernel

make modules_install install

You could check your kernel verion via "uname -r" after rebooting.

Monday, February 18, 2013

VirtualBox Guest Additions on CentOS 6

You'd need following package for compile VirtualBox guest additions yum install gcc kernel-headers make kernel-devel`uname -r`