Tải bản đầy đủ (.pdf) (42 trang)

Tài liệu Planning the Installation ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (399.13 KB, 42 trang )

2
Planning the
Installation
CERTIFICATION OBJECTIVES
2.01 Basic Hardware Knowledge
2.02 Hardware Compatibility
2.03 Disk Partitions

Two-Minute Drill
Q&A
Self Test
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
Blind Folio 2:53
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
O
ne of the strong points of Red Hat Linux is its easy installation. There are several
different methods of installation, and each is automated to a considerable degree.
In many cases, it’s now possible to just pop the first Red Hat installation CD in the
drive and install Linux from there.
However, as you become a Linux expert, people are going to rely on you to install
Linux in a variety of situations. You need to plan what you’re going to do. You need
to know the basic hardware available for a personal computer, as well as what hardware
is compatible with Red Hat Linux. You’ll also want to plan the organization of different
Linux directories on individual hard drive partitions.
Remember, one-third of the RHCE exam is based on your ability to install Linux.
The exam is based on computers utilizing the Intel-based architecture, which allows
for an extensive variety of hardware. Most hardware works well with Linux. In many
cases, you can make other hardware work with Linux, even if it was originally built


for another operating system such as Microsoft Windows.
CERTIFICATION OBJECTIVE 2.01
Basic Hardware Knowledge
While customized Red Hat Linux distributions are available for such diverse platforms
as SPARC, Itanium, and S/390, the focus of the RHCE exam is on computers built
to the Intel-based architecture.
The architecture of a personal computer defines the components that it uses as
well as the way that they are connected. In other words, the Intel-based architecture
describes much more than just the CPU. It includes a number of specific standards
for building and connecting other critical hardware components such as the hard
drive, the network card, the keyboard, the graphics adapter, and more. All software,
including Red Hat Linux, is written for a specific computer architecture.
Even when a manufacturer creates a device for the Intel platform, it may not work
with Linux. Therefore, it’s important to know some basic architecture of an Intel-based
computer. This will be the last section that addresses the basic RHCE exam prerequisites
like those covered in Chapter 1.
54
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Basic Hardware Knowledge
55
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
Intel Communications Channels
Three basic channels are used to communicate in an Intel architecture PC: interrupt
request (IRQ) ports, input/output (I/O) addresses, and direct memory address (DMA)
channels. An IRQ allows a component such as a keyboard or printer to request service

from the CPU. An I/O address is a memory storage location for communication
between the CPU and different parts of a computer. A DMA channel is used when
a device such as a sound card has an independent processor and can bypass the CPU.
IRQ Settings
An IRQ is a signal that is sent by a peripheral device (such as a network card, graphics
adapter, mouse, modem, or serial port) to the CPU to request processing time. Each
device you attach to a computer may need its own IRQ port. Normally, each device
needs a dedicated IRQ (except for USB and some PCI devices). The Intel architecture
is currently limited to 16 IRQs (0–15), which is often not enough for a PC with
multiple network adapters and hard drives, as well as a sound card, printer, game card,
and more.
If you have built your own PC(s), you probably know that there are a number
of “bare-bones” PCs available in many computer stores. Even on these bare-
bones PCs, basic components such as a keyboard, timer, BIOS clock, and CPU
occupy a number of IRQs, leaving perhaps IRQs 5, 7, 9, 10, 11, and 12 free.
Then you may add a sound card on IRQ 5 and a printer on IRQ 7. And then
each video card, serial mouse, modem (although traditionally, a serial mouse
and modem use IRQs 3 and 4) and network card that you install needs its own
IRQ—which leaves a total of 1 free. (Maybe!)
If you run out of IRQs, you may still be able to install another PCI device. Several
PCI devices can share a single IRQ through the PCI bus, which manages the way
each PCI device shares your IRQs. However, this requires BIOS support for PCI
sharing, which you can enable through your computer’s CMOS settings. Most PCs
manufactured after 1994 contain PCI buses.
USB devices can help you conserve IRQs in the same way. The Universal Serial
Bus (USB) host controller also regulates attached USB devices, including how they
share IRQs. Most PCs manufactured after 2000 contain USB ports.
If you’re having a problem with your USB ports, before you check anything
in Linux, check your BIOS. Many BIOS menus include an option to turn USB
connections on and off.

