RH133 Unit 11 Troubleshooting

Objectives
Upon completion of this unit, you should be able to:
1) Develop a strategy for troubleshooting
2) Fix problems in different areas of the Linux system
3) Boot the system into various runlevels
4) Use the Rescue environment
Method of Fault Analysis
1) Characterize the problem
2) Reproduce the problem
3) Find further information
4) Eliminate possible causes
5) Try the easy things first
6) Backup config files before changing
Fault Analysis: Gathering Data
1) Useful commands
- history
- grep
- diff
- find �Ccmin �C60
- strace command
- tail �Cf logfile
2) Generate additionaly information
- *.debug in syslog
- --debug option in application
Things to Check: X
1) Never debug X while in runlevel 5!
2) Try system-config-display first
3) X �Cprobeonly
4) ls /home or /tmp full, or has the user reached a hard quota?
5) ls xfs running?
Things to Check: Networking
1) Hostname resolution
- dig www.redhat.com
2) IP configuration
- ifconfig
3) Default gateway
- route �Cn
4) Module specification
5) Device activation
Order of the Boot Process
1) Bootloader configuration
2) Kernel
3) /sbin/init
- Starting init
4) /etc/rc.d/rc.sysinit
5) /etc/rc.d, /etc/rc.d/rc?.d/
- Entering runlevel X
6) /etc/rc.d/rc.local
7) X
Filesystem Corruption
1) Common after crash or improper shutdown
2) ext2 mounted for writing marked “dirty”
- If not mounted or mounted read-only, “clean”
- if not mounted and “dirty”, may be corrupted
- repair required exhaustive check
3) ext3 ususally marked “clean”
- journal indicates if recovery is needed
- only need to check files recorded in journal
Filesystem Recovery
1) If / has journal, kernel examines it at boot
2) /etc/rc.d/rc.sysinit run fsck on filesystems marked in /etc/fstab
3) fsck is a front end to other programs
4) A failed fsck must be run manually
Recovery Run-Levels
1) Pass run-level to init
- on boot from GRUB splash screen
- from shell prompt using: init or telinit
2) Runlevel 1
- Process rc.sysinit and rc1.d scripts
3) Runlevel s, S, or single
- Process only rc.sysinit
4) emergency
- Run sulogin only
Rescue Environment
1) Required when root filesystem is unavailable
2) Non-system specific
3) Boot from CDROM (boot.iso or CD #1)
4) Boot from diskboot.img on USB key
Rescue Environment Utilities
1) Disk Maintenance Utilities
2) Networking Utilities
3) Miscellaneous Utilities
4) Logging: /tmp/syslog or /tmp/anaconda.log
Rescue Environment Details
1) Filesystem reconstruction
- Anaconda will ask if filesystems should be mounted
- /mnt/sysimage/*
- /mnt/souce
- $PATH includes hard drive’s directories
2) Filesystem nodes
- System-specific device files provided
- mknod knows major/minor #’s
End of Unit 11
1) Questions and Answers
2) Summary
- What are some things to check for
- X problems?
- Services problems?
- Networking problems?
- Boot problems?
- How might your repair an ext2 filesystem?
- What are some alternate boot methods?

你可能感兴趣的:(职场,unit,休闲)