Home  >  Article  >  Operation and Maintenance  >  How to modify the kernel in linux

How to modify the kernel in linux

WBOY
WBOYOriginal
2022-02-25 15:56:188663browse

Linux kernel modification method: 1. Use the "yum install epel-release -y" command to install the epel software package; 2. Use the "yum install kernel" command to install the latest version of the kernel; 3. Use "sudo reboot" Just issue the command to restart the computer.

How to modify the kernel in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to modify the kernel in Linux

1.1 Upgrade the kernel version

Check the kernel version

uname -r

Two ways to upgrade the kernel

1.2 yum installation

1. Install the epel software package

yum install epel-release -y

2. Install the latest version of the kernel

yum install kernel

1.3 Source code compilation and installation of the kernel

1.3.1 Installation Required dependency packages

yum install gcc gcc-c++ make ncurses-devel openssl-devel elfutils-libelf-devel -y

1.3.2 Download and decompress the kernel

inux kernel download

Decompression:

tar xvf linux-5.6.7.tar.xz -C /usr/src/kernels/

1.3 .3 Configure kernel compilation parameters

1. Execute the following command

cd /usr/src/kernels/linux-5.6.7/

make menuconfig

2. An error occurs: linux-kernel import configurationlexer.lex .c

3. Solution:

yum install bison -y
yum install flex -y

1.3.4 Use the current system kernel configuration

1. Enter File Systems, Enable the kernel Supports the NTFS file system.
How to modify the kernel in linux

2. Enter the DOS/FAT/NT file system.

3. The kernel supports NTFS write operations.

4. Save by default, and then exit the operation all the way

5. Check the specific parameters of the kernel, there is an additional .config file.

6. Enter the /boot directory to view the currently used kernel, overwrite the config, and then rename it to .config

cd /bootcp config-3.10.0-1062.18.1.el7.x86_64 /usr/src/kernels/linux-5.6.7/.config

7. Compile and install Kernel

Compile the kernel:make -j2 all

Install the kernel:

make modules_install(安装内核模块)make install


8. Check the kernel version

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to modify the kernel in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is linux daemonNext article:what is linux daemon