D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
56
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
Planning the IRQ Layout: Standard IRQs
Now you should see that IRQs are a precious commodity on a PC. IRQ conflicts are
common when you’re connecting a lot of devices. If your printer doesn’t work after
you’ve connected a second network card, it can help to know the standard IRQ for
printers. You can then assign a different IRQ to that network card. If you don’t have
any free IRQs to assign to that network card, you may be able to sacrifice a component
that uses a standard IRQ. For example, if you always connect to a server remotely,
that server PC may not need a keyboard. If you can boot a computer with a CD-ROM,
you may not need a floppy drive.
Some IRQs are essential to the operation of a PC and just can’t be changed. These
are reserved by the motherboard to control devices such as the hard disk controller
and the real-time clock. Do not use these interrupts for other devices, or there will
be conflicts! Other IRQs are normally assigned to common devices such as a floppy
disk and a printer. In Linux, you can check /proc/interrupts to see which interrupts
are being used, and which are free for new devices. The reserved and typical IRQ
assignments are shown in Table 2-1.
You can find a list of assigned IRQ channels in your /proc/interrupts file.
Input/Output Addresses
Every computer device requires an input/output (I/O) address. It’s a place where data
can wait in line for service from your CPU. I/O addresses are listed in hexadecimal
notation (base 16), where the numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e,
and f. Some typical I/O addresses include those for the basic serial ports, known in
the Microsoft world as COM1, COM2, COM3, and COM4. These ports normally

use the following I/O addresses: 03f8, 02f8, 03e8, and 02e8.
You can find a list of assigned I/O addresses in your /proc/ioports file.
Direct Memory Addresses
A direct memory address (DMA) is normally used to transfer information directly between
devices, bypassing the CPU. Many components don’t need a CPU. For example, many
sound cards include their own processor. This allows your PC to set up a DMA channel
between a hard drive and a sound card to process and play any music files that you
may have stored.
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
While DMA channels bypass the CPU, devices that use DMA are still configured
with IRQ ports. There are eight standard DMA channels (0–7); DMA 4 is reserved
and cannot be used by any device.
You can find a list of assigned DMA addresses in your /proc/dma file.
RAM Requirements
You probably have no idea how much memory you absolutely need. The maximum
amount of memory your system will use is the sum of all of the memory requirements
of every program that you will ever run at once. That’s hard to compute. Therefore,
you should buy as much memory as you can afford. Extra RAM is usually cost effective
when compared to the time you would spend trying to tune an underpowered system.
Linux will comfortably run at the command line for a single user on 32MB of RAM;
64MB is better, while 128MB of RAM and above are magical!
Basic Hardware Knowledge
57
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
IRQ Typical Assignments
0 System timer
1 Keyboard

2 Cascade for controller 2
3 Serial ports 2, 4
4 Serial ports 1, 3
5 Parallel port 2 or sound card
6 Floppy disk controller
7 Parallel port 1
8 Real-time clock
9 Redirected to IRQ2
10 Not assigned (commonly used for a network card)
11 Not assigned
12 PS/2 mouse, if installed
13 Math coprocessor
14 IDE hard disk controller 1
15 IDE hard disk controller 2
TABLE 2-1
Standard IRQ
Assignments
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
58
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
If you’re setting up Linux as a server, RAM requirements increase with the
number of users who may need to log in simultaneously. The same may be
true if you’re running a large number of programs or have memory-intensive
data such as that required by a database. If possible, install enough RAM to
handle some growth in the number of users. Don’t hold back because of the
cost of RAM. While it’s tempting to wait until the price of RAM goes down,

