Method: 1. Add "add_drivers ="mpt3sas"" to the "/etc/dracut.conf" file and regenerate initramfs; 2. Use "dracut --force --add-drivers "Forcibly load the driver and then restart the system.
The operating environment of this article: centos 7 system, Dell G3 computer.
This problem exists after upgrading the kernel:
The system disk is on the onboard sata port The new kernel can be started normally and the panel hard disk can be recognized.
The system disk is inserted into the panel port. The new kernel cannot be started. The debugging found that the system disk cannot be found.
The system disk is plugged into the panel and the default 3.10 kernel can start normally.
The temporary solution is to plug the system into the onboard SATA port, because no specific solution was found at the time. After this problem lasted for a period of time, when I searched for information again recently, I located the problem in the driver within the initramfs and solved the problem
Solution process
Query the initramfs driver
[root@lab103 lab103]# lsinitrd -k 3.10.0-327.el7.x86_64|grep mpt[23]sas drwxr-xr-x 2 root root 0 Apr 17 12:05 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/scsi/mpt2sas -rw-r--r-- 1 root root 337793 Nov 20 2015 usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko
You can see that it is the mpt2sas driver in the 3.10 kernel
You can see the new version in the 4.x kernel
The kernel has upgraded mpt2sas to mpt3sas
/lib/modules/4.4.46/kernel/drivers/scsi/mpt3sas/mpt3sas.ko
Query the module in initramfs
lsinitrd -k 4.4.46|grep mpt[23]sas
You can see that there is no output, indicating that initramfs has not entered this driver
This place There are two ways to solve the problem
Method 1:
Modify the /etc/dracut.conf file and add fields
add_drivers+="mpt3sas"
Regenerate initramfs
dracut -f /boot/initramfs-4.4.46.img 4.4.46
Method 2:
Force loading of the driver
dracut --force --add-drivers mpt3sas --kver=4.4.46
Choose one of the above methods to integrate the driver, and then do the following checks
lsinitrd -k 4.4.46|grep mpt[23]sas
If there is output, it is normal
Then restart the operating system
Recommended tutorial: "centos tutorial"
The above is the detailed content of What should I do if centos cannot start after updating the kernel?. For more information, please follow other related articles on the PHP Chinese website!