Hard Drive Options IDE, EIDE, and SCSI Before your computer can load Linux, the BIOS has to recognize the active primarypartition on the hard drive.. If you want to use SCSI and IDE driv
Trang 1Planning the Installation
CERTIFICATION OBJECTIVES
2.01 Basic Hardware Knowledge 2.02 Hardware Compatibility 2.03 Disk Partitions
✓ Two-Minute Drill
Q&A Self Test
Trang 2One 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 thedrive and install Linux from there
However, as you become a Linux expert, people are going to rely on you to installLinux 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 differentLinux 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 allowsfor an extensive variety of hardware Most hardware works well with Linux In manycases, you can make other hardware work with Linux, even if it was originally builtfor 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 aswell as the way that they are connected In other words, the Intel-based architecturedescribes much more than just the CPU It includes a number of specific standardsfor building and connecting other critical hardware components such as the harddrive, 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 workwith Linux Therefore, it’s important to know some basic architecture of an Intel-basedcomputer This will be the last section that addresses the basic RHCE exam prerequisiteslike those covered in Chapter 1
Trang 3Intel Communications Channels
Three basic channels are used to communicate in an Intel architecture PC: interruptrequest (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 servicefrom the CPU An I/O address is a memory storage location for communicationbetween 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 Eachdevice you attach to a computer may need its own IRQ port Normally, each deviceneeds 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 withmultiple 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 “bones” PCs available in many computer stores Even on these 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!)
bare-If you run out of IRQs, you may still be able to install another PCI device SeveralPCI devices can share a single IRQ through the PCI bus, which manages the wayeach PCI device shares your IRQs However, this requires BIOS support for PCIsharing, which you can enable through your computer’s CMOS settings Most PCsmanufactured after 1994 contain PCI buses
USB devices can help you conserve IRQs in the same way The Universal SerialBus (USB) host controller also regulates attached USB devices, including how theyshare 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.
Trang 4Planning the IRQ Layout: Standard IRQs
Now you should see that IRQs are a precious commodity on a PC IRQ conflicts arecommon when you’re connecting a lot of devices If your printer doesn’t work afteryou’ve connected a second network card, it can help to know the standard IRQ forprinters You can then assign a different IRQ to that network card If you don’t haveany free IRQs to assign to that network card, you may be able to sacrifice a componentthat 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 Theseare reserved by the motherboard to control devices such as the hard disk controllerand 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 floppydisk and a printer In Linux, you can check /proc/interrupts to see which interruptsare being used, and which are free for new devices The reserved and typical IRQassignments 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 hexadecimalnotation (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 inthe Microsoft world as COM1, COM2, COM3, and COM4 These ports normallyuse 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, manysound cards include their own processor This allows your PC to set up a DMA channelbetween a hard drive and a sound card to process and play any music files that youmay have stored
Trang 5While DMA channels bypass the CPU, devices that use DMA are still configuredwith IRQ ports There are eight standard DMA channels (0–7); DMA 4 is reservedand cannot be used by any device.
You can find a list of assigned DMA addresses in your /proc/dma file
5 Parallel port 2 or sound card
14 IDE hard disk controller 1
15 IDE hard disk controller 2
TABLE 2-1
Standard IRQ
Assignments
Trang 6If 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 witholder Pentium II and equivalent systems With kernel 2.4, Linux can address up to64GB of RAM
The total amount of addressable space for any one program to use is the sum ofavailable RAM and swap space In general, Linux utilities are usually small, exceptfor something like a database service, which can load huge tables into memory andmight possibly use all the available memory while doing so The same goes for videoproductions and high-end graphics applications that create cartoons and mappingsystems to name a few
Hard Drive Options (IDE, EIDE, and SCSI)
Before your computer can load Linux, the BIOS has to recognize the active primarypartition on the hard drive This partition should include the Linux boot files TheBIOS can then set up and initialize that hard drive, and then load Linux boot filesfrom that active primary partition
After Linux has loaded, the settings for the disk subsystems can be modified ordealt 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-bitbus standard, and was itself adopted as the Advanced Technology Attachment (ATA)standard in 1990 Unfortunately, the first ATA standard hard drives could accessonly 504MB of disk space at fairly slow speeds The Enhanced IDE (EIDE) standardwas created in 1994 for larger hard drives and faster access speeds Support was alsoadded for additional hard disks, direct memory access (DMA), and ATA PacketInterface (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
Trang 7The Small Computer System Interface (SCSI), developed by Apple Computer, allowsyour 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-daydesktop PCs, as SCSI drives are usually more expensive The major PC vendors,however, will almost always provide SCSI drives and controllers for their high-endserver 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 harddrive Others may defer to the BIOS associated with a SCSI adapter If that is notpossible, 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 MicrosoftWindows market While some manufacturers now include their own Linux hardwaredrivers, most Linux hardware support come from third parties Fortunately, there is
a vast community of Linux users, many of whom produce drivers for Linux anddistribute them freely on the Internet If a certain piece of hardware is popular, youcan 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, includingRed Hat Linux
Be careful when purchasing a new computer to use with Linux Though Linux hascome 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 andgreatest existing technology may not be supported under Linux (not yet, anyway)
Trang 8The hardware may also be targeted for specific operating systems and configurations.Laptops are often designed with proprietary configurations that work with Linux onlyafter some reverse engineering Other kinds of hardware, such as “winmodems” and
“winprinters,” are designed to use Microsoft Windows driver libraries Integratedhardware (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, theprocess 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 pointsover other operating systems, such as Microsoft’s Windows XP Linux runs fine on32MB of RAM, although more is always better, especially if you want to run anygraphical 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 theRed Hat Hardware Compatibility List The LDP is a global effort to produce reliabledocumentation for all aspects of the Linux operating system, including hardwarecompatibility 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 componentssupported by Linux It’s updated irregularly with added hardware support, so it is arelatively up-to-date source of information As of this writing, various LDP HOWTOsare 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 LDPWeb site
Trang 9The Red Hat Hardware List
The Red Hat Hardware List specifies name brand hardware that has been tested withRed Hat Linux If you purchase an official Red Hat Installation, Red Hat will providelimited installation support for any certified or compatible hardware Some hardwarethat has been tested by Red Hat has specifically been found not to work with Red HatLinux and is therefore not supported Red Hat hasn’t tested all PC hardware; as acourtesy, they also include a list of hardware that others have tested with Red HatLinux, as “Community Knowledge” hardware These four categories of hardwareare 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 yourLinux system, it’s probably best to consult the Red Hat support site first, then maybeLDP’s Linux Hardware HOWTO However, if you want the option of being able tocontact Red Hat for support, you should stay within the “supported” list of the RedHat 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 hardwarecompatibility lists (HCLs) Find the Red Hat lists by starting at http://www.redhat.com.Find their HCL in their support area Find the LDP Hardware HOWTO by starting
at http://www.tldp.org Find this list in the LDP section on HOWTOs Comparethe results While in most cases the results are identical, it’s good to know how tosearch through both sources just in case
As part of this process, find a component listed on one or both of these HCLs asincompatible with Linux Do a search on your favorite search engine or the newsgroupsbased on the name and model of the product Don’t forget to include “linux” in yourlist of search terms You might be pleasantly surprised As of this writing, a searchablenewsgroup database is available at groups.google.com
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.
Trang 10CPU 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 CPUwhen it is finally released
Linux is commonly used as a server operating system Many server applicationscan take advantage of the flexibility provided by multiple CPUs This is known assymmetric 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 issomewhat limited For example, if you have the right network modules installed withthe kernel, Linux may be able to automatically detect and install the drivers for a newnetwork card in a PCMCIA slot However, if you connect a printer to a standardprinter port, you’ll probably have to use the techniques discussed in Chapter 8 toinstall the appropriate print driver
A plug and play system has three parts: the BIOS, the device, and the operatingsystem Unless all three work perfectly, problems can arise with plug and play TheBIOS has to allow the operating system to find the devices on your computer Plugand play devices have to accept port and channel assignments from the operatingsystem And a plug and play operating system is constantly searching each connectionfor 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 Windowsoperating systems Linux is a little behind on this technology, though it is able toconfigure most ISA and PCI PnP devices Red Hat developed the kudzu utility to lookfor and configure any hardware changes when you boot Linux
Trang 11Plug and Play Support in Linux
The unfortunate truth is that Linux doesn’t handle plug and play as well as we maywant The main problem lies with plug and play support for devices that run on anISA bus ISA is a legacy technology from older IBM PCs, created without plug andplay in mind, so support for it is very complicated
The newer, faster bus technology, PCI, is a different story As Linux loads, devicedrivers can easily find PCI devices This makes plug and play much easier for hardwarethat runs on a PCI bus However, conflicts may still arise with ISA devices Supportfor PnP devices is improving, so the outlook is hopeful Just keep in mind that youwill 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 computerdevices, or some very old ones If you’re having problems with the newest computerequipment, various Web sites are dedicated to offering help For example,www.linmodems.org can help you configure many so-called “winmodems,” andwww.linux-usb.org can help you configure the latest USB equipment on Linux
Many hardware conflicts with relatively old equipment are fairly simple toeliminate 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 DMAsettings 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 followingcommand:
# 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
Trang 128: 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 DMAchannels, 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
Trang 13The kernel included with Red Hat Linux 8.0 and above should keep plug and playconfiguration problems to a minimum When problems arise, two or more devicesare probably trying to use the same IRQ, I/O, and/or DMA In that case, one or bothdevices may not be loaded It may take a little detective work to find the device; conflictsmay prevent it from being listed in one of the associated /proc directory files Thenselect 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 throughphysical jumpers or a diagnostic disk, as described in the next section If Linux doesn’tdetect 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 Linuxshould 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 alternativessuch as combo cards, which have two devices on one card, or Universal Serial Bus(USB) devices
If you don’t have MS-DOS or Windows installed on your Linux computer, youhave some possible alternatives The DOSEMU project is an effort which can allow
Trang 14you to start a DOS style-command line interface You can download the associatedRPM from www.dosemu.org The emulator known as WINE (www.winehq.com)can run some Windows programs with varying degrees of success In addition, virtualmachine applications such as VMWare and Win4Lin can also run various versions ofMicrosoft 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 andPower 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 aslaptop computers
Microsoft has driven developments in both areas toward computers that can beeasily suspended and reactivated from a minimum power state Linux, frankly, hasbeen playing catch-up in both areas Linux now works well with versions 1.0 andabove 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 Linuxsupport for APM is essentially complete; for example, it works fine on my older laptopcomputer, which was made in 1998
As of this writing, Linux support for the ACPI standard is less than complete Ifyou have an ACPI system that needs full ACPI functionality, check the ACPI4Linuxhome 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 APMand still get the power management functionality that you need
Advanced Power Management (APM) BIOS
The Advanced Power Management (APM) BIOS primarily monitors and controlsthe 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 BIOSstandby and suspend modes that are available on newer PCs
The daemon that governs APM is apmd If the apmd daemon is running on yoursystem, it sets up status data in the /proc/apm file:
# cat /proc/apm 1.9 1.2 0x07 0x01 0xff 0x80 -1% -1 ?
Trang 15Unfortunately, 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 tolog error messages to syslog when the battery life drops below a certain percentagelevel You can also have it send a system-wide message to all logged-in users when thiswarning level is reached All changes in battery information are logged via syslog Toset 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 10percent 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 thebattery 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 standbycall, it immediately calls sync (and writes all cached file system information to diskimmediately) It will then sleep for two seconds and tell the BIOS to continue
Trang 16EXERCISE 2-1
Checking apmd
In this exercise, if you have a common laptop with Linux installed, you can run theapm command with and without AC power You want to observe the differences inyour laptop apm settings in both states, using the apm command Start with AC powerconnected to your laptop and a working battery installed First check the status ofyour 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 dothis 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 restorethe original configuration
Serial, Parallel, USB, and IEEE 1394 Ports
You can install many devices externally to your computer Generally, they fall intofour different categories, depending on their attachment interface Generally, a deviceattached to a serial port, such as a mouse or a modem, uses the device associated withthat port Devices attached to parallel, USB, or IEEE 1394 ports normally use theirown 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
Trang 17only serial port on your computer, the Linux plug and play subsystem may have already
linked the device for that port with the device for your modem Run the ls -l
/dev/modem command If it shows something like the following output, you know
that Linux has already linked your modem driver with the second serial port:
lrwxrwxrwx 1 root root 10 Apr 4 11:28 /dev/modem -> /dev/ttyS1
Otherwise, you can use the ln command to create a link to the appropriate port.
If you have a serial mouse, you should find the same type of link from /dev/mouse
Parallel Ports
Configuring devices attached to a parallel port can be more complex For example,Linux doesn’t normally recognize plug and play printers when attached to a parallelport Further configuration is required with tools such as CUPS or printconf-gui
If you’re connecting an external hard drive to a parallel port, you’ll want to installthe paride module and the module associated with your device, whether it is a harddrive, a tape drive, or a CD-ROM Similar steps are required for other parallel portdevices Detailed information on configuring parallel port devices is available fromthe Linux Parallel Port Web site at www.torque.net/linux-pp.html
USB
Linux support for USB is growing with the evolution of the latest kernels While thelatest versions of Red Hat Linux supports USB hot-swapping, support for the higher-speed USB 2.0 standard is still in development, as are Linux drivers for many USBdevices For the latest information, see the Linux USB Web site at www.linux-usb.org.You may be able to download your driver and install it using the techniques discussed
in Chapter 5
IEEE 1394
The Institute of Electrical and Electronics Engineers (IEEE) has developed the IEEE
1394 specifications for very high speed data transfer applications, such as digital movies.Equipment designed to these standards is often known by its trade names: FireWireand iLink The current status is similar to USB; in other words, some IEEE 1394equipment works with Linux, and development continues For the latest information,see the Linux IEEE 1394 Web site at linux1394.sourceforge.net/hcl.php
Trang 18PC Card (PCMCIA)
Linux has one package called “Card Services” that deals exclusively with PC cards
This package includes all the kernel modules you’ll need to manage PCMCIA cardsand a set of drivers for specific cards The package also includes a daemon that handleshot-swapping for most PC cards
While development of the Card Services package is ongoing, there is often a periodwhere there is no support for the proprietary configurations especially common onlaptops For this reason, the latest laptop is often not a good choice for a Linuxinstallation However, support for Linux on most name brand laptops is now commoneven when the laptop is first released In fact, several companies can configure namebrand laptops with some Linux distribution
Supported PCMCIA Controllers
Linux now supports almost all current PCMCIA controllers If you have a problemwith a specific PCMCIA card, focus on finding a driver for the card itself A currentlist of supported PCMCIA controllers can be found on the Hardware HOWTO
Supported Cards
The Card Services package comes bundled with a file named SUPPORTED.CARDS.Also, you can check the PCMCIA HOWTO or the Red Hat Hardware CompatibilityList for supported cards Alternatively, the Linux PCMCIA Information Page at http://
pcmcia-cs.sourceforge.net may also help
During your career as a computer professional, there will be times you’ll be asked to research a specific product or technology To get an idea of how hard
or easy this can be, call a major computer retailer or manufacturer and inquire about their latest laptop Ask them if it supports Linux What kind of answer
do you get? Ask them if they have any earlier models that will Do you believe the answers you receive are reliable? Check out the company’s Web page, if you can, and find out if they provide any information about the product on the Internet Doing this kind of research can be very trying, with or without success Before deciding what kind of hardware you want to install Linux on, you should have a good understanding of what will and will not work Start early and build
a good base of reliable references you can use to find out new computer information Web sites, such as the Linux Documentation Project, as well as magazines like Sys Admin Magazine, Linux Magazine, and Linux Journal, will help you stay informed.
Trang 19Preinstallation Preparation
Installing Linux on most Intel-based computers is pretty straightforward In manycases, most installation proceeds without problems But if you have a problem, you’llsave yourself a lot of time and frustration by knowing exactly what hardware you have.You should be familiar with the following components of your system:
■ Drives Check to see if you are using SCSI or IDE drives You should know
the manufacturer, model number, and capacity of the drive In addition, if it’s
a SCSI drive, make sure you know its SCSI ID number
■ Hard drive controller Know the manufacturer and model number of thedrive controller If this data is hard to find, at least try to find the chipset ofthe controller If it’s an IDE controller, the documentation is associated withthe computer motherboard If it’s a SCSI controller, see the documentationassociated with that controller
■ CD-ROM For most standard SCSI or IDE CD-ROMs, the standard drivers
should work without problems However, if you are using a CD-ROM with
a proprietary interface (common with older models), you should know themanufacturer, as well as the model number of the drive and controller card.These CD-ROMs are often not plug and play and may require a specific IRQport and I/O address
■ Mouse You should know the type of mouse that you have—such as PS/2,serial, or USB If your mouse uses a serial port, it helps if you know which port.For example, if you’re converting a computer that’s running Microsoft Windows,
a serial mouse is associated with a serial port, typically COM1, COM2, COM3,
or COM4 The corresponding Linux device files are /dev/ttyS0, /dev/ttyS1,/dev/ttyS2, and /dev/ttyS3 And the number of buttons on a mouse may not
be obvious; if you have a two-button mouse with a scrolling wheel that youcan click, you actually have a three-button mouse
■ Graphics card If you will be running the Linux graphical user interface (GUI),
also known as X or X11, you will need the manufacturer, the model number,the chipset, and the amount of video memory If it’s a fairly common graphicscard and you can’t find the chipset or memory, you should be able to select
a generic or older version of the card from the X installation database
Trang 20■ Sound, video, and game adapters If you want to set up sound on your system,
you should know the manufacturer and model number of the sound card Ifplug and play doesn’t work for your sound card, you’ll also need the defaultIRQ port, I/O address, and DMA channel(s) Especially on laptops, thisinformation may be stored in your BIOS
■ Network adapters If you are going to network your Linux system, you should
know the manufacturer and model number of the network adapter If plugand play doesn’t work for your network adapter, you should find its defaultIRQ port and I/O address Plug and play frequently doesn’t work for thesecond installed network adapter
■ Monitor If you will be running X, you will need the manufacturer, modelnumber, available resolutions, and refresh frequencies of the monitor
Be especially careful with older monitors or laptop displays Exceeding the frequency refresh capabilities of such monitors could easily overload the display system Replacing a laptop display is not a pleasant exercise!
Not all hardware will work with Linux After you’ve collected information aboutyour system, you should consult the Red Hat Hardware Compatibility List (HCL)
or LDP Hardware HOWTO to determine if your components are compatible withthe current version of Red Hat Linux
CERTIFICATION OBJECTIVE 2.03
Disk Partitions
A disk drive requires a partition table The partition is a logical sequence of cylinders
on the disk, while a cylinder represents all the sectors that can be read by all heads with
one movement of the arm that contains all these heads You can create up to 15 or 16partitions on a SCSI, and an IDE hard drive, respectively
Normally, you should create several partitions when preparing your hard drive toinstall Linux This is a good idea for various reasons First, Red Hat Linux is normallyconfigured with at least two filesystems: a Linux native filesystem, and a Linux swapfilesystem Second, if you want to install Red Hat Linux and another operating system
on the same computer, you will have to configure separate partitions for each operatingsystem
Trang 21Naming Conventions
Linux has a simple naming standard for disk partitions: three letters followed by anumber The first letter identifies the type of drive (h is for IDE/EIDE, s is for SCSI).The second letter is d for disk, and the third letter represents the relative position ofthat disk, starting with “a.” In other words, the first IDE drive is hda, followed byhdb, hdc, and hdd
The number that follows is based on the relative position of the partition Thereare primary, extended, and logical partitions Primary partitions can contain the bootfiles for an operating system IDE drives can also be configured with one extendedpartition, which can then contain up to 12 logical partitions
You are limited to four primary partitions on each hard disk But four partitionsare often not enough If you need more partitions on an IDE drive, substitute anextended partition for one primary partition You can then configure logical partitionswithin that extended partition IDE disks can have up to 16 total partitions (3 primaryand 1 extended, containing up to 12 logical partitions), whereas SCSI disks are limited
to 15 partitions Unfortunately, the partition numbering system is not straightforward
If, for instance, you have one IDE disk and you create a single primary partition, itwill be device hda1 If you then create an extended partition, it will be hda2 If youhave two primary and one extended partition, the primary partitions will be namedhda1 and hda2 The extended partition will be hda3
You can’t install files directly in an extended partition You must first allocate someextended partition space to at least one logical partition In all cases, the first logicalpartition on the first IDE drive is hda5 You can create logical partitions with namesbetween hda5 and hda16 on the first IDE drive, or sda5 and sda15 on a SCSI drive
In this configuration, if you then created another primary partition from some freespace, the IDE drive would renumber the partitions in your BIOS The numberswouldn’t match the Linux names such as hda2 The boot process would fail
Each partition is associated with a Linux device file At least this is straightforward;for example, the device filename associated with the first logical partition on the firstIDE drive is /dev/hda5
You should know the device name associated with each partition, as well as the starting names and numbers of any logical partitions created on any basic disk drive Also remember that logical partitions on an IDE hard drive always start with number 5; on the first IDE hard drive on a PC, that is hda5.