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

510

Part VI Troubleshooting and Maintaining System Hardware

on separate partitions from the Linux system, such as a dual boot system. For example, you may have Linux and Windows 98 operating on the same system. LILO tells the system the location of the kernel image and begins to load it.

4.Boot prompt: After LILO has finished loading, you are given the following prompt:

boot:

Press the tab key to see a list of operating systems that have been configured with LILO. Choose Linux (it may be the default) to enable the boot loader to start loading the kernel image file specified in the /etc/lilo.conf file.

5.Kernel initializes: At this point, the kernel is uncompressed and loaded into memory. The kernel then initializes the processor, memory, and console and console settings. From there, the kernel starts the disk bus subsystems, networking is initialized, and hardware device drivers are loaded.

6.init process: After hardware and device initialization has been completed, the kernel spawns the first Linux process, which is init. The init process is the “father” of all processes in a Linux system. It reads your startup configuration file in /etc/inittab, and brings the system up to the appropriate runlevel.

7.Startup scripts execute: As part of the init process initialization, the appropriate scripts for the designated runlevel are run. These scripts start the necessary processes and services for the runlevel, mount your file systems, and initiate the console sessions.

8.Login: At this point, your system is completely loaded. To begin working on the system, enter your username and password to gain access.

For the exam, know the general boot-up process and what happens at each step.

Analyzing Boot Process Errors

6.11 Take appropriate action on boot errors (e.g., LILO, bootstrap)

In order to fully understand problems with the boot process, you must be able to analyze the existing data up to the point where the boot process halted. By carefully analyzing error messages and log files of your boot process, you can quickly narrow down the point of failure. Interpreting boot errors, warnings, and informational messages is an extremely important aspect of troubleshooting, that allows you to reduce the time it takes to solve a problem.

Common Boot Problems

After you know the steps in the boot-up process, you should examine some of the common problems that are related to each step.

Chapter 17 Troubleshooting the Boot Process

511

Hardware

Any sort of hardware problem will most likely occur during the BIOS initialization process because the BIOS must examine these systems before loading the operating system. This is called the POST (Power-On Self Test). The POST routing examines all internal and external hardware for faults and proper configuration. The following is a list of common components that may fail, along with the error messages or warnings that you may encounter.

Motherboard: Typically, if you boot up your system and get no response at all except for a number of beeps from the systemboard, then you have a hardware problem with the systemboard circuitry. The beeps from the systemboard are in a sequence, which you can look up in the manual to determine which component — including the video subsystem, cache, memory, or CPU — may be faulty.

Memory: The POST routine performs checksum tests on the memory, and if any part of the memory addresses fail, it may halt the boot process altogether.

Peripherals: The system checks for the presence of a keyboard, mouse, and any other input devices. These devices aren’t needed for full operation — especially if you can use the network to connect to the machine or serial port — but sometimes a faulty keyboard or mouse can lock up a system.

Hard Drive subsystems: The system examines the hard drives and disk drive controllers, which may be SCSI or IDE. The system checks that they are using proper addresses that don’t conflict with each other.

Other Cards and Peripherals: At this time, any other cards and peripherals you have may be tested, such as SCSI cards, or network cards. Any type of IRQ or IO address conflict may render the device inoperable, and these can be detected in the POST process

Software

Software processes take over from the hardware checking routines after the BIOS has examined the master boot record (MBR) of the machine for a boot loader. The following sections explore some of the most common problems that can occur at boot time.

MBR

The BIOS loads the master boot record of the first boot hard drive. If it can’t find a hard drive, an “Operating system not present error” results. If there is a drive that contains Linux, BIOS loads LILO (the Linux Loader boot manager). If your MBR has become corrupt — as is often the case if you happen to get a virus from a diskette or Windows partition — you can reset it by booting from a DOS disk and using the fdisk/mbr to wipe the master boot record. Then, you must reinstall LILO by booting into your system with a boot disk, mounting your root partition, and running LILO again.