the loss of productivity when you install additional RAM can easily exceed
any money you might save.
The enterprise version of Linux kernel 2.2 can address up to 4GB of RAM with
older Pentium II and equivalent systems. With kernel 2.4, Linux can address up to
64GB of RAM.
The total amount of addressable space for any one program to use is the sum of
available RAM and swap space. In general, Linux utilities are usually small, except
for something like a database service, which can load huge tables into memory and
might possibly use all the available memory while doing so. The same goes for video
productions and high-end graphics applications that create cartoons and mapping
systems to name a few.
Hard Drive Options (IDE, EIDE, and SCSI)
Before your computer can load Linux, the BIOS has to recognize the active primary
partition on the hard drive. This partition should include the Linux boot files. The
BIOS can then set up and initialize that hard drive, and then load Linux boot files
from that active primary partition.
After Linux has loaded, the settings for the disk subsystems can be modified or
dealt with utilities such as fdisk or Disk Druid.
IDE and EIDE
IDE stands for Integrated Drive Electronics. It is built on the IBM PC ISA 16-bit
bus standard, and was itself adopted as the Advanced Technology Attachment (ATA)
standard in 1990. Unfortunately, the first ATA standard hard drives could access
only 504MB of disk space at fairly slow speeds. The Enhanced IDE (EIDE) standard
was created in 1994 for larger hard drives and faster access speeds. Support was also
added for additional hard disks, direct memory access (DMA), and ATA Packet
Interface (ATAPI) devices, such as CD-ROMs and tape drives.
The standard Intel architecture PC is configured to manage up to four IDE drives.
If you need more, the typical procedure is to use SCSI devices.
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM

Color profile: Generic CMYK printer profile
Composite Default screen
Hardware Compatibility
59
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
SCSI
The Small Computer System Interface (SCSI), developed by Apple Computer, allows
your computer to interface to disk drives, CD-ROMs, tape drives, printers, and scanners.
SCSI is faster and more flexible than EIDE, with support for 7, 15, or even 31 devices,
depending on the SCSI bus width. Data transfer speeds for SCSI range from 5 to 160
or 320 megabytes per second. SCSI controllers are not common on most modern-day
desktop PCs, as SCSI drives are usually more expensive. The major PC vendors,
however, will almost always provide SCSI drives and controllers for their high-end
server products, as the larger number of hard drives and faster bus speeds make them
a better choice.
If you want to use SCSI and IDE drives on the same computer, check your BIOS.
Some PC BIOS can be configured to boot an operating system from a SCSI hard
drive. Others may defer to the BIOS associated with a SCSI adapter. If that is not
possible, you may need to install the Linux boot files on an IDE hard drive partition.
Alternatively, you can boot Linux on a SCSI disk from a 1.44MB floppy drive.
CERTIFICATION OBJECTIVE 2.02
Hardware Compatibility
Now it’s time to explore in detail the hardware that Red Hat Linux can handle.
Unfortunately for Linux, hardware manufacturers are still targeting the Microsoft
Windows market. While some manufacturers now include their own Linux hardware
drivers, most Linux hardware support come from third parties. Fortunately, there is
a vast community of Linux users, many of whom produce drivers for Linux and
distribute them freely on the Internet. If a certain piece of hardware is popular, you
can be certain that Linux support for that piece of hardware will pop up somewhere
on the Internet and will be incorporated into various Linux distributions, including

