search
HomeOperation and MaintenanceCentOSWhat should I do if the centos system cannot start after upgrading the kernel?

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!

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
CentOS Alternatives: What Linux Distributions Are Taking Over?CentOS Alternatives: What Linux Distributions Are Taking Over?Apr 14, 2025 am 12:11 AM

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's Legacy: Why It Was DiscontinuedCentOS's Legacy: Why It Was DiscontinuedApr 13, 2025 am 12:12 AM

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.

Migration from CentOS: The Best ApproachesMigration from CentOS: The Best ApproachesApr 12, 2025 am 12:13 AM

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.

The Discontinuation of CentOS: A DiscussionThe Discontinuation of CentOS: A DiscussionApr 11, 2025 am 12:09 AM

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.

CentOS Automation with Ansible: Infrastructure as CodeCentOS Automation with Ansible: Infrastructure as CodeApr 10, 2025 am 09:40 AM

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.

CentOS Interview Questions: Ace Your Linux System Administrator InterviewCentOS Interview Questions: Ace Your Linux System Administrator InterviewApr 09, 2025 am 12:17 AM

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.

CentOS Troubleshooting: Diagnosing and Resolving Common IssuesCentOS Troubleshooting: Diagnosing and Resolving Common IssuesApr 08, 2025 am 12:09 AM

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 Security Hardening: Protecting Your Server from IntrudersCentOS Security Hardening: Protecting Your Server from IntrudersApr 07, 2025 am 12:05 AM

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

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor