Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

526 Chapter 17 Study Guide

3.Run the fsck utility with the -C and -V and -r options. This enables you to see as much information as possible, and interactively choose to repair errors.

fsck -C -V -r /

(Notice how the fsck utility actually invokes the e2fsck program to check an ext2 file system.)

4.The program will warn you about running fsck on a mounted file system, but since because you are in single user mode, this is okay, so confirm the prompt. Watch the process run, and watch it detect for errors. Say yes to any prompt that asks if you want to fix errors.

5.When the process is finished, you can safely return to normal running by either rebooting the machine, or by going back to your default runlevel.

Answers to Chapter Questions

Chapter Pre-test

1.By using a boot disk, you will be able to boot your system, and mount a basic file system so that you can fix the errors that are preventing your system from starting.

2.The fsck utility, short for file system check, checks your file systems for inconsistencies and errors, and fixes them automatically.

3.The top command will show you all your running processes, including the CPU time and amount of memory that they are using.

4.Your boot disk should contain utilities that can be used to safely rescue your system, such as disk utilities, a text editor, and hardware and communication utilities.

5.By connecting to a serial port on your Linux system, you can access the console directly. This is useful if networking services are not working, and if you can’t log into the system remotely.

6.The command to check current processes is the ps command.

7.LILO stands for LInux LOader, which is a special boot loader that loads the operating system into memory and starts it.

8.To format the master boot record on a system, you can use the fdisk /mbr command.

9.The /var/log/dmesg file contains the kernel messages from your last boot.

10.The setserial command is used to configure the serial ports on your system.

Chapter 17 Study Guide 527

Assessment Questions

1.A. If Windows is loaded after an installation of Linux, it will write over the master boot record with its own boot loader. To retrieve LILO, you will have to use a boot CD to boot onto your Linux partition and run LILO. For review, see the “Analyzing Boot Process Errors” section.

2.C. The POST (Power On Self Test) goes through a number of internal checks of all hardware and systemboard components, such as CPU, memory, and hard drives. It has nothing to do with Linux itself. For review, see the “Examining the Startup Process” section.

3.D. If your hard drive file systems are not unmounted properly, the fsck utility will automatically run the next time the system is started to fix any inconsistencies before they are mounted again. If they are not fixed, the file system can quickly become corrupt. For review, see the “Using System Status Tools” section.

4.D. The system can’t mount that particular partition because of data errors. Running the fsck utility should enable you to recover from the errors. Because the other file systems were not affected, it is most likely not a physical problem with the hard drive. For review, see the “Analyzing Boot Process Errors” section.

5.A. If the system won’t even get to the POST stage, the problem is most likely with the systemboard itself. You can compare the number of beeps to the BIOS manual in order to determine which specific component failed. For review, see the “Examining the Startup Process” section.

6.C. Because you can’t load any utilities that are on the root partition, you must use a boot disk and run the fsck utility on the damaged file system. For review, see the “Using the System Boot Disk” section.

7.C. When the LILO prompt gets this far and halts, this means that the boot loader has been loaded, but can’t run. For review, see the “Analyzing Boot Process Errors” section.

8.B. The most important and useful utility to have is fsck. If you run into the problem of a corrupted file system, and you can’t mount any drives, you will need access to the fsck utility, which can repair them. For review, see the “Using System Status Tools” section.

9.A. If the system fails the memory test during a POST routine, one of the memory chips is probably faulty. For review, see the “Examining the Startup Process” section.

10.D. The fsck utility can only run on a file system that is unmounted. If it were active, this utility wouldn’t be able to properly repair the drive, and may cause further corruption. For review, see the “Using System Status Tools” section.

528 Chapter 17 Study Guide

11.B. The setserial command is used to configure settings for your serial ports. This is helpful if you need to communicate with the terminal on one of these ports. For review, see the “Using System Status Tools” section.

12.D. By default, LILO is installed on the master boot record of your hard drive. The master boot record is a special area that is loaded by the BIOS. You can then use LILO to choose which operating system you will enter. For review, see the “Analyzing Boot Process Errors” section.

13.B. To remove LILO, it is easiest to boot from a DOS diskette and run fdisk/mbr which will format the master boot record. For review, see the “Analyzing Boot Process Errors” section.