Red Hat Linux.
Be careful when purchasing a new computer to use with Linux. Though Linux has
come a long way the last few years, and you should have little problem installing it
on most modern PCs, you shouldn’t assume Linux will run on any PC, especially if
the PC in question is a laptop or some new, state-of-the-art machine. The latest and
greatest existing technology may not be supported under Linux (not yet, anyway).
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
60
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
The hardware may also be targeted for specific operating systems and configurations.
Laptops are often designed with proprietary configurations that work with Linux only
after some reverse engineering. Other kinds of hardware, such as “winmodems” and
“winprinters,” are designed to use Microsoft Windows driver libraries. Integrated
hardware (e.g., video chips that share system RAM) and parallel port devices can also
be problematic. While there may be ways to make these types of hardware work, the
process of actually making them work may cause more frustration than they’re worth.
Last year’s model is an ideal choice; it is less expensive and more likely to be supported.
When it comes to laptops, your chances are best with brand names.
Linux runs very well on lower-end computers. This is one of Linux’s strong points
over other operating systems, such as Microsoft’s Windows XP. Linux runs fine on
32MB of RAM, although more is always better, especially if you want to run any
graphical applications.
While it is important to know how to select and configure hardware components
to get to a smoothly running Linux computer, the RHCE exam is not a hardware
exam.
Linux Hardware Documentation

You are not left without help or resources when choosing the right hardware for Linux.
You have many places to turn to for help, including mailing lists and newsgroups.
Perhaps the best places to look are the Linux Documentation Project (LDP) or the
Red Hat Hardware Compatibility List. The LDP is a global effort to produce reliable
documentation for all aspects of the Linux operating system, including hardware
compatibility. You can find the Linux Hardware HOWTO at the LDP Web site,
www.tldp.org.
Linux Hardware HOWTO
The Linux Hardware HOWTO is a document listing most of the hardware components
supported by Linux. It’s updated irregularly with added hardware support, so it is a
relatively up-to-date source of information. As of this writing, various LDP HOWTOs
are supplied on the documentation CD-ROM in text format and in various languages,
in the /HOWTOS directory. The official up-to-date list can be found at the LDP
Web site.
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Hardware Compatibility
61
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
The Red Hat Hardware List
The Red Hat Hardware List specifies name brand hardware that has been tested with
Red Hat Linux. If you purchase an official Red Hat Installation, Red Hat will provide
limited installation support for any certified or compatible hardware. Some hardware
that has been tested by Red Hat has specifically been found not to work with Red Hat
Linux and is therefore not supported. Red Hat hasn’t tested all PC hardware; as a
courtesy, they also include a list of hardware that others have tested with Red Hat
Linux, as “Community Knowledge” hardware. These four categories of hardware
are described in Table 2-2.

Like the LDP, the Red Hat Hardware List draws upon the efforts of volunteers.
If you want to check if any of the “latest” hardware (such as USB) will run on your
Linux system, it’s probably best to consult the Red Hat support site first, then maybe
LDP’s Linux Hardware HOWTO. However, if you want the option of being able to
contact Red Hat for support, you should stay within the “supported” list of the Red
Hat Hardware List.
Check the documentation for your hardware. Find a component such as a modem
or a network card. Cross-check this component against the Red Hat and LDP hardware
compatibility lists (HCLs). Find the Red Hat lists by starting at .
Find their HCL in their support area. Find the LDP Hardware HOWTO by starting
at . Find this list in the LDP section on HOWTOs. Compare
the results. While in most cases the results are identical, it’s good to know how to
search through both sources just in case.
As part of this process, find a component listed on one or both of these HCLs as
incompatible with Linux. Do a search on your favorite search engine or the newsgroups
based on the name and model of the product. Don’t forget to include “linux” in your
list of search terms. You might be pleasantly surprised. As of this writing, a searchable
newsgroup database is available at groups.google.com.
Status Description
Certified Approved by Red Hat, Inc., through the Red Hat Hardware
Certification Program.
Compatible Reviewed by Red Hat, Inc., and known to be supported.
Not Supported Reviewed by Red Hat, Inc., and known not to work with Red
Hat Linux.
Community Knowledge Untested by Red Hat, Inc.; others have reported some degree
of compatibility with Red Hat Linux.
TABLE 2-2
Red Hat
Hardware
Compatibility

