Today, continue on your path to RHCE certification. Learn about creating a new kernel the easy way, kernel sources, recompiling a kernel, and the cron and at systems. Take notes, because there's a test at the end. This comes from chapter five of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7).
The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully, as there may be more than one correct answer. Choose all correct answers for each question. This is just to test your understanding of the material; Red Hat no longer includes multiple choice questions on the RHCE or RHCT exams.Shell Configuration Files
1. The system-wide file associated with the bash shell is:
A. /etc/shells.conf
B. /etc/startup.sh
C. /etc/profile
D. There is no system-wide shell startup file; all such files reside in individual user directories.
Setting Up and Managing Disk Quotas
2. You are running an ISP service and provide space for users’ Web pages. You want them to use no more than 40MB of space, but you will allow up to 50MB until they can clean up their stuff. How could you use quotas to enforce this policy?
A. Enable grace periods; set the hard limit to 40MB and the soft limit to 50MB.
B. Enable grace periods; set the soft limit to 50MB and the hard limit to 40MB.
C. Enable grace periods; set the soft limit to 40MB, and the hard limit to 50MB.
D. None of the above.
3. If you wanted to configure quotas for everyone on the /home directory, what would you add to the options in /etc/fstab?
A. quota
B. usrquota
C. grpquota
D. userquota
The Basics of the Kernel
4. You are troubleshooting someone else’s computer and are not sure what network card is inside it. You have checked the output from the dmesg command, but no network cards are listed, and even though you have a bunch of compiled network modules, none are currently loaded. What could you do to load the unknown network device most quickly?
A. Try loading each module manually.
B. modprobe \*
C. Nothing. The kernel will load the module when you try to connect to the network.
D. modprobe -t net
5. You can’t find any modules in the /lib/modules/kernel_version/kernel/drivers (or similar) directories. Which of the following actions would set up these modules?
A. Go into the /lib/modules/kernel_versiondirectory and run the make modules command.
B. Go into the /lib/modules/kernel_versiondirectory and run the make modules and make modules_install commands.
C. Go into the /usr/src/linux-2.4 directory and run the make modules command.
D. Go into the /usr/src/linux-2.4 directory and run the make modules and make modules_ install commands.
New Kernels, the Easy Way
6. When you install an updated kernel from a Red Hat RPM, which of the following steps do you need to take?
A. Add information on the new kernel in a GRUB stanza.
B. Add a new Initial RAM disk to the /boot directory.
C. Reconfigure the /usr/src/linux-2.4/.config file.
D. None of the above.
Kernel Sources
7. You’re not sure which kernel source tree is active for your Linux computer. Which of the following directories should be linked to that source tree?
A. /usr/src/linux
B. /usr/src/linux-2.4
C. /usr/src/linux-2.4rh
D. /usr/src
Recompiling a Kernel
8. When compiling a kernel, you’ve navigated to the /usr/src/linux-2.4 directory. Which of the following would not work with the make command to reconfigure your kernel?
A. config
B. menuconfig
C. windowconfig
D. xconfig
9. You have just compiled a new kernel with the make bzImage command. You need to copy the kernel and Initial RAM disk to the /boot directory. What is the most efficient way to make this happen?
A. Copy the image from the /usr/src/linux/arch/i386/boot directory.
B. Nothing. The make bzImage command automatically installs the kernel to the /boot directory.
C. Install a revised Red Hat kernel RPM.
D. After you’ve set up modules, run the make install command.
The cron and at Systems
10. You want to schedule a maintenance job to run from your home directory on the first of every month at 4:00 A.M. Which of the following cron entries runs the specified job at the specified time?
A. 0 4 1 * * ~/maintenance.pl
B. 4 1 * * ~/maintenance.pl
C. 0 4 31 * * ~/maintenance.pl
D. 1 4 0 0 ~/maintenance.pl
This is part one from the fifth chapter of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7). Check it out at your favorite bookstore today. Buy this book now.