How to modify the kernel in linux

WBOY
Release: 2022-02-25 15:56:18
Original
8634 people have browsed it

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
Copy after login

Two ways to upgrade the kernel

1.2 yum installation

1. Install the epel software package

yum install epel-release -y
Copy after login

2. Install the latest version of the kernel

yum install kernel
Copy after login

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
Copy after login

1.3.2 Download and decompress the kernel

inux kernel download

Decompression:

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

1.3 .3 Configure kernel compilation parameters

1. Execute the following command

cd /usr/src/kernels/linux-5.6.7/
Copy after login

make menuconfig
Copy after login

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

3. Solution:

yum install bison -y
yum install flex -y
Copy after login

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
Copy after login

7. Compile and install Kernel

Compile the kernel:make -j2 all

Install the kernel:

make modules_install(安装内核模块)make install
Copy after login


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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!