Certification Objective 2.03-Hotswap Buses


After a lot of work over the years, Linux handles hotswappable devices well. If everything works as it should, you can plug a device into a hotswap system, and Linux automatically detects the device, loads drivers, and, if appropriate, mounts the data from that device on an appropriate filesystem. There are several commands available to help manage these devices.

You can install many devices externally to your computer. These devices are sometimes known as peripherals, which fall into six categories: serial, parallel, USB, IEEE 1394, smart cards, and PC Cards. 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, smart cards, USB, or IEEE 1394 ports normally use their own device files. PC Cards are a special case normally associated with laptop computers.

While Linux normally recognizes basic devices attached to these ports, configuring a few 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 only serial port on your computer, the Linux HAL 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 1 13:17 /dev/modem -> ttyS1 

Otherwise, you can use the ln command to create a link to the appropriate port. If you have a CD/DVD drive, you should find the same type of link from /dev/cdrom.

Parallel Ports

Configuring devices attached to a parallel port can be more complex. For example, Linux doesn't always recognize printers that are attached to a parallel port such as /dev/lp0. Further configuration with tools such as the CUPS Web-based tool or the Red Hat Printer Configuration tool may be required. If there's a local printer you can find the device associated with it in the /etc/cups/printers.conf file.

If you're connecting an external hard drive to a parallel port, you'll want to install the paride module and the module associated with your device, whether it is a hard drive, a tape drive, or a CD-ROM. Similar steps are required for other parallel port devices. Detailed information on configuring parallel port devices is available from the 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, including most devices associated with the higher speed USB 2.0 standard. For the latest information, see the Linux USB Web site at www.linux-usb.org.

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 the trade names FireWire and iLink. The current status is similar to USB; in other words, a lot of IEEE 1394 equipment works with Linux, and development continues. For the latest information, see the Linux IEEE 1394 Web site at www.linux1394.org.

PC Card (PCMCIA)

Linux has a package known as Card Services that deals exclusively with PC Cards. This package includes all the kernel modules you'll need to manage PCMCIA cards and a set of drivers for specific cards. The package also includes a daemon that handles hotswapping for most PC Cards.

While development of the Card Services package is ongoing, there is often a period in which there is limited support for the proprietary configurations especially common on laptops. For this reason, the latest laptop is often not the best choice for a Linux installation. However, support for Linux on most name-brand laptops is now common even when the laptop is first released. In fact, several companies sell laptops with Linux installed.

Development of PC Cards continues to evolve with the Express Card, which is not backward-compatible with the CardBus PCMCIA card. It's narrower; and one version of the Express Card is shaped with a notch.

Supported PCMCIA Controllers

According to the Linux PCMCIA Information page at http://pcmcia-cs.sourceforge.net, Linux now supports all common PCMCIA controllers. If you have a problem with a specific PCMCIA card, focus on finding a driver for the card itself. A current list of supported PCMCIA controllers can be found on the Hardware HOWTO.

Express Cards

The Express Card is physically different. The current version supports two form factors. In other words, there are Express Cards designed for 34mm- and 54mm-width cards. Older CardBus cards won't work in these slots. (Imagine my surprise when I tried installing a CardBus modem in a newer laptop. If I pushed too hard, I would have had to call for a hardware repair on my laptop.)

Express Cards are smaller and are shipping with laptops from several of the major manufacturers.

On the Job 

During your career as a computer professional, there will be times where 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 answers do you get? Ask whether they have any earlier models that will support Linux. 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 trying, with or without success. Before deciding on what kind of hardware you want to install Linux, 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 such as Linux Journal, Linux Format (UK), Sys Admin Magazine, and Linux Magazine, will help you stay informed.

Hotswap Systems

To summarize what we know, there are several different types of hotswap systems, including:

  • USB

  • IEEE 1394 (a.k.a. FireWire, iLink)

  • PC Cards (PCMCIA, CardBus, Express Card)

Device Management

There are a number of useful commands that can help you manage hardware devices. The first of these commands is associated with Linux's implementation of the Hardware Abstraction Layer, lshal. The output is long, and can tell you a lot about each device. Here's a partial excerpt associated with my CD/DVD drive:

 udi = '/org/freedesktop/Hal/devices/storage_model_QSI_CD_RW/DVD_ROM_SBW_241'   org.freedesktop.Hal.Device.Storage.method_execpaths = {'hal-storage-eject', 'hal-storage-closetray'} (string list) 

Note how the functions are included in the list:

   org.freedesktop.Hal.Device.Storage.method_names = {'Eject', 'CloseTray'} (string list)   info.interfaces = {'org.freedesktop.Hal.Device.Storage', 'org.freedesktop.Hal.Device.Storage'} (string list)   info.addons = {'hald-addon-storage'} (string list)   block.storage_device = '/org/freedesktop/Hal/devices/storage_model_QSI_CD_RW/DVD_ROM_SBW_241'  (string) 

The lsmod command lists loaded hardware modules. For more information, see Chapter 8. The lspci command can tell you more about components attached to the PCI bus. For example, the following output from my laptop tells me more about the wireless card, which is enough for me to find third-party drivers:

 # lspci 00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M]   (rev 02) 00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M] 00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03) 00:06.0 Multimedia audio controller: ALi Corporation M5451   PCI AC-Link Controller Audio Device (rev 02) 00:07.0 ISA bridge: ALi Corporation M1533/M1535 PCI to ISA Bridge   [Aladdin IV/V/V+] 00:08.0 Modem: ALi Corporation M5457 AC'97 Modem Controller 00:09.0 Network controller: Intel Corporation PRO/Wireless 2200BG   Network Connection (rev 05) 

Note the last line, which displays more information about my internal wireless card. I can get even more information about all of these components by using the lspci -v (or even the lspci -vv) command. It's more than enough information for me to find Linux drivers, and even packages that allow me to use this wireless card on RHEL 5. For USB devices, the lsusb command can help. If you haven't attached anything to a USB port, all you'll see are USB buses:

 # lsusb Bus 001 Device 001: ID 0000:0000 

Once Linux detects a connected USB device, you'll get more information; for example, this is what I see after I insert a USB key drive:

 # lsusb Bus 001 Device 002: ID 04e8:1623 Samsung Electronics Co., Ltd Bus 001 Device 001: ID 0000:0000 

The lspcmcia command is supposed to be the successor to cardctl for PC Cards.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

Similar book on Amazon
Linux Quick Fix Notebook
Linux Quick Fix Notebook
Self-Service Linux: Mastering the Art of Problem Determination
Self-Service Linux: Mastering the Art of Problem Determination
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition (Certification Press)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)
Security Strategies in Linux Platforms and Applications (Information Systems Security & Assurance)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net