Book: LPI Linux Certification in a Nutshell
Section: Chapter 13.  Hardware and Architecture (Topic 1.1)



13.1 Objective 1: Configure Fundamental System Hardware

Setting up a PC for Linux (or any other operating system) requires some familiarity with the devices installed in the system and their configuration. Items to be aware of include installed modems, serial and parallel ports, network adapters, SCSI (pronounced "scuzzy") adapters, and sound cards. Many of these devices, particularly older ones, require manual configuration of some kind to avoid conflicting resources. The rest of the configuration for the system hardware is done in the PC's firmware, or BIOS.

13.1.1 BIOS

The firmware located in a PC, commonly called the Basic Input/Output System, or BIOS, is responsible for bringing all of the system hardware to a state at which it is ready to boot an operating system. Systems vary, but this process usually includes system initialization, the testing of memory and other devices, and ultimately locating an operating system from among several storage devices. In addition, the BIOS provides a low-level system configuration interface, allowing the user to choose such things as boot devices and resource assignments. Quite a few vendors of BIOS firmware provide customized versions of their products for various PC system architectures.[1] Due to these variations, it's impossible to test specifics, but the LPIC Level 1 exams do require an understanding of the basics.

[1] For example, a laptop BIOS may differ significantly from a desktop system of similar capability from the same manufacturer.

At boot time, most PCs display a method of entering the BIOS configuration utility, usually by entering a specific keystroke during startup. Once the utility is started, a menu-based screen in which system settings can be configured appears. Depending on the BIOS vendor, these will include settings for disks, memory behavior, onboard ports (such as serial and parallel ports), the clock, as well as many others.

13.1.1.1 Date and time

One of the basic functions of the BIOS is to manage the onboard hardware clock. This clock is initially set in the BIOS configuration by entering the date and time in the appropriate fields. Once set, the internal clock keeps track of time and makes the time available to the operating system. The operating system can also set the hardware clock, which is often useful if an accurate external time reference is available on the network while the system is running.

13.1.1.2 Disks and boot devices

Another fundamental configuration item required in BIOS settings is the selection of storage devices. Modern PCs can contain a variety of removable and fixed media, including floppy disks, hard disks, CD-ROMs, CD-RWs, DVD-ROMs, and Zip and/or Jaz drives. Newer systems are able to detect and properly configure much of this hardware automatically. However, older BIOS versions require manual configuration. This may include the selection of floppy disk sizes and disk drive parameters.

Most PCs have at least three bootable media types: an internal hard disk (IDE or SCSI, or perhaps both), a CD-ROM drive (again IDE or SCSI), and a floppy disk. After initialization, the BIOS seeks an operating system (or an operating system loader such as the Linux Loader, LILO) on one or more of these media. By default, many BIOS configurations enable booting from the floppy or CD-ROM first, then the hard disk, but the order is configurable in the BIOS settings.

On the Exam

You should be familiar with the general configuration requirements and layout of the BIOS configuration screens for a typical PC.

13.1.2 Resource Assignments

Some of the details in the BIOS configuration pertain to the internal resources of the PC architecture, including selections for interrupts (or IRQs), I/O Addresses, and Direct Memory Access (DMA) Channels. Interrupts are electrical signals sent to the PC's microprocessor, instructing it to stop its current activity and respond to an asynchronous event (a keystroke, for example). Modern devices in PCs often share interrupts, but older hardware requires manual verification that interrupt settings are unique to avoid conflicts with other devices.

I/O addresses are locations in the microprocessor's memory map (a list of defined memory addresses) reserved for input/output devices such as network interfaces. The microprocessor can write to the devices in the same way it writes to memory, which simplifies the device interface. If multiple devices inadvertently share the same I/O address, the system might behave oddly or crash.

DMA allows some devices to work directly with memory through a DMA "channel," freeing the microprocessor for other tasks. Without DMA, data must be read from I/O ports for a device and stored in memory -- all by the microprocessor. A device that has DMA capabilities has direct access to memory and writes its own data there when the microprocessor is busy with computation. This can improve performance.

All of these are finite resources, and it is important to avoid conflicting settings. Common devices such as serial and parallel ports have standard assignments, as shown in Table 13-1.

Table 13-1. Common Device Settings

Device

I/O Address

IRQ

DMA

ttyS0 (COM1)

3f8

4

NA[2]

ttyS1 (COM2)

2f8

3

NA

ttyS2 (COM3)

3e8

4

NA

ttyS3 (COM4)

2e8

3

NA

lp0 (LPT1)

378-37f

7

NA

lp1 (LPT2) [3]

278-27f

5

NA

fd0, fd1 (floppies 1 and 2)

3f0-3f7

6

2

fd2, fd3 (floppies 3 and 4)

370-377

10

3

[2] NA: not applicable.

[3] lp1 uses IRQ 5. Some older PC audio devices commonly use this interrupt, which could be a problem if two parallel ports are required.

Most PCs don't contain all of these devices. For example, a typical configuration includes two serial ports, ttyS0 and ttyS1. These two ports can be used to attach external modems or terminals and occupy interrupts 4 and 3, respectively. For systems with additional serial ports installed, ttyS0 and ttyS2 share interrupt 4, and ttyS1 and ttyS3 share interrupt 3. However, the system design does not allow these ports to concurrently share the interrupt and exchange serial data. Otherwise, communications would fail if both ports from either pair were to be used together.

On the Exam

You don't have to memorize all the possible device settings for the PC architecture, but you should be ready to answer specific questions regarding some of the more common ones, such as interrupt settings for serial and parallel ports. You should also be able to identify conflicting I/O and IRQ assignments given a scenario.

13.1.3 1024 -Cylinder Limit

With most PC operating systems, data loaded by the BIOS to boot the operating system is found at the beginning of the disk in the Master Boot Record, or MBR. Windows users rarely have to think about the MBR because there is no alternate location for the boot record. With Linux, however, the user can place the boot loader (LILO) into either the MBR or the root partition. This flexibility can lead to a problem for the BIOS and LILO and cause a failure at boot time. The failure can occur because the BIOS must load LILO into memory and start it, but the BIOS can't always access portions of the disk beyond the 1024th cylinder. If the BIOS can't read all of LILO, the boot fails. Also, older versions of LILO must have a kernel image located within the first 1024 cylinders for similar reasons. These limitations aren't significant, but do require planning during the partitioning of disks at installation time. This Topic is discussed further in Section 14.2.

On the Exam

Be aware that LILO and kernels should be installed below cylinder 1024 on larger disks.