


What should I do if the centos system cannot start after upgrading the kernel?
The solution process is as follows:
Query the 3.10.0 initramfs driver
[root@localhost ~]# lsinitrd -k 3.10.0-957.el7.x86_64 | grep mpt[23]sas drwxr-xr-x 2 root root 0 Nov 12 19:24 usr/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/scsi/mpt3sas -rw-r--r-- 1 root root 92972 Nov 9 2018 usr/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/scsi/mpt3sas/mpt2sas.ko.xz
You can see that it is the mpt2sas driver in the 3.10 kernel, but in In the 5.x kernel, I saw that the new version of the kernel has upgraded mpt2sas to mpt3sas
[root@localhost ~]# ls /usr/lib/modules/5.3.6-1.el7.elrepo.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko /usr/lib/modules/5.3.6-1.el7.elrepo.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko
(Recommended tutorial: centos usage tutorial)
Query the 5.3.6 initramfs driver , you can see that there is no output, indicating that initramfs has not entered this driver.
[root@localhost ~]# lsinitrd -k 5.3.6-1.el7.elrepo.x86_64 | grep mpt[23]sas
The solution is as follows:
Method 1:
1. Modify the /etc/dracut.conf file and add fields
sed -i '/#add_drivers+=""/aadd_drivers+="mpt3sas"' /etc/dracut.conf
2 , Regenerate initramfs
cd /boot/ mv initramfs-5.3.6-1.el7.elrepo.x86_64.img{,.bak} dracut -f /boot/initramfs-5.3.6-1.el7.elrepo.x86_64.img 5.3.6-1.el7.elrepo.x86_64
Method 2:
Force loading of the driver
dracut --force --add-drivers mpt3sas --kver=5.3.6
Choose one of the above methods to integrate the driver, and then do the following Check:
lsinitrd -k 5.3.6-1.el7.elrepo.x86_64 | grep mpt[23]sas
If there is output, it is normal, then restart the operating system.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What should I do if the centos system cannot start after upgrading the kernel?. For more information, please follow other related articles on the PHP Chinese website!

Alternatives to CentOS include AlmaLinux, RockyLinux, and OracleLinux. 1.AlmaLinux provides 10 years of support and is compatible with RHEL. 2. RockyLinux is initiated by the founder of CentOS to ensure transparent development. 3. OracleLinux provides stable performance and 10 years of support, the basic version is free.

CentOS was terminated because RedHat shifted its focus to CentOSStream, which was used to speed up the RHEL development cycle and drive users to move to RHEL. Alternatives include: 1.RockyLinux, 2.AlmaLinux, 3.OracleLinux. Compatibility, support, and long-term planning are considered when choosing an alternative.

The best way to migrate from CentOS is to choose RockyLinux, AlmaLinux, or UbuntuServer. 1) Back up data, 2) Evaluate existing systems, 3) Test migration, 4) Perform migration, 5) Verify and optimize to ensure the best system performance.

CentOS has stopped maintaining and has moved to CentOSStream and no longer provides a production-friendly version. Impacts include system migration and enterprise reevaluation of Linux policies. Alternatives are: 1. Migrate to RHEL, 2. Turn to Ubuntu or Debian, 3. Consider CentOSStream as a test platform, 4. Use AlmaLinux or RockyLinux. It is recommended to develop a migration plan as early as possible to evaluate existing system and team needs.

Use Ansible to implement automated management of CentOS. The specific steps include: 1) writing a playbook to define tasks, such as installing and configuring Apache; 2) executing the playbook through the SSH protocol to ensure consistency of system configuration; 3) using conditional judgment and loop functions to handle complex scenarios; 4) optimizing performance and following best practices, such as using asynchronous tasks and optimizing inventory files.

Frequently asked questions and answers to CentOS interview include: 1. Use the yum or dnf command to install software packages, such as sudoyumininstallnginx. 2. Manage users and groups through useradd and groupadd commands, such as sudouseradd-m-s/bin/bashnewuser. 3. Use firewalld to configure the firewall, such as sudofirewall-cmd--permanent-add-service=http. 4. Set automatic updates to use yum-cron, such as sudoyumininstallyum-cron and configure apply_updates=yes.

How to diagnose and solve common problems in CentOS system? First, check the startup log to solve the failure of system startup; second, check the network configuration file to solve the network problem; finally, use the Yum command to solve the package management problem. Through these steps, you can effectively diagnose and resolve common problems in CentOS systems.

CentOS server security reinforcement can be achieved through the following steps: 1. Keep the system software updated and use the "sudoyumupdate-y" command; 2. Disable unnecessary services, such as "sudosystemctldisablecups&&sudosystemctlstopcups"; 3. Configure SELinux as mandatory mode, use the "sudosetenforce1&&sudosed-i's/SELINUX=permissive/SELINUX=enforcing/g'/etc/selinux/config" command; 4. Regularly


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Notepad++7.3.1
Easy-to-use and free code editor