Compile the kernel in centos of virtualbox and record the steps for setting up the linux kernel debugging environment www.2cto.com and OS. 1. The linux environment used for normal work: Ubuntu 12.04. Of course you can use windows. 2. the compiled kernel should not be installed on the working machine, so I installed centos 5.7 in virtualbox as a test site. Its kernel version is 2.6.18-274. el5 kernel compilation 3. download kernel source code 2.6.32.60 to centos and decompress it. 4. create a simple config: make localmodconfig for the local Machine (Press enter if prompted) (local config is supported in Versions later than 2.6.32) 5. in. add CONFIG_SYSFS_DEPRECATED_V2 = y to the config file. Otherwise, the/dev/root cannot be found during the startup of the new kernel. Then, make oldconfig (if prompted, press enter) 6. compile the kernel and the module make clean; make modules; On My centos, it takes about half an hour to combine these three steps. Www.2cto.com install the new kernel 7. Switch the user to root 8. install the module and kernel: make modules_install; make install 9. Restart centos and select the new kernel in the newly started grub.