1. 程式人生 > 其它 >CentOS 8 Stream 報錯處理 Faild to start Load Kernel Modules. Failed to insert 'ipmi_si': No such device

CentOS 8 Stream 報錯處理 Faild to start Load Kernel Modules. Failed to insert 'ipmi_si': No such device

全新安裝的 CentOS 8 Stream (kernel 4.18.0-365.el8.x86_64) 開機啟動報錯:

[FAILED] Faild to start Load Kernel Modules.

See 'systemctl status systemd-modules-load.service' for details.

如圖:

按提示執行systemctl status systemd-modules-load.service,發現是ipmi_si裝置不存在導致。錯誤提示如下:

[ws@centos ~]$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2022-03-06 10:10:36 EST; 8min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 673 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 673 (code=exited, status=1/FAILURE)

Mar 06 10:10:36 centos systemd[1]: Starting Load Kernel Modules...
Mar 06 10:10:36 centos systemd-modules-load[673]: Module 'msr' is builtin
Mar 06 10:10:36 centos systemd-modules-load[673]: Failed to insert 'ipmi_si': No such device
Mar 06 10:10:36 centos systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Mar 06 10:10:36 centos systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Mar 06 10:10:36 centos systemd[1]: Failed to start Load Kernel Modules.

搜尋發現centos 論壇中存在討論帖(見文末),禁用ipmi_si kernel module可修復此問題。

故記錄解決方法在此,供大家參考:

#檢視啟動失敗服務
systemctl --failed 
systemctl status systemd-modules-load.service

#配置blacklist
sudo tee /etc/modprobe.d/blacklist.conf << EOF  
blacklist ipmi_si
install ipmi_si /bin/false
EOF

modprobe --showconfig | grep blacklist

#rebuild initial ramdisk image
sudo dracut -f

#set kernel command line parameters
sudo grub2-editenv - list | grep kernelopts
sudo grub2-editenv - set kernelopts="<output-last-step> ipmi_si.blacklist=1 rd.driver.blacklist=ipmi_si"

#例如
sudo grub2-editenv - set kernelopts="root=UUID=f3161552-2ff8-49b6-b5ec-6279aa515040 ro crashkernel=auto rhgb quiet ipmi_si.blacklist=1 rd.driver.blacklist=ipmi_si"

#Rebuild the kdump initial ramdisk image
sudo sed -i '/^KDUMP_COMMANDLINE_APPEND=/s/"$/ rd.driver.blacklist=ipmi_si"/' /etc/sysconfig/kdump
sudo kdumpctl restart
sudo mkdumprd -f /boot/initramfs-$(uname -r)kdump.img
sudo reboot

重啟後,此問題消失。

參考:
https://forums.centos.org/viewtopic.php?t=78617
https://access.redhat.com/solutions/41278