Certification Objective 16.02-Required RHCT Troubleshooting Skills


As described in the "Inside the Exam" section at the start of the chapter, the Red Hat Exam Prep guide lists six RHCT-level troubleshooting and system maintenance skills. If you're studying for the RHCE, you must complete all RHCT requirements within the first hour on this part of the exam. You've already read about techniques for booting systems into different runlevels. Now you'll learn about the other RHCT-level items as described in the Red Hat Exam Prep guide.

All the items described in this section have been covered in other chapters. This chapter summarizes important files and commands from those chapters to help focus your thoughts as you move your way through the RHCT-related Troubleshooting and System Maintenance issues.

There are several exercises in this section. Most require the assistance of a partner. Before you perform these exercises, you should have a backup, or a snapshot, of your system, such as that available on a VMware server.

Diagnosing and Correcting Network Problems

To diagnose misconfigured networking, you need to use the commands and analyze the files described in Chapter 7. To check your current network settings, you'll want to run commands such as:

  • ifconfig to find the settings of your network card(s)

  • ping to confirm connectivity to other systems

  • route to confirm the current routing table

You'll also want to check key files, such as:

  • /etc/sysconfig/network to confirm that NETWORKING=yes

  • /etc/sysconfig/network-scripts/ifcfg-eth0 to confirm defaults for your network card (assuming the default eth0 device for the network card)

  • /etc/resolv.conf to confirm connections to DNS servers (which is associated with PEERDNS=yes in the aforementioned ifcfg-eth0 configuration file)

Refer to Chapter 7 for more information on these commands and files. There are a lot of details; if you forget something, it may be easier to use a Red Hat utility such as the GUI-based Network Configuration tool. Remember, as long as you don't cheat, it doesn't matter how you solve a problem during the Red Hat exams.

Exercise 16-1: Diagnosing and Correcting Network Problems

image from book

For this exercise, you'll need a partner. Have that partner make changes to your system. Let that partner work privately on your system, until told that the computer is rebooting. Don't look at this lab, until you've solved the problem as created by your partner.

  1. Run the ifconfig command and review your current network settings.

  2. Back up the configuration file associated with the network card, usually ifcfg-eth0 in the /etc/sysconfig/network-scripts directory. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  3. Open up the ifcfg-eth0 file in a text editor.

  4. Set BOOTPROTO=none if it isn't already done.

  5. Set or add an IPADDR directive. Make it just a little different from the IP Address setting you saw in the output from ifconfig. Make sure the new address is on a different network; for example, if the original IP Address and network mask was 192.168.0.50 and 255.255.255.0, set IPADDR=192.168.1.50 and NETMASK=255.255.255.0.

  6. Reboot your system, and let your partner back at the computer. Tell him or her to try connecting to another system on your network.

  7. Tell your partner to back up any files that he or she might change to the home directory.

  8. If your partner gives up, restore the original ifcfg-eth0 configuration file to the /etc/sysconfig/network-scripts directory.

image from book

Diagnosing and Correcting Hostname Resolution Problems

Hostname resolution is based on the relationship between hostnames such as enterprise5a.example.org and IP addresses such as 192.168.44.66. First, the default hostname is defined in /etc/sysconfig/network, based on the HOSTNAME directive. Hostnames are associated with IP addresses in /etc/hosts. If you use a DNS service, you need to make sure that the DNS server's IP address is identified in /etc/resolv.conf. If you use DHCP to get your IP address, it overwrites the DNS server addresses /etc/ resolv.conf, unless PEERDNS=no before the BOOTPROTO=dhcp directive in /etc/ sysconfig/network-scripts/ifcfg-eth0. Then a command like dhclient eth0 will acquire the DNS server address(es) from the DHCP server and place them in /etc/resolv.conf.

When there's appropriate routing information, as shown by the route command, along with DNS information in /etc/resolv.conf, you can apply the ping command to confirm connectivity to the external host of your choice.

Exercise 16-2: Diagnosing and Correcting Hostname Resolution Problems

