Compile the Linux kernel 2.6.25.10 by yourself

Source: Internet
Author: User
Compile the Linux kernel 2.6.25.10-general Linux technology-Linux programming and kernel information by yourself. For more information, see the following. First introduce the environment: Fc7, the original kernel version 2.5.23

1.download the internal source code package linux-2.6.25.10.tar.bz2 at www.kernel.org.

2.copy the internal source code package linux-2.6.25.10.tar.bz2 to the/usr/src directory.

3. Open the terminal and enter the following commands in sequence:

Cd/usr/src // enter the/usr/src directory

4. tar? Jxvf linux-2.6.25.10.tar.bz2 // extract the kernel source code compressed package, unzip the file for the linux-2.6.25.10

5. ln? S linux-2.6.25.10 linux // map a linux Symbolic connection to a linux-2.6.25.10

6. cd linux // enter the linux directory

7. make xconfig // use the graphical interface to configure the kernel and remove unnecessary features, such as Bluetooth and other wireless modules. The dot in front of each option indicates that the item will be directly compiled into the kernel, and the dot in front indicates that the item will be compiled into a module. Blank indicates that this item is not compiled.

8. make bzImage // generate the gzip-compressed kernel. The generated file is located in the usr/src/linux/arch/i386/boot directory.

9. make modules modules_install // compile the module and install it in/lib/modules/2.6.25.10.

10. cp arch/i386/boot/bzImage/boot/vmLinux2.6.25.10 // copy the kernel file to the startup directory

11. cp System. map/boot/System. map-2.6.25.10 // copy the kernel symbol table to the startup directory.

12. cd/boot // enter the startup directory

13./sbin/mkinitrd initrd-2.6.25.10.img 2.6.25.10 // generate a memory disk for initrd-2.6.25.10.img initialization.

14. Modify GRUB:

Go to the/boot/grub/directory and open the grub. conf file under the directory.

Add the following content to the file:

Title myLinux2.6.25.10
Root (hd0, 4)
Kernel/vmlinux2.6.25.10 root = LABEL =/1
Initrd/initrd-2.6.25.10.img

Restart the computer and select myLinux2.6.25.10 from the GRUB list to enter the new kernel.

Note: run the uname-a command to query the kernel version number of the current system.

Today, I just learned that the new kernel version is 2.6.26. compile it later.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.