Lab Questions


Lab 1

1. 

For this lab, you'll need a partner. The first steps will set up the lab for that person. To prepare this lab, take the following steps:

  1. Log in as the root user.

  2. Open /etc/inittab in a text editor.

  3. Change the default runlevel to 0.

  4. Save your changes.

  5. Power down the computer. Pass the system to your partner. Tell your partner that the problem should appear when the computer boots into Linux.

    *************************************************

  6. Now that your partner has set up this system for you, power on the computer and boot into Linux. What happens? What do you see? What can you do?

image from book

Answers

1. 

To solve this problem, you need to observe what happens when you boot this system. While not required, the first step you should take is to use the GRUB boot menu to boot into a specific runlevel. If you have any experience with Linux, you should know that an immediate shutdown after Linux goes through the boot process is associated with runlevel 0.

Lab 2

2. 

For this lab, let your partner set up your computer for you.

********************************************

Now you'll set up this system for your partner using the following steps.

  1. If you've configured your RHEL system on VMware, make sure you have a current snapshot. It's invaluable if your partner is unable to solve this problem.

  2. Boot into your partner's system normally.

  3. Open the /etc/fstab configuration file. There should be a line associated with the /boot directory, similar to:

     LABEL=/boot   /boot    ext3       defaults     1 2 

  4. Change the line, introducing a typo, as shown:

     LABEL=boot   /boot    ext3       defaults    1 2 

  5. Power down the system, and tell your partner to boot the system.

    *************************************************

  6. Now that your partner has set up this system for you, power on the computer and boot into Linux. What happens? What do you see? What can you do?

image from book

Answers

2. 

In this lab, you should know almost immediately that there's a problem with the LABEL associated with the /boot directory, with an error message similar to:

 fsck.ext3: Unable to resolve 'LABEL=boot' 

During your exam, this may be a bit tricky. If you're very familiar with the contents of /etc/fstab, you may be able to recognize this problem right away.

Otherwise, you can verify the LABEL associated with each partition on your hard drive with the e2label command. For example, if you're checking the /dev/hda1 partition, the command would be

 # e2label /dev/hda1 

Some trial and error may be required, but you'll eventually see the LABEL you need in the output. For example, I see the following output from this command on my VMware-based RHEL system:

 /boot 

This provides the hint I need to know how to repair my /etc/fstab configuration file.

Lab 3

3. 

For this exercise, use a test computer. Do not use a production computer. Do not use a computer with any data might be important to you. If something goes wrong, and you are unable to restore from a backup, you may need to reinstall Linux. This exercise assumes that you're using the default Red Hat Enterprise Linux boot loader, GRUB.

Navigate to the /boot directory. Change the name of the initrd-versionnumber.img file. Make sure it's something easy to remember such as initrd-versionnumber.bak. Reboot Linux. As GRUB goes through the boot sequence, it will probably stop when it can't find your initial RAM Disk (initrd) file, with a file not found message.

Now that your boot loader isn't working, what do you do? Can you try to start Linux in single-user mode?

image from book

Answers

3. 

As you practice learning about Linux for the RHCE exam, it's important to know how GRUB works. By default, it requires an initial RAM disk file, initrd-versionnumber.img. If GRUB can't find this file, it'll give you a file not found error. Since your computer does not boot, you'll need to boot with a rescue disc before you can fix the initrd file. Remember to make sure that the filename matches the name shown in /boot/grub/grub.conf exactly.

You can repeat this process with the vmlinuz file or the root directive in grub.conf. Make sure to have backups of key files so you can restore your original configuration. When you repeat this process, what happens after you select a kernel from the GRUB menu? Do you see a different error? Is it associated with a different file?

Understanding these answers can help you learn to use GRUB messages to more precisely diagnose specific problems with Linux.

Lab 4

4. 

In this lab, you'll create new PEs and use them to increase the size of a configured LV. You're doing this for the LV used by the /var directory. Because of the increasing demands of your Web site, you need more room for the /var directory for your Web site data. Assume your /etc/fstab configuration file includes the following line:

 /dev/Volume00/LogVol00  /var   ext3   defaults  1 2 

You've created PEs from the /dev/sde and /dev/sdf hard drives, and have just added another SCSI hard drive, /dev/sdg. Assume you've backed up the data that you need from the /var directory.

image from book

Answers

4. 

If you've just added the new hard drive, you'll need to set up partitions or use the entire hard drive for PEs. Based on the premises of the lab, you have the entire SCSI /dev/sdg hard drive available, so you can just allocate this entire hard drive as PEs with the following command:

 # pvcreate /dev/sdg 

The next step is to extend the VG, Volume00, to include the newly configured PEs. You can do so with the following command:

 # vgextend Volume00 /dev/sdg 

With the additional PEs at your disposal, you can increase the size of the LV allocated to the /var directory. For example, if you wanted to increase the size to 2GB, you could run the following command:

 # lvextend -L2G /dev/Volume00/LogVol00 



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

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