本文将针对Archlinux下的系统运维进行介绍。
内核相关
查看当前内核版本
1 2 3
| uname -r ------------------------------------------------------------------------ 4.19.67-1-lts
|
内核版本更换
最新的内核版本滚动过于频繁,新增的许多特性也不稳定,因此将archlinux运行在稳定版本的内核上,即lts kernel
直接用pacman进行安装即可
旧内核删除
1 2 3
| sudo rm -f /boot/vmlinuz-kernel_3.xxx sudo rm -f /boot/initrd.img-kernel_3.xxx sudo rm -rf /lib/modules/kernel_3.xxx
|
systemctl命令
检查运行失败的service
- 找到运行失败的service
1 2 3
| systemctl --failed ------------------------------------------------------------------------ systemd-modules-load.service loaded failed failed Load Kernel Modules
|
- 查看运行失败的原因
1 2 3 4 5 6 7 8 9
| 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: dis> Active: failed (Result: exit-code) since Fri 2019-08-23 12:16:54 CST; 6min ago Docs: man:systemd-mod 大专栏 Archlinux系统运维ules-load.service(8) man:modules-load.d(5) Process: 190 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE) Main PID: 190 (code=exited, status=1/FAILURE)
|
- 根据Main PID查看对应的问题
1 2 3 4 5 6 7 8 9 10 11 12 13
| journalctl _PID=190 ----------------------------------------------------------------------- -- Logs begin at Thu 2019-04-25 23:48:52 CST, end at Fri 2019-08-23 12:24:50 CST. -- 8月 23 12:16:54 husky systemd-modules-load[190]: Failed to find module 'vfs_monitor' 8月 23 12:16:54 husky systemd-modules-load[190]: Failed to find module 'vboxdrv' 8月 23 12:16:54 husky systemd-modules-load[190]: Failed to find module 'vboxpci' 8月 23 12:16:54 husky systemd-modules-load[190]: libkmod: kmod_config_parse: /etc/modprobe.d/iwlwif> 8月 23 12:16:54 husky systemd-modules-load[190]: libkmod: kmod_config_parse: /etc/modprobe.d/iwlwif> 8月 23 12:16:54 husky systemd-modules-load[190]: libkmod: kmod_config_parse: /etc/modprobe.d/iwlwif> 8月 23 12:16:54 husky systemd-modules-load[190]: libkmod: kmod_config_parse: /etc/modprobe.d/iwlwif> 8月 23 12:16:54 husky systemd-modules-load[190]: libkmod: kmod_config_parse: /etc/modprobe.d/iwlwif> 8月 23 12:16:54 husky systemd-modules-load[190]: Failed to find module 'vboxnetadp' 8月 23 12:16:54 husky systemd-modules-load[190]: Failed to find module 'vboxnetflt'
|
- 我们有一些module系统没有找到,因此在
/etc/modules-load.d/
下查看对应设置
1 2 3
| ls -Al /etc/modules-load.d ----------------------------------------------------------------------- 总用量 0
|
结果发现什么都没有,通过modinfo
命令检查对应模块,发现找不到对应的模块
1 2 3
| modinfo vfs_monitor ----------------------------------------------------------------------- modinfo: ERROR: Module vfs_monitor not found.
|