Ubuntu command to install the kernel source code and upgrade the kernel source code sudo apt-get install linux-source will automatically install the source code of the current version of the kernel to/usr/src to upgrade the kernel source code: 1.download the linuxsource code package (tar.bz2 package) decompress the package to/usr/src. If you do not know how to decompress the package, please google ~ After decompression, you can see a linux-2.6.31.6 folder under the/usr/src directory 2. transfer directory to linux-2.6.31.6 with the following command: cd/usr/src/linux-2.6.31.6 www.2cto.com 3. I don't know how to configure the Ubuntu kernel first: make menuconfig, but I don't need to configure it any more. Just select the last one, save, and exit. 4. next, compile the Ubuntu kernel: make is a long process. Please wait ~~ It took me nearly an hour and a half. add module: make modules_install 6. generate an executable Ubuntu kernel boot file: make bzImage (note that I should be capitalized) 7. copy bzImage to/boot: The bzImage directory of cp arch/i386/boot/bzImage/boot/vmlinuz-2.6.31.6 // 2.6.32Ubuntu kernel is arch/x86/boot/bzImage 8. clear unnecessary File Creation: make clean // it is best to leave this step to the end (now you can skip this step first). In this way, you can redo it back here even if your subsequent operations are incorrect, instead of re-compiling 9. set System. copy the map to/boot: cp System. map/boot/System. map-2.6.31.6 10. generate initrd. img is very important. I made a mistake and restarted it again. Command: cd/lib/modules/2.6.31.6 www.2cto.com sudo mkinitramfs-o/boot/initrd. img-2.6.31.6 // 2.6.32 can be sudo update-initramfs-c-k 2.6.32 11. automatically search for the new Ubuntu kernel and add it to the grub boot: sudo update-grub. You can also manually change the menu in the/boot/grub directory. lst file. This file boot system has a simple structure, that is, specifying a boot file. You can refer to the existing startup Item to modify it. In this file, add the following content: title Ubuntu 9.04, kernel 2.6.31 uuid kernel/boot/vmlinuz-2.6.31.6 root = UUID = 753efade-04e8-4e2c-8bbb-965e9792b2f5 ro quiet splash initrd/boot/initrd. the img-2.6.31.6 // 9.10 uses the Grub2 boot file with grub. cfg replaces the directory where the file is located as/boot/grub. if you manually add it as a reference: menuentry "Ubuntu, Linux 2.6.32" {recordfail = 1 www.2cto.com if [-n $ {have_gr Ubenv}]; then save_env recordfail; fi set quiet = 1 insmod ext2 set root = (hd0, 3) search -- no-floppy -- fs-uuid -- set 3c611c5f-f941-4970-956f-fe4c7bf75714 linux/boot/vmlinuz-2.6.32 root = UUID = ro quiet splash initrd/boot/initrd. img-2.6.32 12. restart the computer: reboot, you will find an option for Ubuntu 9.04, kernel 2.6.31 (Ubuntu, Linux 2.6.32) in the startup item, and select this option to enter the system. The above describes the Ubuntu kernel update. Author mutes