image from book

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the DNS server, /etc/resolv .conf. Back up the /etc/hosts configuration file. Back up the /etc/host.conf configuration file. Make sure to back up these files to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/host.conf configuration file in a text editor. If it isn't already as shown, change the directive in this file to:

     order hosts,bind 

  3. Open the /etc/hosts configuration file. Set the name of another computer on your network (which supports SSH access) to an incorrect IP address.

  4. Reboot your system, and let your partner back at the computer. Tell him or her to try connecting to another system on your network (the one you've set to the wrong IP address).

  5. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  6. If your partner gives up, restore the original /etc/hosts configuration file (and anything else your partner might have changed).

image from book

Configuring the X Window System

There are a number of issues associated with the smooth operation of the X Window System. If there are problems with the X configuration file, you may be able to fix it directly using a text editor, create a new file using the Red Hat Display tool (system-config-display), or use a command line tool such as Xorg -configure.

And as discussed in Chapter 14, the X Window may not work under certain conditions. Naturally, Linux doesn't boot into an X login window unless the default runlevel in /etc/inittab is set to 5. The X Window can't run without the X Font Server. And it can't start if the partitions associated with certain directories are full or have inappropriate permissions.

Exercise 16-3: Configuring the X Window System

image from book

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the X Window System, /etc/X11/xorg.conf. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/X11/xorg.conf configuration file in a text editor. Near the end of the file, you'll see the following directive:

     Section "Screen" 

  3. Change the directive to:

     Section "Scree" 

  4. Configure the system to start in runlevel 3, in /etc/inittab.

  5. Reboot the system, and let your partner back at the computer. Tell him or her to try starting the GUI.

  6. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  7. If your partner gives up, restore the original /etc/X11/xorg.conf configuration file.

image from book

Configuring a Desktop Environment

Configuring a desktop environment is a slightly different process than configuring the X Window. As discussed in Chapter 14, the default login manager is configured in /etc/X11/prefdm. The default desktop environment can be changed with the switchdesk command. Standard applications can be started with the desktop environment using settings in /etc/X11/xinit/xinitrc and files in the /etc/X11/xinit/xinitrc.d directory.

You can also customize a desktop environment based on hidden files in each user's home directory. These files are read first by the key scripts that start the X Window.

Exercise 16-4: Configuring a Desktop Environment

image from book

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the display manager, /etc/X11/prefdm. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/X11/prefdm configuration file in a text editor. Near the beginning of the file, you'll see the following directive:

     # Run preferred X display manager preferred= 

  3. Change the directive to:

     preferred=kdm 

  4. Make sure the default runlevel in /etc/inittab is set to 5.

  5. Reboot the system, and let your partner back at the computer. Tell him or her to configure the system to boot into the GNOME Display Manager.

  6. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  7. Whatever happens, restore the original /etc/X11/prefdm configuration file when your partner is finished with this exercise.

image from book

Adding New Partitions, Filesystems, and Swap

Reading the Red Hat Exam Prep guide carefully, this skill states that RHCTs should be able to add new partitions, filesystems, and swap to existing systems (I've added the boldface to provide emphasis on this particular Exam Prep requirement). This implies that space is available on the hard drive(s) that you are using during your exam.

You need to know how to add new partitions, which suggests that you need to know how to use the fdisk and parted utilities described in Chapter 4. When you create a new partition, make sure the partition type is associated with what you're creating; there are different partition types for standard Linux and swap partitions.

Exercise 16-5: Adding a New Partition

image from book

This is one exercise that does not require a partner. However, it assumes that you've installed RHEL with extra available space on any existing hard drives. If you don't have any additional space, you can substitute a spare USB key.

This exercise assumes you'll be creating a partition on a second SATA or SCSI hard drive. If you're using a different drive and partition, substitute device file names accordingly.

  1. If you've configured a VMware machine to practice for the Red Hat exam, take a snapshot of your current configuration (unless you're willing to keep the changes made during this exercise).

  2. Run the fdisk -l command to display configured partitions. The cylinders will tell you if space is available. For example, the following output suggests that 5000 cylinders are free:

     Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes    Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *           1        9205    73939131   83  Linux /dev/sdb2            9206       14457    42349190   83  Linux 

  3. Add a new partition of 500MB. It doesn't have to be exact. Make sure that the partition type is associated with Linux. I don't specify exact steps, as you can use either fdisk or parted to create the new partition.

  4. Write the changes to disk, and use the partprobe command or reboot the system.

  5. Format the new partition. For example, if the new partition device is /dev/sdb3, you can do so with the mkfs.ext3 /dev/sdb3 command.

  6. Assign the partition to user michael's home directory in /etc/fstab. (Create user michael if needed.) For example, if the partition device is /dev/sdb3, you can do so with the following directive in that file:

     /dev/sdb3    /home/michael     ext3     defaults     1 2 

  7. Mount /dev/sdb3 on the /home/michael directory. Reboot your system to make sure your system recognizes the changes and mounts the new partition.

  8. Run the fdisk -l, mount, and df commands to verify the new partition.

  9. If you took a VMware snapshot, press the Revert button in the VMware window to revert to the snapshot.

image from book

Important Command Line Tools

The Red Hat Exam Prep guide states that RHCTs should be able to use standard command-line tools to analyze problems and configure system. There are a number of standard command line tools that you can use to analyze problems and configure your system, as described throughout this book.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

Similar book on Amazon
Linux Quick Fix Notebook
Linux Quick Fix Notebook
Self-Service Linux: Mastering the Art of Problem Determination
Self-Service Linux: Mastering the Art of Problem Determination
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net