Debian系统中,dmesg
日志里常见的启动问题及对应排查方向如下:
-
硬件相关问题
- 设备未识别:如“USB device not responding”,可能是驱动未正确安装或硬件连接异常。
- 驱动加载失败:提示“module not found”或“failed to load”,需检查驱动是否兼容当前内核,或重新安装驱动。
- 硬件冲突:如“interrupt conflict”(中断冲突),需排查设备中断配置是否重复。
-
文件系统问题
- 文件系统损坏:出现“EXT4-fs error”或“filesystem has unsupported feature(s)”,需用
fsck
修复。
- 挂载失败:如“mount point does not exist”,检查
/etc/fstab
配置或设备路径是否正确。
-
内存问题
- 内存不足(OOM):日志中显示“Out of memory”或进程被终止,需增加物理内存或调整
vm.overcommit_memory
参数。
- 内存泄漏:通过
dmesg | grep -i memory
定位泄漏进程,优化程序或重启服务。
-
网络问题
- 网卡未激活:如“eth0: link down”,检查物理连接、网卡驱动或配置文件(如
/etc/network/interfaces
)。
- IP冲突:提示“IP address conflict”,排查网络中重复IP地址。
-
内核与系统问题
- 内核崩溃(Kernel panic):日志中包含“Kernel panic - not syncing”,需检查硬件兼容性或回滚内核版本。
- 服务启动失败:如“failed to start service”,查看对应服务的日志(如
journalctl -u service_name
)。
-
权限与配置问题
- 权限不足:普通用户运行
dmesg
报错“Operation not permitted”,需使用sudo
。
- 配置文件错误:如
/etc/modprobe.d/*.conf
中参数错误,导致模块加载异常。
可通过dmesg | grep -i error
快速定位关键错误,结合硬件状态、驱动版本及系统日志综合分析。