Categories
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:04 AM
Color profile: Generic CMYK printer profile
Composite Default screen
62
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
CPU and SMP Support
Red Hat Linux for Intel supports computers with Intel and compatible processors.
It is “Itanium-ready,” which means that it will be able to support this 64-bit Intel CPU
when it is finally released.
Linux is commonly used as a server operating system. Many server applications
can take advantage of the flexibility provided by multiple CPUs. This is known as
symmetric multiprocessing (SMP) support. With the release of the 2.4 kernel back
in 2001, Linux now supports computers with up to eight CPUs.
Since the release of Linux kernel 2.4, there have been problems with SMP
support. Older versions of this kernel don’t support SMP with non-Intel
processors. As of this writing, current versions may have problems keeping
threads limited to one CPU. If you’re running Linux on a SMP computer,
keep up to date with the latest kernel developments at www.kernel.org.
Plug and Play
Plug and play (PnP) refers to the capability of an operating system to automatically
allocate IRQ, I/O, and DMA ports or addresses to specific devices such as hard drives,
sound cards, or modems. Linux’s capability to work with plug and play devices is
somewhat limited. For example, if you have the right network modules installed with
the kernel, Linux may be able to automatically detect and install the drivers for a new
network card in a PCMCIA slot. However, if you connect a printer to a standard
printer port, you’ll probably have to use the techniques discussed in Chapter 8 to
install the appropriate print driver.

A plug and play system has three parts: the BIOS, the device, and the operating
system. Unless all three work perfectly, problems can arise with plug and play. The
BIOS has to allow the operating system to find the devices on your computer. Plug
and play devices have to accept port and channel assignments from the operating
system. And a plug and play operating system is constantly searching each connection
for new hardware.
Computer users should not have to tell the computer a plug and play device is there.
The operating system should be able to recognize the device and set it up automatically.
Plug and play has been available for Macintosh computers for quite some time, and
it has been incorporated with varying degrees of success into Microsoft’s Windows
operating systems. Linux is a little behind on this technology, though it is able to
configure most ISA and PCI PnP devices. Red Hat developed the kudzu utility to look
for and configure any hardware changes when you boot Linux.
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Hardware Compatibility
63
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
Plug and Play Support in Linux
The unfortunate truth is that Linux doesn’t handle plug and play as well as we may
want. The main problem lies with plug and play support for devices that run on an
ISA bus. ISA is a legacy technology from older IBM PCs, created without plug and
play in mind, so support for it is very complicated.
The newer, faster bus technology, PCI, is a different story. As Linux loads, device
drivers can easily find PCI devices. This makes plug and play much easier for hardware
that runs on a PCI bus. However, conflicts may still arise with ISA devices. Support
for PnP devices is improving, so the outlook is hopeful. Just keep in mind that you
will probably have more trouble configuring an ISA device than a PCI one. Fortunately,

newer PCs include a minimum of ISA devices.
Plug and Play Conflicts
The Linux plug and play subsystem may have problems with the newest computer
devices, or some very old ones. If you’re having problems with the newest computer
equipment, various Web sites are dedicated to offering help. For example,
www.linmodems.org can help you configure many so-called “winmodems,” and
www.linux-usb.org can help you configure the latest USB equipment on Linux.
Many hardware conflicts with relatively old equipment are fairly simple to
eliminate. There are three possible areas of conflict:

A physical hardware jumper is conflicting with another card.

Your ISA plug and play cards are not properly configured.

You are out of IRQs or other resources to add to your new device.
Physical hardware jumpers on a card need to be set to available IRQ, I/O, and DMA
settings. You can use the /proc files to check the currently used IRQ ports, I/O addresses,
and DMA channels. For example, to check the occupied IRQs, issue the following
command:
# cat /proc/interrupts
CPU0
0: 86311180 XT-PIC timer
1: 25820 XT-PIC keyboard
2: 0 XT-PIC cascade
6: 507 XT-PIC floppy
7: 0 XT-PIC soundblaster
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen

