📄 lsg09.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<LINK REL="ToC" HREF="index.htm">
<LINK REL="Index" HREF="htindex.htm">
<LINK REL="Next" HREF="lsg10.htm">
<A NAME="I0"></A>
<H2>Linux System Administrator's Survival Guide lsg09.htm</H2>
<P ALIGN=LEFT>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E47" >Understanding the Different Types of CD-ROMs</A>
<UL>
<LI>
<A HREF="#E69E75" >Internal, External, and Changer CD-ROM Drives</A>
<LI>
<A HREF="#E69E76" >ISO 9660 and CD-ROM Disk Formats</A>
<LI>
<A HREF="#E69E77" >CD-ROM Speeds and Interfaces</A>
<LI>
<A HREF="#E69E78" >Recordable CD-ROMs</A></UL>
<LI>
<A HREF="#E68E48" >Installing a CD-ROM Drive</A>
<UL>
<LI>
<A HREF="#E69E79" >Physically Install the Drive</A>
<LI>
<A HREF="#E69E80" >Configure and Rebuild the Kernel</A>
<LI>
<A HREF="#E69E81" >Create the Device Files</A>
<LI>
<A HREF="#E69E82" >Mount and Test the CD-ROM Drive</A></UL>
<LI>
<A HREF="#E68E49" >Using /etc/fstab</A>
<LI>
<A HREF="#E68E50" >Playing Audio CD-ROMs</A>
<LI>
<A HREF="#E68E51" >Using PhotoCDs with Linux</A>
<LI>
<A HREF="#E68E52" >Troubleshooting the CD-ROM Drive</A>
<UL>
<LI>
<A HREF="#E69E83" >Check the Kernel</A>
<LI>
<A HREF="#E69E84" >Check the Device</A>
<LI>
<A HREF="#E69E85" >Check the Drive Settings</A>
<LI>
<A HREF="#E69E86" >Device Busy Errors</A></UL>
<LI>
<A HREF="#E68E53" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E11"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>Chapter 9</B></FONT></CENTER></H1>
<BR>
<A NAME="E67E14"></A>
<H2 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>CD-ROM Drives</B></FONT></CENTER></H2>
<BR>
<P>The CD-ROM drive has changed from an expensive peripheral to almost a mandatory drive for most PC users. As prices of CD-ROM drives have dropped and the amount of software distributed by CD-ROM has increased, the CD-ROM drive has become a necessary system component, especially for users of large software packages like Linux. Because of its device driver architecture, Linux supports CD-ROM drives easily. This chapter looks at the support built into Linux for a CD-ROM and gives general instructions for installing and configuring a CD-ROM drive.
<BR>
<BR>
<A NAME="E68E47"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Understanding the Different Types of CD-ROMs</B></FONT></CENTER></H3>
<BR>
<P>A CD-ROM holds a large amount of material (approximately 650M) in a convenient size. CD-ROMs are non-volatile—they don't lose data when exposed to magnetic fields, and they are difficult to damage. As with any new technology, though, CD-ROMs took a while to become a common item, and several different, competing formats were developed while the technology was evolving. Most formats were incompatible with each other or were specific to a type of hardware or CD-ROM software driver. The adoption of a single CD-ROM standard format has helped spread CD-ROM usage throughout the UNIX and Linux communities.
<BR>
<P>Several different types of CD-ROM drives are available. Choosing the right drive for your Linux system is often a matter of balancing features against costs. Although it's tempting to purchase the state-of-the-art drive, you may be wasting your money if you do so.
<BR>
<BR>
<A NAME="E69E75"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Internal, External, and Changer CD-ROM Drives</B></FONT></CENTER></H4>
<BR>
<P>You can buy CD-ROM drives in both internal and external models. You must attach an internal CD-ROM drive to a drive bay and a controller card (which you may already have) within your computer. An internal CD-ROM drive draws its power from a connector to the PC power supply. Before you purchase an internal CD-ROM drive, make sure you have a drive bay available for it and a spare power connector.
<BR>
<P>Don't assume that drive bays are available inside your machine for a CD-ROM drive just because you see featureless plastic panels on the front. There may be hard drives mounted behind these panels. Take off the cover of your machine and check for a full-width (5.25-inch wide) slot that can hold your CD-ROM drive. If you don't have any power connectors available inside the machine, you can attach a Y-connector to expand a single connector to two.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Before you add an internal CD-ROM drive, check that your power supply has adequate reserve to power it and all the other devices within your machine. Newer machines usually have enough power, but some older PC units are underpowered and have power supplies capable of powering only floppy and hard drives. If you have any doubts, check the ratings on the power supply, or consult your dealer. CD-ROM drives do not require a lot of power, but a surge from the CD-ROM drive may adversely affect other devices in your system.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>External CD-ROM drives are easier to connect, in most cases, because they have an external power supply and attach to the outside edge of a board in one of your machine's expansion slots. Some interface types (such as IDE) do not support external drives easily as the IDE controller card has no external connector. Check the interface and cabling before you purchase an external CD-ROM drive. External CD-ROM drives tend to be more expensive then internal drives because of the additional case and power supply.
<BR>
<P>Most CD-ROM drives hold a single CD, either in a slide-out tray like many audio CD players or in a CD caddy, which is a holder that you open and into which you insert the CD. You then place the caddy inside the CD-ROM drive. Caddy and caddyless systems work equally well, with some users preferring no caddy and others liking the caddies. Most current high-end CD-ROM drives use caddies.
<BR>
<P>CD-ROM changers are also available. These CD-ROM drives hold four or more CDs at the same time. Most CD-ROM changers use a cartridge that holds six CDs, a system similar to the one used in audio CD changers. A few changers hold 18 or more CDs. These changers allow you to load up the unit with your favorite discs, and then select the one you want using software. Only one disk is loaded in the CD-ROM drive mechanism at a time, with the others just held internally for convenience. In other words, you can't access two CDs in a multi-CD changer at the same time because there is only one read mechansim into which the stored CD-ROMs are shuffled. Not all operating systems support changers because the commands to alter and remount CDs can be cumbersome to implement, especially in a real-time operating system like Linux. Linux handles some CD-ROM changers that behave as a regular CD-ROM drive, although you may have to change CD-ROM discs manually by unmounting a currently loaded disc, changing to another disc, and then remounting. Newer drivers are beginning to appear for popular changers that perform this process automatically, although none are supplied with Linux distributions at this time.
<BR>
<BR>
<A NAME="E69E76"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>ISO 9660 and CD-ROM Disk Formats</B></FONT></CENTER></H4>
<BR>
<P>CDs can be formatted in several different ways, depending on the type of machine the information is designed for. A CD-ROM designed for a PC, for example, is not necessarily readable on a Macintosh. For this reason, a standardized format was developed for CD-ROMs called ISO 9660. The ISO 9660 format was called the High Sierra format before being adopted by ISO, and both terms are in common usage still.
<BR>
<P>The ISO 9660 format dictates filenames in a strict DOS format(eight character filename and three character filetype). This format is fine for DOS-based machines and operating systems, but it is very restrictive for UNIX, which allows long filenames and doesn't force a convention for filetyping. To get around the DOS format limitations, a system called the Rock Ridge Extensions was developed. The Rock Ridge Extensions allow unused fields in the ISO 9660 data format to be used to provide much longer filenames, as well as UNIX-based information such as links, permissions, and so on. The Rock Ridge Extensions are in wide use for most UNIX and Linux ISO 9660 disks, although all these disks can be used in the basic ISO 9660 format too.
<BR>
<P>A few years ago, Kodak developed a graphics file storage format called PhotoCD. PhotoCD allows photographic and other visual images to be stored on a CD-ROM as digital data. The CD-ROM drive can then quickly recall this digital data and assemble it into the image it represents. Linux supports PhotoCD formats through utilities that allow PhotoCD files to be displayed.
<BR>
<P>Most CD-ROM device drivers also enable the user to play standard music CD discs by providing an on-screen control that steps through tracks and handles pauses, fast forwards, and so on. Audio-only CD-ROMs have no picture information and can't be decoded by Linux, other than as a sound source. Linux includes utilities that support the playing of audio-only CD discs, such as Workman (available in both character and X versions).
<BR>
<BR>
<A NAME="E69E77"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>CD-ROM Speeds and Interfaces</B></FONT></CENTER></H4>
<BR>
<P>CD-ROM drives are available in a number of different speeds, which dictate the transfer rate of data between the CD-ROM and the computer. The first generation of drives was called single speed and could transfer information at approximately 150K per second. Double speed CD-ROM drives, as the name suggests, effectively double the transfer rate to over 300K per second. Quad speed and six speed drives increase the transfer rates even more. Of course, as the speed increases, so does the price.
<BR>
<P>Pure CD-ROM speed is not as important as your system's capability to receive the information. If your CD-ROM drive is capable of reading data at 750K per second, for example, but your interface card to the CD-ROM drive is capable of handling only 300K per second, the extra speed is useless. Also, if your device driver or application talking to the CD-ROM can't keep up, extra speed is again wasted.
<BR>
<P>The speed issue depends to a large degree on the type of interface you are using between the CD-ROM player and your system. The best interface is SCSI (see <A HREF="lsg07.htm">Chapter 7</A>, "SCSI Devices," for more information) because it supports the highest transfer speeds and widest variety of supported CD-ROM players. Linux using a SCSI interface can provide full support for the fast CD-ROM drives, and a quad speed drive is noticeably faster at retrieving a large file than a double speed, for example. Because SCSI costs considerably more than other interfaces, most Linux systems use either an IDE (Integrated Drive Electronics) or sound card-based (proprietary) CD-ROM connector. These interfaces have a limited throughput and the newer six speed CD-ROM drives can be much faster than the interface can handle in a heavily loaded system. For these interfaces, a quad speed or even a double speed CD-ROM drive is usually sufficient.
<BR>
<P>SCSI is a standard bus interface that connects all peripherals in a long chain. You can plug a CD-ROM drive into the chain at any location. Each SCSI device has all the device electronics and basic communications drivers built into the drive's electronics (which accounts for the drive's higher price). These built-in components mean that any SCSI CD-ROM drive can be plugged into a SCSI system. As long as it's SCSI, it will work with Linux. (Linux also requires the CD-ROM drive to have block sizes of 512 or 2048 bytes, but most CD-ROM drives support these sizes. A few proprietary CD-ROM drives used by workstation and minicomputer manufacturers do not conform to these block sizes, but it is unlikely you could purchase such a CD-ROM drive easily.)
<BR>
<P>SCSI also allows more than one CD-ROM drive on a system at a time. You can easily have two, three, four, or more CD-ROM drives connected and available simultaneously. In contrast, a CD-ROM changer houses several CD-ROM discs at a time in cartridges, but only one CD disc is loaded and active at a time.
<BR>
<P>Some available SCSI-based CD-ROM interface cards are not fully SCSI interfaces, but a reduced set designed to support the CD-ROM drive only. These cards work with Linux as they conform to the SCSI standards, but you cannot add hard drives and other SCSI devices to them. Check the CD-ROM drive's documentation to determine whether the interface card supplied with the CD-ROM (if there is one) offers full or partial support.
<BR>
<P>True IDE CD-ROM drives plug into the IDE controller card that handles the hard drive in most PC systems. Older IDE systems can only handle two devices, which means that you can only have one hard drive and your CD-ROM drive. Newer EIDE (Extended IDE) cards can handle four devices. The IDE CD-ROM drives use a modified version of the hard disk standard called ATAPI. IDE CD-ROM drives are still fairly new, and they are generally inexpensive (as the IDE interface card has all the electronics, not the drive). A few IDE CD-ROM drivers are compatible with Linux, and more are being added as CD-ROM drives are released.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Don't confuse IDE CD-ROM drives with proprietary CD-ROM drives. Proprietary CD-ROM drives use the PC Bus, as does IDE, and can be misleadingly labeled. Check the descriptions carefully. IDE CD-ROM drives attach to an IDE controller card; they never attach to a sound card.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Proprietary CD-ROM drives are another problem, as the many different models of CD-ROM drive all have different communication methods. Proprietary drives are usually packaged either as a stand-alone CD-ROM or combined with a sound card as a multimedia system. In all these proprietary systems, the CD-ROM plugs into a special connector on the interface card. Most proprietary CD-ROM drives are internal models. These proprietary CD-ROM drives are not interchangeable and generally require different device drivers for each model. Some proprietary CD-ROM interface cards allow up to four CD-ROM drives to be connected to one controller and up to four controllers to be present at a time. The newer Matsushita/Kotobuki drives all support this expansion, for example.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -