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:
|
|
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. |
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.
|
|
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. |
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? |
|
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. |
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. |
|
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 |