8: 2 XT-PIC rtc
9: 263584 XT-PIC aic7xxx
11: 4065120 XT-PIC eth0
12: 529582 XT-PIC PS/2 Mouse
13: 1 XT-PIC fpu
14: 352260 XT-PIC ide0
NMI: 0
This is a list of devices that are loaded by the kernel. If there is a conflict, the device
is not loaded. You can quickly scan over the left side to see what interrupts are available.
In our example, IRQ 5 is not used. To get a list of used I/O addresses and DMA
channels, issue the following commands:
# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0220-022f : soundblaster
02f8-02ff : serial(auto)
0388-038b : Yamaha OPL3
03c0-03df : vga+
03f0-03f5 : floppy
03f6-03f6 : ide0
03f7-03f7 : floppy DIR
03f8-03ff : serial(auto)

f800-f8be : aic7xxx
fc90-fc97 : ide0
fcc0-fcff : eth0
For DMA resources:
# cat /proc/dma
1: SoundBlaster8
2: floppy
4: cascade
64
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
The kernel included with Red Hat Linux 8.0 and above should keep plug and play
configuration problems to a minimum. When problems arise, two or more devices
are probably trying to use the same IRQ, I/O, and/or DMA. In that case, one or both
devices may not be loaded. It may take a little detective work to find the device; conflicts
may prevent it from being listed in one of the associated /proc directory files. Then
select one of the devices, and change its IRQ, I/O, and/or DMA to a free location.
This is usually a two-step process: first, change the settings on the card itself through
physical jumpers or a diagnostic disk, as described in the next section. If Linux doesn’t
detect your changes, use the appropriate configuration utility, such as mouseconfig,
sndconfig, modprobe, or ifconfig, to change the settings on your device.
Up to version 7.2, Red Hat Linux included an isapnptools package with utilities
such as pnpdump and isapnp to help manually configure devices that did not
work well with plug and play. Linux plug and play has advanced to the point
where these tools are no longer available with the latest versions of Red Hat
Linux. And when problems arise, dedicated configuration tools for a number of

devices, including mice, sound cards, network adapters, and printers, can help.
Generally, Linux should not have problems with PCI plug and play cards. Linux
should recognize them and set them up with appropriate IRQ ports, I/O addresses,
and DMA channels. If you cannot see what your PCI cards are set to, you can type
cat /proc/pci. If a PCI card that you’re concerned about does not show up here, you
may be out of IRQs. If you run out of IRQs, you may want to look into alternatives
such as combo cards, which have two devices on one card, or Universal Serial Bus
(USB) devices.
Manual Configuration
If you have problems with plug and play, you may be able to manually reconfigure
one of the conflicting devices. Older devices include physical jumpers that allow you
to set a specific IRQ port and/or I/O address. Newer cards have no jumpers; instead,
the IRQ port and I/O address are stored in a ROM chip on the card. Many cards
include a driver or diagnostic program on a 1.44MB floppy that allows you to change
these settings. Alas, it is a Microsoft world, and these utilities usually need DOS to
run. If you have a diagnostic disk with DOS files, you’ll need a DOS boot disk or
partition to be able to configure them.
If you don’t have MS-DOS or Windows installed on your Linux computer, you
have some possible alternatives. The DOSEMU project is an effort which can allow
Hardware Compatibility
65
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
you to start a DOS style-command line interface. You can download the associated
RPM from www.dosemu.org. The emulator known as WINE (www.winehq.com)
can run some Windows programs with varying degrees of success. In addition, virtual
machine applications such as VMWare and Win4Lin can also run various versions of

