Linux compiled kernel

Source: Internet
Author: User

Download the Linux kernel https://www.kernel.org/on this website

After the download is complete, copy to the/USR/SRC directory and unzip

// Download the directory under the $ sudo cp linux*z/usr/src////USR/SRC directory under $ sudo tar xvjf linux*.xz

Copy the configuration file starting with config from the/boot directory to the/usr/src/linux* directory and rename it to. config

// /usr/src/linux* directory $ sudo cp/boot/config*. config

Enter the make Menuconfig command to start configuring the Compile kernel option

$ make Menuconfig

Load just copied the. config file, and then save

Go to > Kernel hacking > Compile-time checks and Compiler Options directory, will Compile the Kernel with debug Info option uncheck Cancel (press N) to do You can significantly reduce the size of the initrd.img file that is packaged behind it (too large to boot partition at all, so it's best to take this step)

Run the following commands sequentially

// start compiling $ make bzimage-jn    // after adding-jn means that n processes compile at the same time, can also not write-jn, General n equals twice times the number of CPU cores //  Compile module $ make modules-JN// Install module $ make Modules_install-JN//  Install kernel $ make install

After the installation is complete, run the sudo update-grub command to update the startup item

linux-4.13.7 is my newly installed kernel, restart the default will start the latest kernel, you can use the uname-a command to view

If you want to replace the kernel, check the Ubuntu advanced options when rebooting

Linux compiled kernel

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.