Section 34.2. Answers


34.2. Answers

  1. b. Once you have configured a custom kernel by using the make command (e.g.,make config or make xconfig), you then create the image. You can do this by using the make bzimage command. After this step, you would then compile modules.

  2. a. It is possible to give any name you wish to a kernel image. However, the standard pattern is to use the following syntax: vmlinuz, kernel number, architecture. For example: vmlinuz-2.6.10-5-686.

  3. c. When finishing a kernel update, the final step is updating the boot loader. Otherwise, you have a new kernel, but no way to boot it.

  4. b. The grub.conf file contains the values you need to edit in order to boot a new kernel.

  5. c. cramfs allows systems to create RAM disks. Creation of RAM disks is especially important at boot time. The initrd command uses cramfs to create a disk at boot time in order to make the process more stable. Without cramfs in Debian systems, it would not be possible to create an initrd image, and the system may fail to boot.

  6. c. The bzmore application is specially designed to view files that have been compressed using bzip2. It is also possible to use bzless. Not only can you use bzmore or bzless to view files, but you can also use these commands to decompress a file to standard output, then back into a file.

  7. a. Make sure that you understand the options to the patch command. It is not enough to know that the patch command exists.

  8. d. Make sure that you understand entries in /etc/inittab. This includes how to edit existing lines so that terminals are available at additional runlevels. Knowing the inittab file well includes knowing the ramifications of seemingly trivial errors.

  9. c. The first startup script for Debian-based systems (including Knoppix and Ubuntu) is /etc/init.d/rcS. But the /etc/init.d/rcS script is not the first process; the script is run by the first process, which is init. Nevertheless, it is important to know that if the /etc/init.d/rcS script encounters a problem, it will begin a sequence of additional problems. Thus, it is often a good idea to troubleshoot problems as early as possible. The /etc/init.d/rcS script may be a good place to start.

  10. a and c. The make modules install command installs the modules, and editing the boot loader allows you to boot the kernel you have just created. These steps are the only ones in the question that require root access.

  11. d. The chkconfig command is one of many that allow you to modify the runlevel scripts. You can use chkconfig to list or change runlevel settings. To change run level settings, use the --level option, and then finish the command with either on or off. In this question, you want Sendmail to run automatically at run levels 3 and 5, so you use the on option.

  12. The correct entry is:

     tune2fs -c 200 

    The tune2fs command can be used not only to specify the maximum number of mounts before fsck is used, but also to change the mount count (i.e., the number of mounts the system thinks has already occurred), as shown in the following example:

     sudo tune2fs -C 199 /dev/hda2 

    This command tells the system that the mount count is now 199. If you have set the system to run fsck at 200, the system will run fsck upon the next boot.

  13. a and d. The command found in the question is quite standard. However, the command will generate a warning. This is because the -r option enables Rock Ridge extensions, which allow Unix-style symbolic links. Rock Ridge is an extension to the ISO9660 standard, and thus the warning. Similarly, the Joliet filesystem can generate warning messages because it is a Microsoft-inspired extension to ISO9660. Joliet allows the preservation of long filenames, which can get truncated during the CD burning process.

  14. b and c. The mkfs.reiserfs and mkreiserfs commands are essentially the same. You can also use the mkfs command with the proper options to create various file systems, including ext2, ext3, reiserfs, vfat, vfat32, and ntfs.

  15. a and d. The tune2fs and dumpe2fs commands allow you to determine the last time boot information has been written to a hard drive. For tune2fs, you must use the -l option and specify the partition (e.g., /dev/hda2). If using dumpe2fs, you need to specify the -e option and the partition.

  16. c. When using dd on files and interdrive transfers, specifying the block size makes a significant difference. The dd command is more efficent when you specify 8-KB blocks (e.g., bs=8k), because writing in larger blocks increases speed.

  17. d The mkraid command is used to process instructions in files outside the /etc directory, in this case /etc/md0.

  18. c. The lspci command allows you to scan the PCI bus of a computer. The -v option puts lspci into verbose mode. The -vv option provides especially verbose information, which allows you to obtain not only IRQ information, but also the latencies of all listed PCI devices.

  19. The usbview command provides an X Window System graphical interface that allows you to determine the data transfer capabilities of the device, the potential connection speed of the USB controller, and much other information. The interface updates in real time, so you can see how the system reacts when you plug in and remove devices.

  20. c. If you wish to disable DMA on a particular device, issue the hdparm -d0 command against it. If you wish to enable DMA on this device, issue the command:

     hdparm -d1 /dev/hda 

  21. b. The cardctl command can be used to inform the system that a PCMCIA card is going to be ejected. In order to use the cardctl command in this way, you need to run it as root.

  22. d. You can use the smbpasswd command to add users, change passwords, and disable users. You must run the command as root in order to add users, change passwords of other users, and disable users.

  23. d. The tdbsam option in Samba is recommended if you are going to use a standalone server that does not require LDAP or built-in database replication.

  24. a. NFS entries are very specific. One space can mean the difference between a secure system that offers expected services and a system that provides all access to any user on the network. In this case, a simple space between the FQDN and the permissions (rw) means that all users outside of the james.stangernet.com domain get full access to the NFS share, and members of the james.stangernet.com get read-only access. It is possible in this case that such permisions are the exact opposite of what was intended.

  25. d. Modern NFS systems automatically set files owned by root to the nfsnobody account. This step avoids the possibility of a user uploading an application that has the setuid bit set to root.

  26. d. The /proc/fs/exports and /proc/fs/nfsd files both provide real-time information concerning NFS shares. The /etc/fstab file contains configuration information for mount. It does not reflect real-time information. Similarly, the /etc/exports file contains configuration information for NFS; it does not report real-time NFS share information.

  27. The correct answer is @backup.stangernet.com. syslog has the ability to log to remote systems. You must use the ampersand (@) to inform syslog that you are going to log to a remote system.

  28. b. If you want to have all emergency messages from all services/daemons sent to a specific file, specify the wildcard (*), the .emerg syslog facility, and then the destination. Make sure that you understand each of the syslog facilities and their respective priority levels.

  29. b. The alien command must be run as root. You do not have to use alien in any particular sequence when converting files. If you have a directory full of RPM files, for example, you can simply convert them using the wildcard (*).

  30. d. The information given in the sample for this question comes from an RPM spec file. A spec file is essential when creating an RPM file.

  31. c, The perl -MCPAN -e shell command allows you to enter interactive mode, where you can update, remove, and otherwise manage Perl modules.

  32. a. The at command allows you to plan a one-time execution of a command in the future. For repeated command execution, use the cron or anacron facility. The at command is also capable of reading from standard input. Make sure that you understand the many ways you can specify time for the at command. For this question, the now + time syntax was used.

  33. c. In order to mount an ISO, you need to specify the -o loop option and argument. You also need to be root. Finally, you need to specify the mount type, which in this case is iso9660.

  34. You could specify either rdev -s /dev/hda5 or rdev -swapdev /dev/hda5. Remember,with Linux you can usually accomplish a goal in more than one way.

  35. d. The noexec option allows you to mount a partition in such a way that it forbids files to be executed on it.

  36. a. Make sure you understand the boot sequence in Linux systems: The boot loader starts, the kernel loads, hardware initialization, service/daemon startup.

  37. c. The LIL error message indicates that the second stage boot loader was able to start, but the descriptor table has not been found. Make sure that you understand common LILO and GRUB error messages, as well as the boot sequence for Linux systems.

  38. b. The strace command can help you identify exactly which calls are made by an application or daemon, and when. Finding out this information can help you identify the cause of a particular failure and resolve the problem.

  39. c. The error message that reads "Too many levels of symbolic links" almost always indicates an infinite loop.

  40. a. The ltrace command is much like the strace command. However, ltrace is designed to look for calls to dynamic libraries and therefore may be able to provide more specific information than strace.

  41. b. The strings command allows you to view plain text within a binary file. Using strings, you can learn more about the nature of a file, including notes and instructions that the programmer plans to send to standard output.

  42. c. The /etc/login.defs file contains many different instructions, including where mailbox information resides. Make sure that you are familiar with both the syntax of this file and its general purpose.

  43. The -s option of the dmesg command allows you to specify the size of the buffer you wish to read when it comes to reading kernel messages. In this case, dmesg -s17384 allows you to read all of the contents of the buffer, as this particular system has had its buffer size changed.

  44. d. No matter whether you are using Sendmail, Postfix, or another MTA, remote systems may reject your emails if the sending system does not use a recognized DNS domain. Email administrators rewrite email message headers and other information to solve this problem. If the email uses a valid DNS domain, the message will be received. For example, the /etc/mail/genericstable file can help you rewrite addresses so that they are not rejected. If applications such as Mozilla Thunderbird are used, you may not need to rewrite headers, because Thunderbird, Outlook Express, and other graphical mail programs allow you to specify email and DNS information more readily than the mailx and mail commands.

  45. b. One of the ways you can solve this problem is by editing the /etc/passwd file and changing the name in the fourth field of the user's entry. You can also rewrite headers using genericstable in Sendmail.

  46. b. Using the passwd command for the specific user will solve the problem. No additional editing of the /etc/shadow file is necessary.

  47. The answer is lsof -b. This option is sometimes necessary, because certain kernel calls may cause lsof to hang or report incorrect information.

  48. b. Simply using dmesg with the grep command will help you identify the nature of the problem, as long as the kernel logger has recorded it.

  49. d. A Samba server cannot be configured to be a WINS client and server at the same time.

  50. c. Using ldconfig without arguments reads all necessary files and configures all dynamic libraries. The -X option tells ldconfig not to update links. The -N option tells ldconfig to omit updating the cache. If you specify both options, libraries will not be updated.

  51. a. The hdparm -Tt command reads transfer rates for a hard drive.

  52. a and d. The sysctl -a option allows you to display all values for a particular device. The information contained in the /proc/ide/hdc/settings file provides information about various settings, including the drive speed and DMA information. The information in this file is not as comprehensive as the output of the sysctl -a command, however.

  53. d. The make mrproper command erases any .config files and allows you to begin a clean kernel-compilation session.

  54. a and b. The -y and -f options allow you to accomplish the goal, because the -y option tells fsck to automatically solve problems, while the -f option tells fsck to conduct a check, even though fsck thinks that no problems exist on the partition.,



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

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