Microsoft Windows.
APM and ACPI
Closely related to plug and play are the latest computer power management standards,
known as Advanced Power Management (APM) and Advanced Configuration and
Power Interface (ACPI). Both are efforts to manage PC power consumption. As such,
they are important tools to extend the lifetime of battery-operated devices such as
laptop computers.
Microsoft has driven developments in both areas toward computers that can be
easily suspended and reactivated from a minimum power state. Linux, frankly, has
been playing catch-up in both areas. Linux now works well with versions 1.0 and
above of the APM standard. On a laptop, this allows you to use the “suspend” button
to store the current state of your system, even a GUI, in hard disk memory. Linux
support for APM is essentially complete; for example, it works fine on my older laptop
computer, which was made in 1998.
As of this writing, Linux support for the ACPI standard is less than complete. If
you have an ACPI system that needs full ACPI functionality, check the ACPI4Linux
home page, which is currently available at phobos.fachschaften.tu-muenchen.de/acpi.
Alternatively, you may be able to adjust a setting in your BIOS from ACPI to APM
and still get the power management functionality that you need.
Advanced Power Management (APM) BIOS
The Advanced Power Management (APM) BIOS primarily monitors and controls
the system battery. It is an optional service commonly used on older laptop computers.
You can also configure it on other computers if you want to implement the BIOS
standby and suspend modes that are available on newer PCs.
The daemon that governs APM is apmd. If the apmd daemon is running on your
system, it sets up status data in the /proc/apm file:
# cat /proc/apm
1.9 1.2 0x07 0x01 0xff 0x80 -1% -1 ?
66
Chapter 2: Planning the Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Unfortunately, this format is not very readable. But the apm command can help:
# apm
AC on-line, battery status high: 100% (2:31)
This command reads the information created by apmd in the /proc/apm file and prints
it in a much easier-to-read format.
The apmd daemon can be configured to do a variety of different things depending
on what BIOS reports back regarding the status of the battery. You can set apmd to
log error messages to syslog when the battery life drops below a certain percentage
level. You can also have it send a system-wide message to all logged-in users when this
warning level is reached. All changes in battery information are logged via syslog. To
set up options for apmd, you will need to edit the /etc/sysconfig/ampd file. Open it
in your favorite text editor and then check for the following lines:
LOGPERCENTCHANGE=10
WARNPERCENT=5
ADDPARAMS="-W"
In this example, apmd is instructed to log changes to the syslog file with every 10
percent of battery loss. If the battery drops below 5 percent, apmd will send an alert
to syslog. Also, all logged-in users will be notified that the system is about to die (-W).
The apm log is broken down into four parts:

Percentage of discharge (percentage/minute). This will be a negative amount
if the battery is charging.

Time since total charge, or time since last login, depending on whether the
battery is fully charged or not.


Estimate of battery time left.

Percentage of battery life left.
When the BIOS tells the apmd daemon about a pending suspend or a standby
call, it immediately calls sync (and writes all cached file system information to disk
immediately). It will then sleep for two seconds and tell the BIOS to continue.
Hardware Compatibility
67
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
68
Chapter 2: Planning the Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 2
EXERCISE 2-1
Checking apmd
In this exercise, if you have a common laptop with Linux installed, you can run the
apm command with and without AC power. You want to observe the differences in
your laptop apm settings in both states, using the apm command. Start with AC power
connected to your laptop and a working battery installed. First check the status of
your laptop with the following command:
$ apm
Now halt Linux. You can do this with the halt command. Turn off your laptop.
Disconnect the power. Restart your computer and boot Linux. (While you could do
this by pulling the plug on a laptop with a working charged battery, this procedure
is not recommended.) Now check the status of your laptop again:
$ apm

Now you can halt Linux again, turn off your laptop, reconnect AC power, and restore
the original configuration.
Serial, Parallel, USB, and IEEE 1394 Ports
You can install many devices externally to your computer. Generally, they fall into
four different categories, depending on their attachment interface. Generally, a device
attached to a serial port, such as a mouse or a modem, uses the device associated with
that port. Devices attached to parallel, USB, or IEEE 1394 ports normally use their
own device files.
In any of these cases, you may need to modify the kernel as discussed in Chapter 6
to enable support for your specific device.
While Linux normally recognizes basic devices attached to serial or USB ports, such
as a mouse during installation, configuring other devices may take additional work.
Serial Ports
In many cases, configuring a device for a serial port is as simple as linking to the driver
of the associated port. For example, if you have an external modem connected to the
D:\omh\CertPrs8\485-1\ch02.vp
Wednesday, September 18, 2002 10:13:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen

×