Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 30 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
30
Dung lượng
679,11 KB
Nội dung
unless you are configuring a kernel for a kiosk system or cash register and need touch screen support. Finally, in the Misc subsection, you can configure support for a basic sound driver for the (awful-sounding) PC speaker. You can safely disable the User level driver support unless you have a user space pro- gram that needs to interact with the input subsystem. Character Devices Use the Character devices section to configure your kernel’s support for your system’s character devices, which includes serial ports, printers, tape drives, special-purpose chips and devices such as watchdog cards and clock chips, and a broad but shallow selection of frame buffer cards. You can also configure such devices that are provided by PCMCIA cards. The array of supported devices is mind-numbingly long. If you have a special serial card, such as a multiport serial device, enable Non-standard serial port support and then select your device from the long list of support hardware and configure it appropriately. If you need to use a serial port for Internet access (say, via a PPP dial-up con- nection) or you want to use your modem to send and receive facsimiles, make sure you enable 8250/16550 and compatible serial support. It isn’t necessary to enable the Console on 8250/16550 and compatible serial support option unless you will be interacting with this system via serial connection (using minicom, Seyon, Kermit, or a similar terminal communications program). In the Extended 8250/16550 serial driver options subsection, you might want to enable two options: Support for sharing serial interrupts and Autodetect IRQ on standard ports. The latter option is qualified as unsafe, but it is very rare these days for IRQ autodetection to hang a machine. Of course, if you experience this problem, disable this option. The default value (disabled) for Legacy (BSD) PTY support should be suffi- cient. If you intend to use a printer attached to this system, enable Parallel printer support. Support for special-purpose devices, such as the enhanced real-time clock or the hardware random number generator, is optional. Read the help text if you want to experiment with these features. I2C Support The primary reason to enable I2C (pronounced “eye-square-see”) support is to use system and motherboard hardware sensors (lm_sensors) and Video4Linux devices (discussed in the next section, “Multimedia Devices”). Hardware sen- sors use a subset of the I2C protocol known as SMBus, or System Management Bus. To activate your hardware sensors, you need to enable I2C support and 654 Chapter 27 35_599496 ch27.qxd 8/30/05 7:35 PM Page 654 then select the specific hardware sensors your system has under the Hardware Sensors Chip support submenu. For more information about configuring hardware sensors, see Chapter 32. Multimedia Devices The Multimedia devices section contains the kernel configuration items for Video For Linux, colloquially referred to as video4linux or v4l. Video4Linux comprises support for audio and video capture cards, digital video cameras (Web cams), and radio tuner cards. For more information about Video4Linux, see the project Web site at http://linux.bytesec.org/v4l2. You will also find configuration options for Digital Video Broadcasting (DVB) devices, which generally refers to any digital television broadcast or reception add-in card or peripheral. Strictly speaking, the DBV abbreviation refers to the DVB standard that defines the encoding characteristics of broadcast digital video streams. For more information about DVB, see the Linux TV Web site at linuxtv.org. If you intend to use a Web cam, frame grabber, or radio tuner on your Fedora Core or RHEL system, enable the Video For Linux option and then select your adapter or device from the Video Adapters submenu or, for radio tuners, the Radio Adapters submenu. For DVB support, you must enable the top-level DVB For Linux option, DVB Core Support, and then select your adapter or device from one of the DVB submenus. Graphics Support xconfig’s Graphics support section permits you to configure support for cer- tain motherboard and graphics chipsets and various kernel features related to graphics output, such as frame buffer support, the all-important boot logo, and limited support for LCD displays. Frame buffers enable the kernel to pro- vide a generalized interface to a range of graphics hardware, allowing appli- cation software to manipulate the display without needing to know anything about the particular graphics device in use. One of the benefits of Linux frame buffer support is that it provides that trés chic Linux boot logo displayed on the screen in console (text) mode. More importantly, Linux’s frame buffer sup- port makes it possible to use the X Window system with graphics hardware that lacks X-specific drivers. In fact, on some non-X86 architectures, the frame buffer device is the only way to use the graphics hardware. If you wish to use the frame buffer, enable the Support for frame buffer devices option and then select the specific graphics card you have. For exam- ple, if you have a Cirrus Logic-based graphics adapter, enable the Cirrus Logic support option. If your particular graphics adapter is not supported, enable VGA 16-color graphics support and the VESA VGA graphics support options. Upgrading and Customizing the Kernel 655 35_599496 ch27.qxd 8/30/05 7:35 PM Page 655 TIP If you have a Matrox-based graphics adapter, be sure to select the Enable Tile Blitting Support option because the Matrox frame buffer driver, known as matroxfb, relies heavily on tile blitting for fast graphics performance. For more attractive text mode displays, enable the VGA text console option and also enable Framebuffer Console support. Under this latter item, check Select compiled-in fonts and enable VGA 8x16 font to get clearer fonts when you work in text mode. Finally, for that boot logo, select Logo configuration ➪ Bootup logo ➪ Standard 224-color Linux logo. Sound Use the Sound section to configure support for your sound card, if any. Because the kernel now supports an amazingly wide array of sound cards, it simply is not possible to describe each option in this space. Locate the device or chipset for which you need support, enable it, and be sure to read and understand the help text and any supporting documentation to ensure that you can take full advantage of your sound card. If the list of drivers and cards under Advanced Linux Sound Architecture (ALSA) does not include a driver for your particular card, you might be able to use one of the Open Sound Sys- tem (OSS) modules to run your sound card. If you need to use an OSS driver, be sure disable the ALSA drivers or the OSS driver won’t work. USB Support If you need support for Universal Serial Bus (USB), which almost anyone using a current X86-based PC does need, expand the USB support section and try not to despair when you see the list of features and options. To organize the discussion, each of the major configuration sections is covered separately, so you can go straight to the section that interests you. Support for Host-Side USB To use your USB devices, you need to enable the Support for Host-side USB option. A USB host refers to the host controller, which you can picture as the root of an inverted tree of USB devices. It is the USB host, or rather, the USB host port, that provides power to all attached devices. Continuing the tree analogy, if the USB host (or host port) is the root of the USB tree, attached USB devices, such as scanners or printers, are the end points, nodes, or leaves of the tree. Between the host and individual USB peripherals are special USB devices known as hubs, which might represent branches or branch points on the USB tree. In addition to enabling your host USB port, you must select one the host controller drivers, described in the next section. You should also enable the 656 Chapter 27 35_599496 ch27.qxd 8/30/05 7:35 PM Page 656 USB device file system option so that you can view the USB device tree in /proc/bus/usb/xxx/yyy (where xxx is the bus number and yyy the device ID). USB Host Controller Drivers Host controller drivers (abbreviated HCD) fall into three classes, OHCI or UHCI for USB version 1.1 and EHCI for USB 2.0. OHCI stands for Open Host Controller Interface. This class of host controllers is more widely used on non- X86 systems. UHCI stands for Universal Host Controller Interface. UHCI is almost universally (no pun intended) used on chipsets made by Intel and VIA; most people will enable UHCI HCD (most Intel and VIA) support. The third option, EHCI, stands for Enhanced Host Controller Interface. Whereas OHCI and UHCI support USB version 1.1, EHCI supports version 2.0. However, for backward compatibility, EHCI usually includes either OHCI or UHCI support. So, if you select ECHI, you might also need to select OHCI or UHCI to support USB devices that do not speak the version 1.1 protocol. NOTE xconfig’s USB Device Class Drivers item is simply a heading under which the various classes of USB device drivers are arranged. It is not configurable. USB Audio Support If you want to connect USB audio devices to your system and you are not using the ALSA sound subsystem, enable USB Audio Support. ALSA provides its own USB audio driver, so you can disable this option if you use ALSA sound. If you have USB-attached MIDI devices, modems, or printers, enable the cor- responding configuration options, USB MIDI support, USB Modem (CDC ACM) support, or USB Printer support, respectively. USB Mass Storage Support Enable USB Mass Storage support and select the appropriate device driver support if you want to use USB-connected devices such as CompactFlash or smart card readers. For CompactFlash, you will also need IDE support, as remarked on earlier in the chapter. A potential “gotcha” in this section is that USB mass storage devices usually require SCSI disk support, so you might need to go back to the SCSI configuration section and enable SCSI device sup- port ➪ SCSI disk support. One of the nice features of mass storage support is that it plays nicely with the udev system: plug in a supported device and udev will detect the hotplug event and automatically create the appropriate device node and file system entries so that you can access the storage. Upgrading and Customizing the Kernel 657 35_599496 ch27.qxd 8/30/05 7:35 PM Page 657 You should to be aware of one subtlety with USB mass storage support. When you enable mass storage support and select the corresponding device, support for that device is compiled into the mass storage module. For instance, if you want to support your Zio! compact flash reader, you would enable USB Mass Storage support and enable Microtech/ZiO! CompactFlash/SmartMedia support. The resulting module, usb-storage, would contain general mass storage support code and code to support the Zio! reader. This is a departure from normal practice, in which feature support and support for a specific device are provided by separate modules. In terms of the example, normal practice might manifest in general mass storage support residing in the usb-storage module and Zio!-specific support being provided by a module named, say, zio. USB Human Interface Devices The USB protocol has complete support for a broad range of so-called human interface devices (HID), which refers to any device you can use to provide input, including mice, keyboards, graphics tablets, and joysticks. If you want to be able to interact with your computer using any tools in this class of USB devices, enable USB Human Interface Device (full HID) support and then select HID Input layer support plus a driver for your particular device. Notice, though, that USB HID and USB HIDBP (HID boot protocol) drivers don’t play nicely together. If you intend to use (or must use) HIDBP support (USB HID Boot Protocol drivers) for your keyboard or mouse, you cannot also use the full HID driver. As a rule, you should opt for full HID support and omit the HIDBP drivers. Naturally, if your mouse or keyboard uses the PS/2 protocol, you don’t need USB HID or USB HIPBP support. USB Imaging Devices At the moment, support for USB imaging devices is fairly limited in the kernel itself. You can enable only a single digital camera (the Mustek MC800) and a couple of scanners, the Microtek X6USB and the HP53xx series of scanners. However, the Scanner Access Now Easy (SANE) project provides a much deeper level of support for all manner of scanners, including USB-attached scanners, using the USB file system (usbfs), described shortly in the “File Sys- tems” section. USB Multimedia Devices USB multimedia devices include a variety of Web cameras and the D-Link RM radio. If you need support for one of the listed devices, enable the appropriate driver. 658 Chapter 27 35_599496 ch27.qxd 8/30/05 7:35 PM Page 658 USB Network Adapters USB network adapters are becoming increasingly common and popular. Accordingly, the kernel’s support for these adapters continues to grow. If you have one of the USB-based adapters listed under USB Network Adapters, enable support for it. USB Serial Converter Support USB is a high-speed serial port protocol. Thus, it should be no surprise that xconfig’s USB Serial Converter support section includes several dozen options. In most cases, to support any given device, you must enable the dri- ver for that particular device and the USB Generic Serial Driver option at the top of the list. For example, if you have a Palm PDA, you would enable the fol- lowing options: ■■ USB Serial Converter Support ■■ USB Generic Serial Driver ■■ USB Handspring Visor/Palm m50x/Sony Clie Driver USB Miscellaneous Drivers The miscellaneous drivers category is aptly named because it lists USB- attached odds and ends that neither fit anywhere else nor (yet) have their own configuration subsections. Enable support for the device or devices you have and intend to use. USB Gadget Drivers Although 99.999 percent of you won’t need this option, it bears mentioning because it shows how ubiquitous Linux has become. So far, all USB devices discussed have been attached to a system running Linux. The USB Gadget Drivers section is for USB devices that are themselves running Linux. Such devices, known as USB gadgets, might or might not be connected to a host sys- tem running Linux. When the gadget is connected to a Linux system, it func- tions as a peripheral and communication is via a USB peripheral controller, which is not the same as USB host controller. The canonical example of a USB gadget device is a PDA that runs Linux (such as the Sharp Zaurus). In some cases, the USB gadget needs a controller to communicate with the host system. If you have such a gadget, enable the appropriate controller in the USB Periph- eral Controller section. Of course, you might also need to enable the appropri- ate gadget. Upgrading and Customizing the Kernel 659 35_599496 ch27.qxd 8/30/05 7:35 PM Page 659 MMC/SD Card Support MMC is the bus protocol for so-called multimedia cards. If you have an MMC or SD card (rather, MMC or SD card reader), enable the MMC support option and then select the driver for the MMC interface you need to support. Unless you are working on the kernel’s MMC support, though, disable the MMC debugging option. InfiniBand Support If you need InfiniBand support, enable it in this section. InfiniBand is another entry into the already crowded field of marketing buzzwords for various high- speed bus and data interconnect protocols. Here’s the definition from the InfiniBand trade association: InfiniBand is an interconnect or I/O architecture that connects servers with remote storage and networking devices, and other servers. It can also be used inside servers for inter-processor communication. InfiniBand is a channel-based, switched fabric, point-to-point interconnect, which provides scalability and performance for a wide range of platforms and price performance points. InfiniBand provides a scalable per- formance range of 500 MB/s to 6 GB/s per link, meeting the needs from entry level to high-end enterprise system (storagesearch.com/glossary.html). In short, InfiniBand is a supercalifragilisticexpialidocious data interconnect. For more information about InfiniBand, and to decipher the impenetrable net- work-speak in the preceding quote, visit the InfiniBand Trade Association on the Web at infinibandta.org/home/. File Systems The File systems configuration section enables you to configure support for the file systems you expect to use or access from your system. One of Linux’s greatest strengths is the breadth of its support for non-native file systems, which makes it possible for Linux to interoperate with almost any other oper- ating system used on more than five computers. TIP Build support for the file system on which your / file system resides into the kernel. Although this is not strictly necessary because you can use an initrd loaded at boot time, building the support into the kernel is simpler, less error prone, and marginally faster. Static support for your root file system is simpler and less error prone because you don’t need to remember to create an initrd each time you build a new kernel. It is faster because the kernel does not have to uncompress the initrd and load the module at boot time. 660 Chapter 27 35_599496 ch27.qxd 8/30/05 7:35 PM Page 660 At a minimum, enable support for ext2 and the ext3 journaling file sys- tem. If you wish, or need to, enable support for one of the other journaling file systems currently available: ■■ ReiserFS support — Provides support for the ReiserFS file system ■■ FS — Provides support for IBM’s Journaling File System ■■ XFS — Provides support for SGI’s high-performance Extended File System Unless you know you need them, you can safely disable support for the Minix and ROM file systems. If you intend to use file system quotas, enable Quota support and refer to Chapter 29, for information about using disk quotas. If you want to use the kernel’s automounter support as described in Chapter 12, enable Kernel automounter version 4 support (the automounter enables you want to mount and unmount file systems on the fly). As a general rule, build non-Linux file system support as modules to minimize the size of the kernel. CD-ROM/DVD File Systems You’ll need to enable support for CD-ROM and DVD file systems if you intend to use a CD-ROM or DVD on your computer. As a starting point, enable the following options: ■■ ISO 9660 CD-ROM file system suppor — Enables kernel support for standard CD-ROM file system ■■ Microsoft Joliet CDROM extensions — Enables the kernel to support Microsoft Windows’ long filename extensions for CD-ROMs in Unicode format Some newer CD-ROMs and DVDs use the UDF file system. If you expect to use such disks, enable the UDF file system support option. DOS/FAT/NT File Systems For better or worse, most Linux users and system administrators need to pro- vide access to various DOS or, more likely, Windows file systems. To do so, enable all three options, as modules, under DOS/FAT/NT File systems. You’ll be happy to know that incomplete but safe write support is available for NTFS file systems. Upgrading and Customizing the Kernel 661 35_599496 ch27.qxd 8/30/05 7:35 PM Page 661 Pseudo-File-Systems Pseudo-file-systems are so named because they are not true file systems with a distinct file system structure laid down on a physical disk. Rather, pseudo- file-systems present a view into kernel data structures using a file system metaphor and standard system calls for file system operations, such as open- ing, closing, reading, and writing. An increasing number of such pseudo- file-systems exist, as you can see under the Pseduo file systems section. You can probably get by enabling only /proc file system support, which adds sup- port for the /proc file system. /proc enables applications to utilize the proc interface to kernel tuning and device access. Miscellaneous File Systems The Miscellaneous file systems support section reveals the extent of Linux’s support for non-native file systems. If you need to access disks or data that resides on one of the listed file systems, enable support for that file system in this section. Again, to keep the size of your kernel as small as possible, enable support for foreign file systems as loadable modules. Network File Systems As an operating system that was designed and built from the ground up in a networked environment, Linux boasts rich support for networked file sys- tems, as you can see the Network File Systems section. We recommend enabling support for NFS (Network File System) version 3, which has considerable improvements and better kernel support for NFS than version 2 does, but is not as unproven as NFS version 4 is. So, enable Provide NFSv3 client support and disable Provide NFSv4 client support under NFS file system support. Sim- ilarly, enable Provide NFSv3 server support and disable Provide NFSv4 server support under the NFS server support subsection. If you want to use Samba to access Windows file systems, enable SMB file system support (to mount Windows shares, and so forth). Similarly, enable NCP file system support if you need to access Netware file systems, and then select the specific options for Netware file systems as fits your situation. Partition Types In addition to support for foreign (non-Linux) file systems, you might find it advantageous to configure the kernel to provide support for foreign disk par- tition types. To do so, enable Advanced partition selection in the Partition Types section and then select the specific partition types you want to use. 662 Chapter 27 35_599496 ch27.qxd 8/30/05 7:35 PM Page 662 Native Language Support The final subsection concerned with file systems is Native Language Support. Fedora Core and RHEL are configured to use the UTF8 character set encoding, so you should at least enable that character set under Base native language support. You should try to select support for both the codepage you need and the ISO NLS character set. For example, if you need support for Greek, enable the Codepage 869 (Greek) option and the NLS ISO 8859-7 (Modern Greek). American users should select the following: ■■ Codepage 437 (United States, Canada) ■■ ASCII (United States) ■■ NLS UTF8 You can build support for other character sets as modules and loaded at run time if you sometimes need support for languages and character sets other than the default. Profiling Support Profiling support, if enabled, activates the kernel’s support for the hardware performance counters built into modern CPUs and chipsets. By itself, this option does nothing unless you also enable Oprofile system profiling (EXPERI- MENTAL) as a module in order to create data that you later turn into informa- tion. You should not build OProfile into the kernel; there is little need outside of academic research for a kernel with a static profiler. What is OProfile? OProfile is a systemwide profiler that gathers perfor- mance metrics on all running code at low overhead. All code is profiled: hard- ware and software interrupt handlers, kernel modules, the kernel, shared libraries, and applications. OProfile consists of a kernel driver, a daemon that collects data samples, and a collection of tools to turn raw OProfile data into more useful information. It works by using the hardware performance regis- ters built into modern CPUs. Although OProfile is currently considered to be in alpha status, it has been used successfully and reliably in a wide array of hardware and computing environments. Depending on your needs, you can use OProfile to produce performance data at the function level or down to the individual CPU instruction. You can use OProfile data to annotate source code with profile information. You can also use OProfile to identify the top N applications or functions that take the most time across the whole system. Upgrading and Customizing the Kernel 663 35_599496 ch27.qxd 8/30/05 7:35 PM Page 663 [...]... available Red Hat systems installed strictly as server machines, rather than desktop or end-user workstations, rarely run the X Window system, much less have it installed They are not only 673 674 Chapter 28 headless, that is, lacking an attached monitor, but they also usually lack an attached keyboard or mouse Running the X Window system on a server uses CPU cycles, RAM, disk space, process table entries,... descriptors, better used to provide another service Moreover, underpowered systems may lack the horsepower to run the X Window system, and thus GUI tools Another shortcoming of graphical tools is, ironically, the very user-friendliness that makes them so popular That is, graphical administration tools require user interaction; they do not readily, if at all, lend themselves to automated, unattended... more importantly, your system administration skills will be considerably more portable In some cases, thankfully less common, GUI tools interfere with system administration tasks because, for example, the modifications they make to a configuration file overwrite manual changes Finally, graphical administration tools, by their very nature, encourage uninformed or ill-informed system administration habits... started process -v reverses the matching, showing all processes not matching the specified criteria -x forces an exact match of pattern -P ppid restricts the output to matches with a parent PID of ppid Similarly, -u euid, -U uid, and -G gid, limit the output to processes whose EUIDs, UIDs, and/or GIDs, respectively, match euid, uid, and/or gid Multiple ppids, euids, uids, and gids may be specified by separating... file systems, commands for working with files and directories, and commands for managing disk space usage Working with File Systems Unless you have an extremely active system, creating and formatting a file system is an infrequent necessity Actively maintaining a file system, however, is an ongoing process The commands for creating, formatting, and checking the integrity of Fedora Core and RHEL file systems... directly, /sbin and /usr/sbin will already be part of the path The following sections discuss process management, file system administration, monitoring and controlling system performance, configuring the system logs, keeping the system s date and time accurate, and writing and using scripts to perform maintenance tasks Because many commands can be used by both normal users and the root user, this discussion... graphical system administration tools? Absolutely They are helpful, convenient, and timesaving additions to every system administrator’s toolbox Not every problem is a nail, so you need more tools than a hammer GUI tools are only one set of many tools at your disposal You do yourself, your employer, your colleagues, and your users a valuable service if you take the time to understand the details of system administration. .. remote system The benefits of automating and simplifying system administration cannot be overestimated In a small environment with few users, workstations, and servers, the inability to script GUI configuration and administration tools may not be an issue However, system maintenance becomes a challenge even at the top end of the small office/home office (SOHO) sector, say 25 users and workstations, two... only Linux systems you’ll encounter Graphical tools with which you are familiar on Fedora Core or RHEL usually don’t exist on, say, a Debian or Novell system Speaking from personal experience, the day will come when you need to administer a non Red Hat- derived system If you know how to use command line tools and understand the underlying configuration files, you won’t be dependent on the GUI tool and,... criteria, -n sends the signal to the most recently started process -v reverses the matching, showing all processes not matching the specified criteria -x forces an exact match of pattern -P ppid sends the signal to processes whose parent process has a PID of ppid Similarly, -u euid, -U uid, and -G gid send the signal to processes whose EUIDs, UIDs, and/or GIDs, respectively, match euid, uid, and/or . devices that are themselves running Linux. Such devices, known as USB gadgets, might or might not be connected to a host sys- tem running Linux. When the gadget is connected to a Linux system, it. pro- vide access to various DOS or, more likely, Windows file systems. To do so, enable all three options, as modules, under DOS/FAT/NT File systems. You’ll be happy to know that incomplete but safe write. Windows file systems, enable SMB file system support (to mount Windows shares, and so forth). Similarly, enable NCP file system support if you need to access Netware file systems, and then select