512

Part VI Troubleshooting and Maintaining System Hardware

LILO

At this point, LILO takes over the boot process and presents you with options regarding which operating systems are present and can be loaded. The system prints the word LILO on the screen as it initializes. Each letter that appears indicates that a certain process has been started. The first letter “L” indicates that it has moved itself into a proper area of memory. As this process finishes, the letter “I” displays and the second stage begins the secondary boot loader code. The second letter “L” displays when special descriptors are initiated to load the kernel. After the process has completed, the final letter “O” displays. You can troubleshoot boot problems with LILO by noting the number of letters that were displayed before the process halted. Table 17-1 shows a list of possible LILO

error codes and their causes.

 

Table 17-1

 

LILO Error Codes

 

 

LILO Prompt

Error Description

 

 

L (n)

Indicates a disk error code

 

 

LI

Second stage boot loader loaded, but not run. Kernel cannot be found.

 

 

LIL

Descriptor table unable to be read

 

 

LIL?

Second stage boot loader loaded at incorrect address

 

 

LIL-

Corrupt descriptor table

 

 

LILO

The LILO process ran successfully

 

 

The most common error message usually occurs when LILO prints only the first two letters “LI” and then freezes. This usually means that LILO can’t run the second stage of the boot loader because it can’t find the kernel image specified in the LILO configuration file, which is /etc/lilo.conf.

The lilo.conf file is used to configure LILO with the operating systems that can be loaded and their location. A typical Linux /etc/lilo.conf looks similar to the following example:

boot=/dev/hda

map=/boot/map

install=/boot/boot.b prompt

timeout=50

message=/boot/message

lba32

default=linux

image=/boot/vmlinuz-2.4.0-0.43.6 label=linux

Chapter 17 Troubleshooting the Boot Process

513

initrd=/boot/initrd-2.4.0-0.43.6.img read-only

root=/dev/hda5

The kernel image is located in /boot/vmlinuz-2.4.0-0.43.6 on partition /dev/hda5. If it can’t find this image, the LILO boot loader will fail when it tries to load the Linux system. Therefore, if you need to change the location of the kernel image, you will have to use a boot disk to mount the partition, fix the /etc/lilo.conf file, run LILO to activate the changes, and reboot.

A dual-boot system with Windows contains an extra section to identify where the Windows partition is located:

other=/dev/hda1

label=windows

table=/dev/hda

This section of the lilo.conf file tells the system that the Windows partition can be found on /dev/hda1.

When installing a dual-boot system with Windows, always install Windows first, and Linux second. If you install in reverse order, Windows will overwrite LILO and the MBR.

Kernel initialization and init process

The last steps of the boot process are kernel initialization and the beginning of the init process. The kernel loads into memory and initializes. Then the init

process (which is the “father” of all processes in a syste) begins by loading the various services and mounting the hard drives.

The main problem that you will run into at this stage is a system inability to mount one or more of the file systems on your Linux partitions. This problem will occur either because of a corrupted file system — in which you will have to run the fsck (File System Check) utility to fix any errors and inconsistencies — or because your location of the file systems is incorrect in your /etc/fstab file.

The /etc/fstab file is consulted whenever the mount command is started. The table lists the different file systems that are located on each partition, and gives options on how they are loaded. A typical /etc/fstab looks something like this:

/dev/hda1 /dos

msdos

defaults

0

3

 

 

/dev/hda5 /boot

ext2

defaults

1

2

 

 

/dev/hda6 /

ext2

defaults

1 1

 

 

 

/dev/hda7 swap

swap

defaults

0 0

 

 

 

/dev/fd0 /mnt/floppy ext2 user,noauto

 

0 0

/dev/hdc /cdrom

iso9660 user,ro,noauto

0

0

none

/proc

proc defaults

0 0

 

 

 

none

/dev/pts

devpts

gid=5,mode=620

0

0

 

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