Sie sind auf Seite 1von 36

Welcome!

RH133
Red Hat Enterprise Linux
System Administration

Objectives

Day 11

Troubleshooting
Understanding Troubleshooting
Troubleshooting Procedures
Common Troubleshooting Problems and Solutions
X Windows Problems
Booting Problems
User Management Problems
Basic Network Related Problems
Using Rescue Environment From
CD-ROM
NFS, FTP, HTTP Servers
Using Run Level 1
Using Syslogs to Solve Problems
2

Understanding Troubleshooting

What is Troubleshooting?

Troubleshooting help you to diagnose and solve technical problems that are
occurring with your computer.

The process of Troubleshooting is both science and art.

The science comes from the concepts of hypothesis testing,


experimentation, comparison and reproducing results.

The science always to focus on likely causes

The art of troubleshooting comes from realization that operating

system, services and applications do not always work as we hope


or anticipate, or even as their creators hops or anticipate.

The art permits us consider the off-the wall and unlikely as


possibilities

Golden Rules

Two troubleshooting golden rules:

Prioritize problems according to severity

Spend reasonable amount of time on each problem given its

priority

Try to solve root of problem

Always start from very basic step first

Avoid missing underlying cause

Justify why a certain solution is successful

Troubleshooting Categories

Two categories of problems:

Hardware-related
Software-related

Troubleshooting Procedures

Common Troubleshooting
Problems and Solutions

X Windows Problems and Solutions

Problems

Unable to load Desktop


Monitor Resolution
Mouse Problem
Hangs While loading Desktop

Solutions

system-config-display
Is xfs is running
[ Try to start service permanently using chkconfig ]

Is gpm is running
[ Try to start service permanently using chkconfig ]

Is /home or /tmp is full


Is user reached a hard quota limit
Is hostname resolved properly

10

Booting Problems

Problems
1.

2.

3.
4.

5.

6.

Kernel does not load at all, or loads partially before a panic


occurs
Kernel loads completely, but panic or fails when it tries to
mount filesystem and run /sbin/init
No bootloader splash screen or prompt appears
Kernel loads completely, and /etc/rc.d/rc.sysinit is started and
interrupted
Run Level errors
System coming up in emergency mode, asking root
password for maintenance.

11

Booting Problems

Solutions
Problem 1

Problem 2

GRUB is misconfigured
Boot Sector is corrupt
Bad BIOS settings
Corrupt kernel
Incorrect Parameters passed to the kernel by the bootloader

Problem 3

Bootloader is misconfigured
/sbin/init is corrupted or /etc/inittab is misconfigured
Root filesystem is damaged and unmountable

12

Booting Problems

Solutions
Problem 4

/bin/bash is missing or corrupted


/etc/fstab may have an error
Error in RAID or QUOTA specifications

Problem 5
/etc/inittab is misconfigured
Service-specific error
Misconfigured X or related services in run level 5
Problem 6
Problem with /etc/fstab file check for labels, using e2label
command.
Remount the partitions using
mount o remount, defaults /dev/sda2 /
Press CTRL+D for saving.

13

User Management Problems

Problems

Unable to Login
Forgot password

Solutions

User is using nologin shell in /etc/passwd


User account is locked
User account is expired, issue chage E NEVER root
User is having no password, use passwd for new password
Change users password [ using runlevel 1 if roots password ]
Check for any /etc/nologin file / folder, if found, delete them.
Check for permissions on /tmp directory, it should be
rwxrwxrwt, if not, issue chmod 1777 /tmp
Check /etc/pam.d/login file for optional words.
Check /etc/securetty for permissions (600) and #

14

Basic Network Related Problems

Problems

Unable to ping to other network


Unable to resolve host name
Network Interface is not up
Unable to display IP-Address

Solutions

Use neat / neat-tui command


Enter valid entries for DNS server
Enter valid entries for DHCP server [ If required ]
Enter valid entries for Default Gateway
Try to UP Ethernet Interface using ifup command

15

Using Rescue Environment

16

Rescue Environment From

CD-ROM
NFS Server
FTP Server
HTTP Server

17

Steps

