Red Hat Linux System Administrator Unit 11 - Troubleshooting

 學習目標


Fault Analysis: Gathering Date 收集資料
常用的除錯指令:history, grep, diff, find -cmin -60, strace command, tail -f logfile
*.debug 寫入 syslog
善用 --debug 的指令參數

Things to Check: X
若圖形介面的問題, 不要在 runlevel 5 中 debug
system-config-display 重設設定檔
# X -probeonly , 偵測硬體
是否 /home or /tmp 硬碟空間滿了?
xfs 有沒有跑起來? (字型伺服器)

Things to Check: Networking
檢查DNS有沒有工作?
# dig ptt.cc
檢查本機IP
# ifconfig
# ip addr
檢查gateway
# route -n
有沒有用對模組?
設備有沒有Activation?

Order of Booy Process
開機流程: BISO → Loader → Kernel → Init
1.Bootloader
2.Kernel
3./sbin/init
4./etc/rc.d/rc.sysinit
5./etc/rc.d/rc, /etc/rc.d/rc?.d/,? 是根據進入哪個 runlevel, ex./etc/rc.d/rc3.d/
6./etc/rc.d/rc.local
7.X

Filesystem Corruption
不正常關機後,一定要在 read-only 跟 umount的狀態下做 fsck, ext2 要很久,ext3 有寫journal 會比較快
若不正常關機,再開機後 /etc/rc.d/rc.sysinit 會根據/etc/fstab 最後一項option fsck_order 來決定要不要做fsck

Recovery Run-Levels
切換 runlevel, # init 5
Runlevel 1 會執行 rc.sysinit and rc1.d
Runlevel s,S,or single 只會執行 rc.sysinit
sulogin,完全不跑任何東西



Lab 11 重點

使用救援光碟重新安裝grub在MBR

檢查軟體有無被更動過,重新安裝RPM








By SmallKen