14.A. The boot kernel messages are saved to the log file /var/log/dmesg. For review, see the “Analyzing Boot Process Errors” section.

15.A. When the system shuts down abnormally and the file systems are not properly mounted, the fsck utility will automatically check the disks for errors and inconsistencies in order to repair them. For review, see the “Using System Status Tools” section.

16.C. If a disk error is encountered during the LILO initialization, it will print the first “L” and a special numeric error code that maps to a specific disk error. For review, see the “Analyzing Boot Process Errors” section.

17.D. The Linux boot loader LILO did not install properly. After the BIOS initializes, it loads code from the master boot record, where LILO should reside. If it isn’t there, no operating system will load. For review, see the “Analyzing Boot Process Errors” section.

18.A. To repair the damaged partition, you can use the fsck command to fix any errors and inconsistencies. For review, see the “Using System Status Tools” section.

19.D. This is normal operating procedure for LILO. After it has finished loading, and the word LILO appears on your screen, you can now choose which operating system you want to load, or you can let Linux load by default. For review, see the “Analyzing Boot Process Errors” section.

20.B. In order for LILO to be able to boot into the Windows partition, you must configure it within the /etc/lilo.conf file. You must re-run LILO when you are finished in order to reload the new configuration. For review, see the “Analyzing Boot Process Errors” section.

Chapter 17 Study Guide 529

Scenarios

1.You will need to use a boot rescue disk that contains a boot image of the kernel, and a basic root file system. This disk may be a self-made floppy disk, or you can use the installation CD-ROM for the Linux distribution.

a.Boot from the rescue disk.

b.You must run a filesystem check on all your drives. You can use the following command if your root file system is on the first partition of the first drive:

fsck /dev/hda1

c.Repeat for any other damaged file systems. Tell the program to repair any errors or inconsistencies it finds.

d.After you are finished, remove the boot disk and reboot your system. It should start up normally — unless severe damage was caused to the file system.

2.The Windows installation has overwritten LILO, which was installed in the MBR.

a.To recover LILO, you must use a boot disk to gain access to the Linux partition.

b.After you have booted with the boot disk, you need to mount the root file system somewhere so you can work on it (assuming the root is on /dev/hda5):

mount -t ext2 /dev/hda5 /mnt

c.The preceding command mounts the root file system into the directory /mnt. Now you need to reload LILO by running /sbin/lilo:

cd /mnt/sbin lilo

d.LILO should now be reinstalled back into the master boot record.

e.Before you reboot, however, you should add the Windows partition to the lilo.conf file. Using a text editor, such as vi, edit the /etc/lilo. conf and add these entries (assuming Window is on /dev/hda1):

other=dev/hda1

label=win

table=/dev/hda

f.Run LILO again, so that the configuration is saved.

g.Now reboot, and when the LILO prompt appears, you can choose between booting Linux or Windows.

Troubleshooting 18C H A P T E R

Software and

Networking

EXAM OBJECTIVES

6.9 Resolve problems based on user feedback (e.g., rights, unable to login to the system, unable to print, unable to receive or transmit mail)

6.10 Recognize common errors (e.g., package dependencies, library errors, version conflicts)

6.12 Identify backup and restore errors

6.13 Identify application failure on server (e.g., Web page, telnet, ftp, pop3, snmp)

6.16 Use network utilities to identify network and connectivity problems (e.g., ping, route, traceroute, netstat, Isof)

532

Part VI Troubleshooting and Maintaining System Hardware

CHAPTER PRE-TEST

1.What sort of hardware problems can cause a tape backup to fail?

2.How does the ping command help you diagnose network connectivity problems?

3.Why do some software programs suffer from version and library conflicts?

4.What command can you use to send a job to a printer?

5.What happens when you send an e-mail to a misspelled e-mail address?

6.What is the purpose of the traceroute command?

7.What command can you use to check your current running processes?

8.Why should a user be locked out of his or her account after a certain number of unsuccessful logins?

9.What should you examine after the failure of an application?

10.What is the purpose of issuing a telnet localhost command on the system console?

Answers to these questions can be found at the end of the chapter.

Соседние файлы в предмете Операционные системы