CD-ROM
Boot from first RHEL installation CD
Type linux rescue at boot prompt
NFS, FTP and HTTP Server
Boot from first RHEL installation CD
Type linux rescue askmethod at boot prompt
[ Note : - use only linux rescue with using BOOT.ISO disk ]

18

Additional Boot Options

19

Boot Time Command Arguments

askmethod
This command asks you to select the installation method you would like to
use when booting from the Red Hat Linux CD-ROM.

dd
This argument causes the installation program to prompt you to use a driver
diskette.

driverdisk
This command performs the same function as the dd command and also
prompts you to use a driver diskette during the installation of Red Hat Linux.

expert

This command turns on the following special features:

allows partitioning of removable media

prompts for driver diskette

20

lowres
This command forces the graphical (GUI) installation program to run at
a lower resolution (640x480).

resolution=
Tells the installation program which video mode to run. It accepts any
standard resolution, such as 640x480, 800x600, 1024x768, and so on.

text
This command disables the graphical installation program and forces
the installation program to run in text mode.

21

Using Syslogs to Solve Problems

22

Important Log Files

/var/log/dmesg
/var/log/messages
/var/log/secure

: Kernel log messages


: Standard system error messages
: Security, authentication, and xinetd messages

23

Disabling Command Line Access


1. Setting the disable_command_line gconf key
Set the /desktop/gnome/lockdown/disable_command_line key by using GConf editor
2. Disabling Console Switching
/etc/X11/xorg.conf.
Section "Serverflags"
Option "DontVTSwitch" "yes"
EndSection
3. Removing the Open Terminal menu item from the desktop background menu
gconf-editor -- unsetting the /apps/nautilus/preferences/show_desktop key.

24

NIC Bonding

The Linux bonding provides a method for aggregating multiple network


interfaces into a single logical bonded interface. The behavior of the
bonded interfaces depends upon the mode;

Hot standby
Load balancing services.

Additionally, link integrity monitoring may be performed.

25

Step-1: Create bond0 configuration file

vi /etc/sysconfig/network-scripts/ifcfg-bond0
Append following lines to it:
DEVICE=bond0
IPADDR=192.168.1.20
NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

26

Step-2: Modify ifcfg-eth0 file

vi /etc/sysconfig/network-scripts/ifcfg-eth0
Modify/append directive as follows:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

27

Step-3: Modify ifcfg-eth1 file

vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

28

Step-4: Load bond driver/module

vi /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100

29

Step-5: Test configuration

Load the bonding module


# modprobe bonding
Restart the service
service network restart
Verify
less /proc/net/bonding/bond0
ifconfig

30

Restricting users to their home

Use rbash i.e. restricted bash shell. A restricted shell is used to set up an
environment more controlled than the standard shell. It behaves identically to bash
with the exception that the following are disallowed or not performed:

Changing directories with cd

Setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV

Specifying command names containing /

Specifying a file name containing a / as an argument to the . builtin command

Specifying a filename containing a slash as an argument to the -p option to the hash


builtin command

Importing function definitions from the shell environment at startup

Parsing the value of SHELLOPTS from the shell environment at startup

Redirecting output using the >, >|, , >&, &>, and >> redirection operators

Using the exec builtin command to replace the shell with another command

Adding or deleting builtin commands with the -f and -d options to the enable builtin
command

Using the enable builtin command to enable disabled shell builtins

Specifying the -p option to the command builtin command

Turning off restricted mode with set +r or set +o restricted.

31

Restricting users to their home

Open /etc/passwd file and setup shell to /bin/rbash


vi /etc/passwd

For example here is a sample entry for user aryan:


aryan:x:500:501::/home/aryan:/bin/rbash

32

?
Questions

What have we learnt ?


Troubleshooting
Understanding Troubleshooting
Troubleshooting Procedures

Common Troubleshooting Problems and Solutions


X Windows Problems
Booting Problems
User Management Problems
Basic Network Related Problems
Using Rescue Environment From
CD-ROM
NFS, FTP, HTTP Servers
Using Run Level 1
Using Syslogs to Solve Problems

Day 11 Complete !!!

?
Questions

Thank You !!!

Das könnte Ihnen auch gefallen