Systemd 忽略 modules-load.d 中的内核模块

Systemd 忽略 modules-load.d 中的内核模块

无法使最新的 16.04 systemd 在启动时加载以下 3 个模块,手动加载有效,在 14.04 上没有问题:

root@toto:/etc/modprobe.d# cat /etc/modules-load.d/watchdog.conf 
# Hardware watchdog driver modules loading
i2c-i801
i2c-smbus
iTCO-wdt

我认为它可能来自黑名单所以我注释掉了以下几行:

root@toto:/etc/modprobe.d# grep -R i2c
blacklist.conf:# blacklist i2c_i801
root@toto:/etc/modprobe.d# grep -R iTCO
blacklist-watchdog.conf:# blacklist iTCO_wdt
watchdog.conf:options iTCO-wdt heartbeat=10 nowayout=0

但没有更多的运气,这让我发疯了!

root@toto:/etc/modprobe.d# systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: active (exited) since ven. 2017-02-24 14:41:20 CET; 9min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 265 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)
 Main PID: 265 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/systemd-modules-load.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

日志看起来很奇怪:

root@toto:/etc/modprobe.d# journalctl -b1 -o cat -u systemd-modules-load.service
Stopped Load Kernel Modules.

相关内容