LDP/LDP/howto/docbook/CDROM-HOWTO.sgml

3160 lines
89 KiB
Plaintext

<!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<Article>
<ArtHeader>
<Title>The Linux CD-ROM HOWTO</Title>
<Author>
<FirstName>Jeff</FirstName>
<Surname>Tranter</Surname>
<Affiliation>
<Address>
<Email>tranter@pobox.com</Email>
</Address>
</Affiliation>
</Author>
<PubDate>v1.17, 18 July 2001</PubDate>
<revhistory>
<revision>
<revnumber>1.17</revnumber>
<date>2001-07-18</date>
<authorinitials>jjt</authorinitials>
<revremark>
Merged in some questions from the no longer maintained ATAPI/IDE CD-ROM FAQ by Mathew Kirsch.
Added note on the Red Hat 7.1 DMA issue.
</revremark>
</revision>
<revision>
<revnumber>1.16</revnumber>
<date>2001-07-16</date>
<authorinitials>jjt</authorinitials>
<revremark>
Relicensed under the GFDL.
</revremark>
</revision>
<revision>
<revnumber>1.15</revnumber>
<date>2001-05-11</date>
<authorinitials>jjt</authorinitials>
<revremark>
</revremark>
</revision>
</revhistory>
<Abstract>
<Para>
This document describes how to install, configure, and use CD-ROM
drives under Linux. It lists the supported hardware and answers a
number of frequently asked questions. The intent is to bring new users
up to speed quickly and reduce the amount of traffic in the Usenet
news groups and mailing lists.
</Para>
</Abstract>
</ArtHeader>
<Sect1><Title>Introduction</Title>
<Para>
This is the Linux CD-ROM HOWTO. It is intended as a quick
reference covering everything you need to know to install and
configure CD-ROM hardware under Linux. Frequently asked questions
related to CD-ROM are answered, and references are given to other
sources of information related to CD-ROM applications and technology.
</Para>
<Sect2><Title>Acknowledgments</Title>
<Para>
Much of this information came from the documentation and source files
provided with the Linux kernel, the Internet <ULink URL="news:alt.cd-rom">alt.cdrom</ULink>
newsgroup FAQ, and input from Linux users.
</Para>
<Para>
Thanks to the <ULink URL="http://www.docbook.org">DocBook</ULink>
tools, this HOWTO is available in several formats, all generated from
a common source file.
</Para>
</Sect2>
<Sect2><Title>New Versions Of This Document</Title>
<Para>
New versions of this document will be periodically posted to the
<ULink URL="news:comp.os.linux.answers">comp.os.linux.answers</ULink> newsgroup.
Hypertext versions of this and other Linux HOWTOs are available on
many world-wide web sites, including
<ULink URL="http://www.linuxdoc.org/">http://www.linuxdoc.org</ULink>.
Most Linux CD-ROM distributions include the HOWTOs, often under the
<Filename>/usr/doc</Filename> directory, and you can also buy printed copies
from several vendors. Sometimes the HOWTOs available from CD-ROM
vendors, ftp sites, and printed format are out of date. If the date on
this HOWTO is more than six months in the past, then a newer copy is
probably available on the Internet.
</Para>
<Para>
<Emphasis>Please note that, due to the dynamic nature of the Internet, all
web and ftp links listed in this document are subject to change.</Emphasis>
</Para>
<Para>
Translations of this document are available in several languages:
</Para>
<Para>
Chinese:
<ULink URL="http://www.linux.org.tw/CLDP/CDROM-HOWTO.html">http://www.linux.org.tw/CLDP/CDROM-HOWTO.html</ULink>
</Para>
<Para>
French:
<ULink URL="http://www.freenix.org/unix/linux/HOWTO/">http://www.freenix.org/unix/linux/HOWTO/</ULink>
</Para>
<Para>
German:
<ULink URL="http://www.tu-harburg.de/dlhp/HOWTO/DE-CDROM-HOWTO.html">http://www.tu-harburg.de/dlhp/HOWTO/DE-CDROM-HOWTO.html</ULink>
</Para>
<Para>
Korean:
<ULink URL="http://kldp.org/HOWTO/html/CDROM/CDROM-HOWTO.html">http://kldp.org/HOWTO/html/CDROM/CDROM-HOWTO.html</ULink>
</Para>
<Para>
Japanese:
<ULink URL="http://www.linux.or.jp/JF/JFdocs/CDROM-HOWTO.html">http://www.linux.or.jp/JF/JFdocs/CDROM-HOWTO.html</ULink>
</Para>
<Para>
Polish:
<ULink URL="http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html">http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html</ULink>
</Para>
<Para>
Spanish:
<ULink URL="ftp://ftp.insflug.org/es">ftp://ftp.insflug.org/es</ULink>
</Para>
<Para>
Swedish:
<ULink URL="ftp://ftp.hig.se/pub/linux/swe-doc/">ftp://ftp.hig.se/pub/linux/swe-doc/</ULink>
</Para>
<Para>
Most translations of this and other Linux HOWTOs can also be found at
<ULink URL="http://www.ibiblio.org/pub/Linux/docs/HOWTO/translations/">
http://www.ibiblio.org/pub/Linux/docs/HOWTO/translations/</ULink>.
If you make a translation of this document into another language, let me
know and I'll include a reference to it here.
</Para>
</Sect2>
<Sect2><Title>Feedback</Title>
<Para>
I rely on you, the reader, to make this HOWTO useful. If you have any
suggestions, corrections, or comments, please send them to me,
<ULink URL="mailto:tranter@pobox.com">tranter@pobox.com</ULink>, and
I will try to incorporate them in the next revision.
</Para>
<Para>
I am also willing to answer general questions on CD-ROM under Linux,
as best I can. Before doing so, please read all of the information in
this HOWTO, and then send me detailed information about the
problem. Please do not ask me about using CD-ROM drives under
operating systems other than Linux.
</Para>
<Para>
If you publish this document on a CD-ROM or in hardcopy form, a
complimentary copy would be appreciated; mail me for my postal
address. Also consider making a donation to the Linux Documentation
Project to help support free documentation for Linux. Contact the
LDP at <ULink URL="mailto:feedback@linuxdoc.org">feedback@linuxdoc.org</ULink>
for more information.
</Para>
</Sect2>
<Sect2><Title>Distribution Policy</Title>
<Para>
Copyright (c) 1995-2001 by Jeff Tranter. Permission is granted to copy,
distribute and/or modify this document under the terms of the GNU Free
Documentation License, Version 1.1 or any later version published by
the Free Software Foundation; with no Invariant Sections, with no
Front-Cover Texts, and with no Back-Cover Texts. A copy of the
license is available at
<ULink URL="http://www.gnu.org/copyleft/fdl.html">http://www.gnu.org/copyleft/fdl.html</ULink>
</Para>
</Sect2>
</Sect1>
<Sect1><Title>CD-ROM Technology</Title>
<BlockQuote><Attribution>from a CD-ROM instruction manual</Attribution>
<Para>
"CD-ROM is read-only memory, and audio compact disc system is
available as package-media of digital data for those purpose. For
playing audio CD, please insert Head-phone jack."
</Para>
</BlockQuote>
<Para>
Don't Panic! The world of CD-ROM technology is not as
confusing as your instruction manual.
</Para>
<Para>
CD-ROM stands for <Emphasis>Compact Disc Read-Only Memory</Emphasis>, a mass
storage medium utilizing an optical laser to read microscopic pits on
the aluminized layer of a polycarbonate disc. The same format is used
for audio Compact Discs. Because of its high storage capacity,
reliability, and low cost, CD-ROM has become an increasingly popular
storage media.
</Para>
<Para>
The storage capacity of a CD-ROM disc is approximately 650 megabytes,
equivalent to over 500 high density 3.5" floppy disks or roughly
250,000 typed pages.
</Para>
<Para>
First generation drives (known as <Emphasis>single speed</Emphasis>), provided a
transfer rate of approximately 150 kilobytes per second. Hardware
manufacturers then introduced double speed (300 kB/sec), quad speed
(600 kB/sec), and higher. Current drives operate at up to 40 times
speed, although the maximum rate is only achievable over certain
portions of the disc surface.
</Para>
<Para>
Most CD-ROM drives use either the Small Computer Systems Interface
(SCSI), ATAPI enhanced IDE interface, or a vendor proprietary
interface. They also typically support playing audio CDs via an
external headphone jack or line level output. Most drives also allow
reading the frames of data from audio CDs in digital form.
</Para>
<Para>
CD-ROMs are usually formatted with an ISO-9660 (formerly
called <Emphasis>High Sierra</Emphasis>) file system. This format
restricts filenames to the MS-DOS style (8+3 characters). The
<Emphasis>Rock Ridge Extensions</Emphasis> use undefined fields in the
ISO-9660 standard to support longer filenames and additional Unix
style information (e.g. file ownership, symbolic links, etc.).
Microsoft has defined a proprietary ISO file system extension called
Joliet which supports long filenames using the 16-bit UNICODE
character encoding.
</Para>
<Para>
<Emphasis>PhotoCD</Emphasis> is a standard developed by Kodak for
storing photographic images as digital data on a CD-ROM. With
appropriate software, you can view the images on a computer,
manipulate them, or send them to a printer. Information can be added
to a PhotoCD at a later date; this is known as
<Emphasis>multi-session</Emphasis> capability.
</Para>
<Para>
CD recordable (CD-R) drives allow writing onto a special "gold" CD which can
then be read by any CD-ROM drive. Data can only be written once,
although using multi-session new data can be appended to a disc.
</Para>
<Para>
CD-RW (rewritable) drives can be erased and rewritten with new data.
They use special discs which can be read by most recent CD-ROM
drives (but not older ones or most audio CD players).
</Para>
<Para>
DVD-ROM expands the storage of a CD to as much as 17 gigabytes. They
are commonly used as a medium for distributing full length motion
pictures encoded using the MPEG-2 format. The MPEG video decoding is
performed using specialized decoder software and/or hardware. DVD-RAM
is a writable version of DVD.
</Para>
</Sect1>
<Sect1><Title>Supported Hardware</Title>
<Para>
This section lists the CD-ROM drivers and interfaces that are
currently supported under Linux. The information here is based on the
latest stable Linux kernel, which at time of writing was version
2.4.4.
</Para>
<Para>
This information is valid for Linux on the Intel x86 platform. Much
of it is applicable to Linux on other processor architectures as
well.
</Para>
<Sect2><Title>ATAPI CD-ROM Drives</Title>
<Para>
ATAPI (ATA Packet Interface) is a protocol for
controlling mass storage devices. It builds on the ATA (AT Attachment)
interface, the official ANSI standard name for the IDE interface
developed for hard disk drives. ATAPI is commonly used for hard disks,
CD-ROM drives, tape drives, and other devices. Currently the most
popular type of interface, it offers most of the functionality of
SCSI, without the need for an expensive controller or cables.
</Para>
<Para>
The Linux kernel has a device driver that should work with any ATAPI
compliant CD-ROM drive. Vendors shipping compatible drives include
Aztech, Mitsumi, NEC, Sony, Creative Labs, and Vertos. If you have
recently purchased a CD-ROM drive, especially if it is quad speed or
faster, it is almost guaranteed to be IDE/ATAPI.
</Para>
<Para>
Linux also has an IDE SCSI emulation kernel driver that
makes an IDE/ATAPI device appear in software to be a SCSI device,
allowing the use of a SCSI device driver instead of the native ATAPI
driver. This is useful if you have an ATAPI device for which no native
driver has been written (for example, an ATAPI PD-CD or CDR drive);
you can then use this emulation together with an appropriate SCSI
device driver.
</Para>
</Sect2>
<Sect2><Title>SCSI CD-ROM Drives</Title>
<Para>
SCSI (Small Computer Systems Interface) is a popular format
for CD-ROM drives. Its chief advantages are a reasonably fast transfer
rate, multi-device capability, and support on a variety of computer
platforms. Some disadvantages of SCSI are the need for a relatively
expensive controller card and cables.
</Para>
<Para>
Any SCSI CD-ROM drive with a block size of 512 or 2048
bytes should work under Linux; this includes the vast majority of
CD-ROM drives on the market.
</Para>
<Para>
You will also need a supported SCSI controller card; see the
<ULink URL="http://www.ibiblio.org/pub/Linux/docs/HOWTO/unmaintained/SCSI-HOWTO">Linux SCSI HOWTO</ULink>
for more information on interface hardware.
</Para>
<Para>
Note that some older CD-ROM drives use a proprietary controller with a
modified interface that is not fully SCSI compatible (e.g. it may not
support adding other SCSI devices on the bus). These will most likely
<Emphasis>not</Emphasis> work under Linux.
</Para>
</Sect2>
<Sect2><Title>Proprietary CD-ROM Drives</Title>
<Para>
Several CD-ROM drives using proprietary interfaces are
available; the interface is often provided on a sound card. Simple
interface cards equivalent to that provided on the sound card are also
available. These drives generally tend to be lower in cost and
smaller than SCSI drives. Their disadvantages are the lack of
standardization and expandability.
</Para>
<Para>
Note that proprietary interfaces are sometimes erroneously referred to
as IDE interfaces, because like IDE hard disks, they use a simple
interface based on the PC/AT bus. To add to the confusion, some
vendors, most notably Creative Labs, have shipped many different types
of CD-ROM drives and have offered proprietary, SCSI, and ATAPI
interfaces on their sound cards.
</Para>
<Para>
The table below lists the proprietary CD-ROM drives that are known to
be supported under Linux. Drivers for additional devices may be
available in the latest development kernels or as kernel patches. The
latter can most often be found at
<ULink URL="ftp://www.ibiblio.org/pub/Linux/kernel/patches/cdrom/">ftp://www.ibiblio.org/pub/Linux/kernel/patches/cdrom/</ULink>.
Also check the documentation files included with the kernel distribution,
usually installed in <Filename>/usr/src/linux/Documentation/cdrom</Filename>,
for the latest information.
<informaltable frame=all>
<tgroup cols=4>
<thead>
<row><entry>Vendor</entry><entry>Model</entry><entry>Kernel Driver</entry><entry>Notes</entry></row>
</thead>
<tbody>
<row><entry>Panasonic</entry><entry>CR-521</entry><entry>sbpcd</entry><entry>Note 1</entry></row>
<row><entry>Panasonic</entry><entry>CR-522</entry><entry>sbpcd</entry><entry>Note 1</entry></row>
<row><entry>Panasonic</entry><entry>CR-523</entry><entry>sbpcd</entry><entry>Note 1</entry></row>
<row><entry>Panasonic</entry><entry>CR-562</entry><entry>sbpcd</entry><entry>Note 1</entry></row>
<row><entry>Panasonic</entry><entry>CR-563</entry><entry>sbpcd</entry><entry>Note 1</entry></row>
<row><entry>Creative Labs</entry><entry>CD-200</entry><entry>sbpcd</entry></row>
<row><entry>IBM</entry><entry>External ISA</entry><entry>sbpcd</entry><entry>Note 2</entry></row>
<row><entry>Longshine</entry><entry>LCS-7260 </entry><entry>sbpcd</entry></row>
<row><entry>Teac</entry><entry>CD-55A </entry><entry>sbpcd</entry></row>
<row><entry>Sony</entry><entry>CDU-31A</entry><entry>cdu31a</entry></row>
<row><entry>Sony</entry><entry>CDU-33A</entry><entry>cdu31a</entry></row>
<row><entry>Sony</entry><entry>CDU-535</entry><entry>sonycd535</entry><entry>Note 3</entry></row>
<row><entry>Sony</entry><entry>CDU-531 </entry><entry>sonycd535</entry></row>
<row><entry>Aztech</entry><entry>CDA268-01A</entry><entry>aztcd</entry><entry>Note 4</entry></row>
<row><entry>Orchid</entry><entry>CDS-3110</entry><entry>aztcd</entry></row>
<row><entry>Okano/Wearnes</entry><entry>CDD110</entry><entry>aztcd</entry></row>
<row><entry>Conrad</entry><entry>TXC</entry><entry>aztcd</entry></row>
<row><entry>CyCDROM</entry><entry>CR520ie</entry><entry>aztcd</entry></row>
<row><entry>CyCDROM</entry><entry>CR940ie</entry><entry>aztcd</entry></row>
<row><entry>GoldStar</entry><entry>R420</entry><entry>gscd</entry><entry>Note 5</entry></row>
<row><entry>Philips/LMS</entry><entry>CM206</entry><entry>cm206</entry><entry>Note 6</entry></row>
<row><entry>Mitsumi</entry><entry>CRMC LU005S</entry><entry>mcd/mcdx</entry><entry>Note 7, 8</entry></row>
<row><entry>Mitsumi</entry><entry>FX001</entry><entry>mcd/mcdx</entry><entry>Note 7, 8</entry></row>
<row><entry>Optics Storage</entry><entry>Dolphin 8000AT</entry><entry>optcd</entry></row>
<row><entry>Lasermate</entry><entry>CR328A</entry><entry>optcd</entry></row>
<row><entry>Sanyo</entry><entry>H94A</entry><entry>sjcd</entry></row>
<row><entry>various</entry><entry>various</entry><entry>isp16</entry><entry>Note 9</entry></row>
</tbody>
</tgroup>
</informaltable>
Notes:
<OrderedList>
<ListItem>
<Para>
These drives may be sold under the names Creative Labs,
Panasonic, Matsushita, or Kotobuki.
</Para>
</ListItem>
<ListItem>
<Para>
This drive is the same as a Panasonic CR-562.
</Para>
</ListItem>
<ListItem>
<Para>
May also be sold under the Procomm name.
</Para>
</ListItem>
<ListItem>
<Para>
This driver is for the CDA268-01A only. Other models, including
the CDA268-03I and CDA269-031SE are not proprietary and should use the
IDECD (ATAPI) kernel driver.
</Para>
</ListItem>
<ListItem>
<Para>
May also be sold as part of a Reveal Multimedia Kit.
</Para>
</ListItem>
<ListItem>
<Para>
The Philips CM205 is not supported by this driver, but there is
a separate alpha release driver available from ftp://www.ibiblio.org
in /pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz
</Para>
</ListItem>
<ListItem>
<Para>
May also be sold under the Radio Shack name.
</Para>
</ListItem>
<ListItem>
<Para>
There are two drivers available. "mcd" is the original one, and
"mcdx" is a newer driver with more features (XA and multi-session support).
</Para>
</ListItem>
<ListItem>
<Para>
This driver works with CD-ROM drives that are attached to the
interface on an ISP16, MAD16 or Mozart sound card.
</Para>
</ListItem>
</OrderedList>
</Para>
<Para>
If a drive listed here is not supported by your kernel, you probably
need to upgrade to a newer version.
</Para>
<Para>
If your drive is not one of the models listed here, particularly if it
was bought recently and is quad speed or faster, it probably uses the
IDE/ATAPI interface listed in a previous section. <Emphasis>The single most
common error among Linux CD-ROM users is to assume that any drive
connected to a SoundBlaster card should use the SBPCD
driver</Emphasis>. Creative Labs and most other vendors are no longer
selling proprietary interface drives, they are following the standard
ATAPI/IDE interface.
</Para>
</Sect2>
<Sect2><Title>Parallel Port Drives</Title>
<Para>
There are external storage devices, including CD-ROM drives, that
attach to the parallel port of personal computers. In many cases the
devices internally use an IDE interface in conjunction with an adaptor
which interfaces the internal IDE bus to the PC parallel port.
</Para>
<Para>
Linux has a parallel port IDE driver which supports most parallel port
devices. At the time of writing it supported devices from the
following vendors (as well as most no-name and clone drives compatible
with these): ATEN, Avatar, DataStor, Fidelity International
Technology, Freecom, Hewlett-Packard, Imation, KT Technology, KingByte
Information Corp., Maxell, MicroSolutions, OnSpec, Shuttle Technology,
SyQuest, and ValuStore.
</Para>
<Para>
Additional information can be found at
<ULink URL="http://www.torque.net/parport/">http://www.torque.net/parport/</ULink>.
</Para>
</Sect2>
<Sect2><Title>PCMCIA Drives</Title>
<Para>
Using a PCMCIA SCSI or IDE adaptor you can connect external CD-ROM
drives to a laptop. Once the appropriate PCMCIA kernel driver is
installed the drives will appear like any other IDE or SCSI drives.
</Para>
<Para>
See the <ULink URL="http://www.ibiblio.org/LDP/HOWTO/PCMCIA-HOWTO.html">Linux PCMCIA HOWTO</ULink>
for more information.
</Para>
</Sect2>
<Sect2><Title>USB CD-ROM Drives</Title>
<Para>
The Universal Serial Bus has support for mass storage devices.
USB CD-R and CD-RW drives are popular because they can be
quickly and easily moved between systems.
</Para>
<Para>
You need to configure the kernel for "USB Mass Storage support".
This makes USB storage devices appear like SCSI, although they
do not use the same device files. See the
<ULink URL="http://www.dynamine.net/linux-usb/HOWTO">Linux USB HOWTO</ULink>
for more details.
</Para>
</Sect2>
</Sect1>
<Sect1><Title>Installation</Title>
<Para>
Installation of a CD-ROM under Linux consists of these
steps:
<OrderedList>
<ListItem>
<Para>
Installing the hardware.
</Para>
</ListItem>
<ListItem>
<Para>
Configuring and building the Linux kernel.
</Para>
</ListItem>
<ListItem>
<Para>
Creating device files and setting boot time parameters
</Para>
</ListItem>
<ListItem>
<Para>
Booting the Linux kernel.
</Para>
</ListItem>
<ListItem>
<Para>
Mounting the media.
</Para>
</ListItem>
</OrderedList>
The next sections will cover each of these steps in detail.
</Para>
<Sect2><Title>Installing the Hardware</Title>
<Para>
Follow the manufacturer's instructions for installing the hardware or
have your dealer perform the installation. The details will vary
depending on whether the drive is internal or external and on the type
of interface used. There are no special installation requirements for
Linux. You may need to set jumpers on the drive and/or interface card
for correct operation; some of the kernel drivers include
documentation files that include this information.
</Para>
<Para>
As explained in the file <Filename>ide-cd</Filename>, ATAPI CD-ROMS should be
jumpered as "single" or "master", and not "slave" when only one IDE
device is attached to an interface (although this restriction is no
longer enforced with recent kernels).
</Para>
</Sect2>
<Sect2><Title>Configuring and Building the Kernel</Title>
<Para>
When initially installing Linux from CD-ROM you will likely be using a
boot and/or root disk provided as part of a Linux distribution. If
possible, you should choose a boot disk with the kernel driver for
your CD-ROM device type. If you cannot find a boot disk with the
necessary CD-ROM driver, you have several options:
<OrderedList>
<ListItem>
<Para>
Boot directly from CD-ROM (if supported by your computer and Linux CD)
</Para>
</ListItem>
<ListItem>
<Para>
Install over a network
</Para>
</ListItem>
<ListItem>
<Para>
Boot DOS, and install the Linux files onto your hard disk
</Para>
</ListItem>
<ListItem>
<Para>
Boot DOS, and create a set of floppies to install Linux
</Para>
</ListItem>
<ListItem>
<Para>
Find someone who can build you a boot disk with the needed
CD-ROM driver
</Para>
</ListItem>
</OrderedList>
The
<ULink URL="http://www.linuxdoc.org/HOWTO/Installation-HOWTO/index.html">Linux Installation HOWTO</ULink>
has more information on installing
Linux. If you purchased Linux on CD-ROM, it likely also came with some
installation instructions (that little booklet inside the jewel case,
and/or files on the CD).
</Para>
<Para>
Once Linux has initially been installed, most users will want to
compile their own kernel, usually for one of these reasons:
<ItemizedList>
<ListItem>
<Para>
to support a CD-ROM drive or other hardware
</Para>
</ListItem>
<ListItem>
<Para>
to upgrade to a newer kernel release
</Para>
</ListItem>
<ListItem>
<Para>
to free up memory resources by minimizing the size of the kernel
</Para>
</ListItem>
</ItemizedList>
The
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html">Linux Kernel HOWTO</ULink>
should be consulted for the details of
building a kernel. I will just mention here some issues
that are specific to CD-ROM drives.
</Para>
<Para>
Obviously, you need to compile in support for your CD-ROM drive when
you configure the kernel.
</Para>
<Para>
If you have an ATAPI CD-ROM drive, you need to enable
<Emphasis>Enhanced IDE/MFM/RLL disk/cdrom/tape support</Emphasis> and
<Emphasis>Include IDE/ATAPI CDROM support</Emphasis>.
</Para>
<Para>
For SCSI CD-ROM drives, enable the options <Emphasis>SCSI
support</Emphasis> and <Emphasis>SCSI CDROM support</Emphasis>. Also
enable support for your SCSI host adapter when prompted, e.g.
<Emphasis>Adaptec AHA152X/2825 support</Emphasis>.
</Para>
<Para>
For proprietary interface CD-ROM drives, enable the appropriate
driver. You can use the table listed previously to determine the
driver to use for your model.
</Para>
<Para>
Virtually all CD-ROMs use the ISO-9660 file system, so you must
also enable <Emphasis>ISO 9660 CDROM filesystem support</Emphasis>.
</Para>
<Para>
Although not needed for CD-ROM operation, if you have a sound card
that is supported under Linux you might want to enable and configure
the kernel sound driver at this time as well. The
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Sound-HOWTO.html">Sound HOWTO</ULink>
can be a useful reference here.
</Para>
<Para>
You should then follow the usual procedure for building the kernel and
installing it. Don't boot with the new kernel until you create the
device files and set up any boot time parameters as described in the
next section.
</Para>
<Para>
The ISO-9660 filesystem and almost all of the CD-ROM drivers can be
built as loadable kernel modules. This scheme allows the
kernel drivers to be loaded and unloaded without rebooting the kernel,
freeing up memory. I recommend you get your CD-ROM installation
running using compiled-in drivers first. How to use modules is
described in the modules documentation and the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ULink>.
</Para>
<Para>
If a drive type listed here is not supported by your kernel, you
likely need to upgrade to a newer version.
</Para>
<Para>
It is possible that you need to use a driver that is distributed
separately from the kernel source code. This usually involves patching
the kernel. Again, the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ULink>
explains how to do this.
</Para>
<Para>
Note that you can configure the kernel using the text-based program
using "make config", a menu-based kernel configuration program invoked
by "make menuconfig" and an X11-based graphical configuration invoked
as "make xconfig". All three configuration methods offer on-line help.
</Para>
</Sect2>
<Sect2><Title>Creating Device Files and Setting Boot Time Parameters</Title>
<Para>
The kernel uses device files to identify which device driver to use.
If you are running a standard Linux distribution you may have created
the necessary device files during installation. Under Slackware
Linux, for example, there is a menu-based <Literal remap="tt">setup</Literal> tool that
includes CD-ROM setup, and most systems have a <Filename>/dev/MAKEDEV</Filename>
script. If you don't use these methods, you can use the more manual
procedure listed in this section. Even if you use either of these
methods, it is recommended that you at least verify the device files
against the information in this section.
</Para>
<Para>
If you are using the new devfs file system in the 2.4 kernels, the
device files are created dynamically by the kernel rather than
residing on disk, and follow a different naming convention. The
examples in this document assume that devfs is not being used, and may
need to be adjusted accordingly if you are.
</Para>
<Para>
You create the device file by running the shell commands indicated for
your drive type. This should be done as user <Literal remap="tt">root</Literal>. Note that
some Linux distributions may use slightly different CD-ROM device
names from those listed here.
</Para>
<Para>
I recommended that you also create a symbolic link to the CD-ROM
device to make it easier to remember. For example, for an IDE CD-ROM
drive that is the second device on the secondary interface, the link
would be created using
</Para>
<Para>
<Screen>
# ln -s /dev/hdd /dev/cdrom
</Screen>
</Para>
<Para>
If you want to play audio CDs, you will need to set the protection on
the device file (the real file, not the symbolic link to it) to allow
all users to read, e.g.
</Para>
<Para>
<Screen>
# chmod 664 /dev/hdd
# ls -l /dev/hdd
brw-rw-r-- 1 root disk 22, 64 Feb 4 1995 /dev/hdd
</Screen>
</Para>
<Para>
Some Linux distributions use group permissions to control access to
devices such as CD-ROMs. A common convention is to only allow members
of a group called cdrom to have access. In this case you should add
the appropriate users to the group rather than changing file
permissions on the device file.
</Para>
<Para>
When booting Linux, the device drivers attempt to determine whether
the appropriate devices are present, typically by probing specific
addresses. Many of the drivers auto-probe at several addresses, but
because of differences in configuration, possible device conflicts,
and hardware limitations, the drivers sometimes need help identifying
the addresses and other parameters. Most drivers support an option on
the kernel command line to pass this information to the device
driver. This can be done interactively, or more commonly, configured
into your boot loader. With LILO, for example, you would
add an <Literal remap="tt">append</Literal> command such as the following to your
<Filename>/etc/lilo.conf</Filename> file:
</Para>
<Para>
<Screen>
append = "sbpcd=0x230,SoundBlaster"
</Screen>
</Para>
<Para>
See the LILO documentation for more information.
</Para>
<Para>
In the next section I discuss issues specific to individual device
drivers, including device files, boot parameters, and the capabilities
of the different drivers. You probably only need to read the section
relevant to your drive type. The documentation files are usually found
in the directory <Filename>/usr/src/linux/Documentation/cdrom</Filename>.
</Para>
<Sect3><Title>Sbpcd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Eberhard Moenkeberg (emoenke@gwdg.de)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes (but not all drives)</entry></row>
<row><entry>Multiple drive support:</entry><entry>yes</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>yes (CR-562, CR-563, CD-200 only)</entry></row>
<row><entry>Auto-probing:</entry><entry>yes</entry></row>
<row><entry>Device file:</entry><entry>/dev/sbpcd, major 25</entry></row>
<row><entry>Configuration file:</entry><entry>sbpcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Matsushita/Panasonic CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>sbpcd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
sbpcd=&lt;io-address&gt;,&lt;interface-type&gt;
</Screen>
</Para>
<Para>
where the first parameter is the base address of the device
(e.g. 0x230), and &lt;interface-type&gt; is one of "SoundBlaster",
"LaserMate", or "SPEA". See the file <Filename>sbpcd.h</Filename> for hints on
what interface type to use. Using <Literal remap="tt">sbpcd=0</Literal> disables
auto-probing, disabling the driver.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/sbpcd b 25 0
</Screen>
</Para>
<Para>
Up to four drives per controller are supported. The next three drives
on the first controller would use minor device numbers 1 through 3.
If you have more than one controller, create devices with major
numbers 26, 27, and 28, up to a maximum of 4 controllers (this is 16
CD-ROM drives in total; hopefully enough for most users :-).
</Para>
<Para>
See the file <Filename>sbpcd</Filename> for more information on this
driver.
</Para>
<Para>
<Emphasis>If you recently bought a CD-ROM drive, don't assume that if it
connects to a SoundBlaster card it should use this kernel driver. Most
CD-ROM drives being sold by Creative Labs are now EIDE/ATAPI
drives.</Emphasis>
</Para>
</Sect3>
<Sect3><Title>Sonycdu535 Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Ken Pizzini (ken@halcyon.com)</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/sonycd535, major 24</entry></row>
<row><entry>Configuration file:</entry><entry>sonycd535.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Sony CDU535 CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>sonycd535</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
sonycd535=&lt;io-address&gt;
</Screen>
</Para>
<Para>
where &lt;io-address&gt; is the base address of the controller
(e.g. 0x320). Alternatively you can set the address in the file
<Filename>sonycd535.h</Filename> and compile it in.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/sonycd535 b 24 0
</Screen>
</Para>
<Para>
Some Linux distributions use <Filename>/dev/sonycd</Filename> for this device.
Older versions of the driver used major device number 21; make sure
your device file is correct.
</Para>
<Para>
This driver was previously distributed as a patch but is now part of
the standard kernel. See the file <Filename>sonycd535</Filename> for more
information on this driver.
</Para>
</Sect3>
<Sect3><Title>Cdu31a Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Corey Minyard (minyard@-rch.cirr.com)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>yes</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/cdu31a, major 15</entry></row>
<row><entry>Configuration file:</entry><entry>cdu31a.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Sony CDU31A/CDU33A CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>cdu31a</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
cdu31a=&lt;io-address&gt;,&lt;interrupt&gt;,PAS
</Screen>
</Para>
<Para>
The first number is the I/O base address of the card (e.g. 0x340). The
second is the interrupt number to use (0 means to use polled i/o). The
optional third parameter should be "PAS" if the drive is connected to
a Pro-Audio Spectrum 16 sound card, otherwise left blank.
</Para>
<Para>
If the driver is loaded as a module, it uses a slightly different
format. When loading the driver using the modprobe or insmod command,
the parameters take the form:
</Para>
<Para>
<Screen>
cdu31a_port=&lt;io-address&gt; cdu31a_irq=&lt;interrupt&gt;
</Screen>
</Para>
<Para>
The base io-address is required while the interrupt number is optional.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/cdu31a b 15 0
</Screen>
</Para>
<Para>
See the file <Filename>cdu31a</Filename> for more information on this
driver.
</Para>
</Sect3>
<Sect3><Title>Aztcd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Werner Zimmermann (zimmerma@rz.fht-esslingen.de)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/aztcd0, major 29</entry></row>
<row><entry>Configuration file:</entry><entry>aztcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>aztcd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
aztcd=&lt;io-address&gt;
</Screen>
</Para>
<Para>
where the parameter is the I/O base address of the card (e.g. 0x340).
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/aztcd0 b 29 0
</Screen>
</Para>
<Para>
Note that this driver is for the CDA268-01A only. Other models,
including the CDA268-03I and CDA269-031SE are not proprietary and
should use the IDECD (ATAPI) kernel driver.
</Para>
<Para>
See the file <Filename>aztcd</Filename> for more information on this driver.
</Para>
</Sect3>
<Sect3><Title>Gscd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)</entry></row>
<row><entry>Multi-session support:</entry><entry>no</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/gscd0, major 16</entry></row>
<row><entry>Configuration file:</entry><entry>gscd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Goldstar R420 CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>gscd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
gscd=&lt;io-address&gt;
</Screen>
</Para>
<Para>
specifying the I/O base address of the card (e.g. 0x340).
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/gscd0 b 16 0
</Screen>
</Para>
<Para>
See the file <Filename>gscd</Filename> for more information on this driver.
</Para>
</Sect3>
<Sect3><Title>Mcd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Martin (martin@bdsi.com)</entry></row>
<row><entry>Multi-session support:</entry><entry>no</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/mcd, major 23</entry></row>
<row><entry>Configuration file:</entry><entry>mcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Standard Mitsumi CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>mcd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This is the older driver for Mitsumi drivers that has been available
for some time. You might want to try the newer <Literal remap="tt">mcdx</Literal> driver,
which has some new features but is possibly less stable.
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
mcd=&lt;io-address&gt;,&lt;irq&gt;
</Screen>
</Para>
<Para>
specifying the I/O base address of the card (e.g. 0x340) and the IRQ
request number used.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/mcd b 23 0
</Screen>
</Para>
<Para>
See the file <Filename>mcd</Filename> for more information on this driver.
</Para>
</Sect3>
<Sect3><Title>Mcdx Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Heiko Schlittermann</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>yes</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no (not supported by hardware)</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/mcdx0, major 20</entry></row>
<row><entry>Configuration file:</entry><entry>mcdx.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Experimental Mitsumi support</entry></row>
<row><entry>Documentation file:</entry><entry>mcdx</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This is a newer driver for Mitsumi drivers. The older and possibly
more stable <Literal remap="tt">mcd</Literal> driver is still available.
</Para>
<Para>
This driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
mcdx=&lt;io-address&gt;,&lt;irq&gt;
</Screen>
</Para>
<Para>
specifying the I/O base address of the card (e.g. 0x340) and the IRQ
request number used.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/mcdx0 b 20 0
</Screen>
</Para>
<Para>
If you recently bought a Mitsumi CD-ROM drive, don't assume that it
should use this kernel driver. New Mitsumi drives are now EIDE/ATAPI
compatible and should use the idecd kernel driver instead.
</Para>
<Para>
See the file <Filename>mcdx</Filename> for more information on this driver.
</Para>
</Sect3>
<Sect3><Title>Cm206 Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>David A. van Leeuwen (david@tm.tmo.nl)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>yes</entry></row>
<row><entry>Device file:</entry><entry>/dev/cm206cd, major 32</entry></row>
<row><entry>Configuration file:</entry><entry>cm206.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Philips/LMS CM206 CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>cm206</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
The driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
cm206=&lt;io-address&gt;,&lt;interrupt&gt;
</Screen>
</Para>
<Para>
where the first number is the I/O base address of the card
(e.g. 0x340). The second is the interrupt channel.
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/cm206cd b 32 0
</Screen>
</Para>
<Para>
See the file <Filename>cm206</Filename> for more information on this
driver.
</Para>
</Sect3>
<Sect3><Title>Optcd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Leo Spiekman (spiekman@dutette.et.tudelft.nl)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/optcd0, major 17</entry></row>
<row><entry>Configuration file:</entry><entry>optcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Experimental Optics Storage ... CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>optcd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
The driver accepts a kernel command line of the form
</Para>
<Para>
<Screen>
optcd=&lt;io-address&gt;
</Screen>
</Para>
<Para>
to specify the I/O base address of the card (e.g. 0x340).
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/optcd0 b 17 0
</Screen>
</Para>
<Para>
See the file <Filename>optcd</Filename> for more information on this
driver.
</Para>
</Sect3>
<Sect3><Title>Sjcd Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Vadim V. Model (vadim@rbrf.msk.su)</entry></row>
<row><entry>Multi-session support:</entry><entry>no</entry></row>
<row><entry>Multiple drive support:</entry><entry>no</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>no</entry></row>
<row><entry>Device file:</entry><entry>/dev/sjcd, major 18</entry></row>
<row><entry>Configuration file:</entry><entry>sjcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Experimental Sanyo H94A CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>sjcd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
The driver accepts a kernel command line of the form:
</Para>
<Para>
<Screen>
sjcd=&lt;io-address&gt;,&lt;interrupt&gt;,&lt;dma&gt;
</Screen>
</Para>
<Para>
indicating the base address, interrupt, and DMA channel to be used
(e.g. sjcd=0x340,10,5).
</Para>
<Para>
The device file can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/sjcd b 18 0
</Screen>
</Para>
<Para>
See the file <Filename>sjcd</Filename> for more information on this driver.
</Para>
</Sect3>
<Sect3><Title>Paride Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Grant R. Guenther (grant@torque.net)</entry></row>
<row><entry>Multi-session support:</entry><entry>no</entry></row>
<row><entry>Multiple drive support:</entry><entry>yes</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>yes</entry></row>
<row><entry>Device file:</entry><entry>/dev/pcd0, major 46</entry></row>
<row><entry>Configuration file:</entry><entry>bpcd.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Parallel port IDE device support</entry></row>
<row><entry>Documentation file:</entry><entry>paride.txt</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This is the driver for various types of storage devices that attach to
a parallel port. Normally the driver will auto-detect the parallel
port device. The documentation describes parameters that can be used
to specify the device parameters if auto-detection does not work.
</Para>
<Para>
The device file for the first drive can be created using:
</Para>
<Para>
<Screen>
# mknod /dev/pcd0 b 46 0
</Screen>
</Para>
<Para>
See the file <Filename>/usr/src/linux/Documentation/paride.xt</Filename> for
more information on this driver. Note that this replaces the bpcd
driver that was present in older kernels.
</Para>
</Sect3>
<Sect3><Title>SCSI Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>David Giller</entry></row>
<row><entry>Multi-session support:</entry><entry>yes (depending on drive)</entry></row>
<row><entry>Multiple drive support:</entry><entry>yes</entry></row>
<row><entry>Loadable module support:</entry><entry>yes</entry></row>
<row><entry>Reading audio frames:</entry><entry>no</entry></row>
<row><entry>Auto-probing:</entry><entry>yes</entry></row>
<row><entry>Device file:</entry><entry>/dev/scd0, major 11</entry></row>
<row><entry>Configuration file:</entry><entry>cdrom.h</entry></row>
<row><entry>Kernel config option:</entry><entry>SCSI CDROM support</entry></row>
<row><entry>Documentation file:</entry><entry>scsi.txt</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
There are kernel command line option specific to each type of SCSI
controller. See the
<ULink URL="ftp://www.ibiblio.org/pub/Linux/docs/HOWTO/unmaintained/SCSI-HOWTO">SCSI HOWTO</ULink>
for more information.
</Para>
<Para>
Multiple drives are supported (up to the limit of the maximum number
of devices on the SCSI bus). Create device files with major number 11
and minor numbers starting at zero:
</Para>
<Para>
<Screen>
# mknod /dev/scd0 b 11 0
# mknod /dev/scd1 b 11 1
</Screen>
</Para>
<Para>
While the kernel driver itself does not support reading digital audio
frames, some SCSI drives have the capability and will work with the
cdda2wav program (which uses the generic SCSI kernel interface).
</Para>
<Para>
Also see the discussion of the IDE SCSI emulation driver
earlier in this document.
</Para>
</Sect3>
<Sect3><Title>IDECD Driver</Title>
<Para>
<informaltable frame=all>
<tgroup cols=2>
<tbody>
<row><entry>Principal author:</entry><entry>Scott Snyder (snyder@fnald0.fnal.gov)</entry></row>
<row><entry>Multi-session support:</entry><entry>yes</entry></row>
<row><entry>Multiple drive support:</entry><entry>yes</entry></row>
<row><entry>Loadable module support:</entry><entry>no</entry></row>
<row><entry>Reading audio frames:</entry><entry>yes (on supported drives)</entry></row>
<row><entry>Auto-probing:</entry><entry>yes</entry></row>
<row><entry>Device file:</entry><entry>/dev/hd{a,b,c,d}, major 22</entry></row>
<row><entry>Configuration file:</entry><entry>cdrom.h</entry></row>
<row><entry>Kernel config option:</entry><entry>Include support for IDE/ATAPI CDROMs</entry></row>
<row><entry>Documentation file:</entry><entry>ide-cd</entry></row>
</tbody>
</tgroup>
</informaltable>
</Para>
<Para>
This is the driver for ATAPI CD-ROMS. The driver accepts a kernel
command line of the form
</Para>
<Para>
<Screen>
hdx=cyls,heads,sects,wpcom,irq
or
hdx=cdrom
</Screen>
</Para>
<Para>
where <Literal remap="tt">hdx</Literal> can be any of &lcub;hda,hdb,hdc,hdd&rcub;, or simply hd, for
the "next" drive in sequence. Only the first three parameters are
required (cyls,heads,sects). For example <Literal remap="tt">hdc=1050,32,64
hdd=cdrom</Literal>.
</Para>
<Para>
Getting the IDE driver to recognize your CD-ROM drive can be tricky,
especially if you have more than 2 devices or more than one IDE
controller. Usually all that is required is to pass the right command
line options from LILO. The file
<Filename>/usr/src/linux/Documentation/cdrom/ide-cd</Filename> explains how to do
this. Read it carefully.
</Para>
<Para>
Recent Linux kernels have better support for multiple IDE devices. If
you have problems with an older kernel, upgrading may help.
</Para>
<Para>
Some IDE controllers have hardware problems which the kernel driver
can work around. You may need to pass additional parameters to the
driver to enable this. See the documentation for details.
</Para>
</Sect3>
</Sect2>
<Sect2><Title>Booting the Linux Kernel</Title>
<Para>
You can now reboot with the new kernel. Watch for a message such as
the following indicating that the CD-ROM has been found by the device
driver (the message will vary depending on the drive type):
</Para>
<Para>
<Screen>
hdd: TOSHIBA CD-ROM XM-7002B, ATAPI CD/DVD-ROM drive
</Screen>
</Para>
<Para>
If the bootup messages scroll by too quickly to read, you should be
able to retrieve them using <Literal remap="tt">dmesg</Literal> or <Literal remap="tt">tail
/var/log/messages</Literal>.
</Para>
<Para>
If the drive is not found, then a problem has occurred, See the
section on troubleshooting.
</Para>
</Sect2>
<Sect2><Title>Mounting, Unmounting, and Ejecting Devices</Title>
<Para>
To mount a CD-ROM, insert a disc in the drive, and run the
<Literal remap="tt">mount</Literal> command as <Literal remap="tt">root</Literal> (this assumes you created a
symbolic link to your device file as recommended above and that an
empty directory <Filename>/mnt/cdrom</Filename> exists):
</Para>
<Para>
<Screen>
# mount -t iso9660 -r /dev/cdrom /mnt/cdrom
</Screen>
</Para>
<Para>
The CD can now be accessed under the directory <Filename>/mnt/cdrom</Filename>.
</Para>
<Para>
There are other options to the mount command that you may
wish to use; see the <Literal remap="tt">mount(8)</Literal> man page for details.
</Para>
<Para>
You can add an entry to <Filename>/etc/fstab</Filename> to automatically mount a
CD-ROM when Linux boots or to specify parameters to use when it is
mounted; see the <Literal remap="tt">fstab(5)</Literal> man page.
</Para>
<Para>
Note that to play audio CDs you should <Emphasis>not</Emphasis> try to mount them.
</Para>
<Para>
To unmount a CD-ROM, use the <Literal remap="tt">umount</Literal> command as <Literal remap="tt">root</Literal>:
</Para>
<Para>
<Screen>
# umount /mnt/cdrom
</Screen>
</Para>
<Para>
The disc can only be unmounted if no processes are currently accessing
the drive (including having their default directory set to the mounted
drive). You can then eject the disc. Most drives have an eject button;
there is also a standalone
<ULink URL="http://www.pobox.com/~tranter/eject.html">eject</ULink>
program that allows ejecting CD-ROMs under software control.
</Para>
<Para>
Note that you should not eject a disc while it is mounted
(this may or may not be possible depending on the type of drive). Some
CD-ROM drivers can automatically eject a CD-ROM when it is unmounted
and insert the CD tray when a disc is mounted (you can turn this
feature off when compiling the kernel or by using a software command).
</Para>
<Para>
Its possible that after playing an audio CD you may not be able to
mount a CD-ROM. You need to send a CD audio "stop" command (using a CD
player program) before trying the mount. This problem only appears to
occur with the SBPCD driver.
</Para>
<Para>
Recent kernels support a kernel-based automounter which
provides transparent mounting of removable media including CD-ROM. You
can find the tools needed to use it at
<ULink URL="ftp://ftp.kernel.org/pub/linux/daemons/autofs/">
ftp://ftp.kernel.org/pub/linux/daemons/autofs/</ULink>.
</Para>
</Sect2>
<Sect2><Title>Troubleshooting</Title>
<Para>
If you still encounter problems after following the instructions in
the HOWTO, here are some things to check. The checks are listed in
increasing order of complexity. If a check fails, solve the problem
before moving to the next stage.
</Para>
<Sect3><Title>Step 1: Make sure you are really running the kernel you compiled</Title>
<Para>
You can check the date stamp on the kernel to see if you are running
the one that you compiled with CD-ROM support. You can do this
with the <Literal remap="tt">uname</Literal> command:
</Para>
<Para>
<Screen>
% uname -a
Linux moe 2.4.4 #1 Sat Apr 28 10:30:45 EDT 2001 i686 unknown
</Screen>
</Para>
<Para>
or by displaying the file <Filename>/proc/version</Filename>:
</Para>
<Para>
<Screen>
% cat /proc/version
Linux version 2.4.4 (root@moe) (gcc version 2.95.2 20000220 (Debian GNU/Linux)) #1 Sat Apr 28 10:30:45 EDT 2001
</Screen>
</Para>
<Para>
If the date stamp doesn't match when you compiled the kernel, then you
are running an old kernel. Did you remember to reboot? If you use
LILO, did you re-install it (typically by running
<Filename>/sbin/lilo</Filename>)? If booting from floppy, did you create a new
boot floppy and use it when booting?
</Para>
</Sect3>
<Sect3><Title>Step 2: Make sure the proper kernel drivers are compiled in</Title>
<Para>
You can see what drivers are compiled in by looking at
<Filename>/proc/devices</Filename>:
</Para>
<Para>
<Screen>
% cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 ttyS
5 cua
7 vcs
Block devices:
3 ide0
22 ide1
</Screen>
</Para>
<Para>
First look for your CD-ROM device driver. These are all block devices,
in this case we can see that the <Literal remap="tt">idecd</Literal> driver with major
number 22 was present.
</Para>
<Para>
Also make sure that ISO-9660 filesystem support was compiled in, by
looking at <Filename>/proc/filesystems</Filename>:
</Para>
<Para>
<Screen>
% cat /proc/filesystems
ext2
nodev proc
nodev devpts
vfat
iso9660
</Screen>
</Para>
<Para>
You can also see what i/o port addresses are being used by a driver
with the file <Filename>/proc/ioports</Filename>:
</Para>
<Para>
<Screen>
howto % cat /proc/ioports
...
0230-0233 : sbpcd
...
</Screen>
</Para>
<Para>
If any of the drivers you thought you compiled in are not displayed,
then something went wrong with the kernel configuration or
build. Start the installation process again, beginning with
configuration and building of the kernel.
</Para>
</Sect3>
<Sect3><Title>Step 3: Did the kernel detect your drive during booting?</Title>
<Para>
Make sure that the CD-ROM device was detected when the kernel
booted. You should have seen a message on bootup. If the messages
scrolled off the screen, you can usually recall them using the
<Literal remap="tt">dmesg</Literal> command:
</Para>
<Para>
<Screen>
% dmesg
</Screen>
</Para>
<Para>
or
</Para>
<Para>
<Screen>
% tail /var/log/messages
</Screen>
</Para>
<Para>
If your drive was not found then something is wrong. Make sure it is
powered on and all cables are connected. If your drive has hardware
jumpers for addressing, check that they are set correctly (e.g. drive
0 if you have only one drive). ATAPI CD-ROMS must be jumpered as
"single" or "master", and not "slave" when only one IDE device is
attached to an interface. If the drive works under DOS then you can be
reasonably confident that the hardware is working.
</Para>
<Para>
Many kernel drivers using auto-probing, but some do not,
and in any case the probing is not always reliable. Use the kernel
command line option listed for your kernel driver type. You may want
to try several different values if you are not sure of the i/o address
or other parameters. LILO can be (and usually is) configured to allow
you to enter the parameters manually when booting.
</Para>
<Para>
Another possibility is that you used the wrong kernel driver for your
CD-ROM driver. Some documentation may refer to proprietary interfaces
as IDE, leading some to mistakenly believe they are ATAPI drives.
</Para>
<Para>
Another possibility is that your drive (or interface card) is one of
the "compatible" type that requires initialization by the DOS
driver. Try booting DOS and loading the vendor supplied DOS device
driver. Then soft boot Linux using <Literal remap="tt">Control-Alt-Delete</Literal>.
</Para>
<Para>
If your drive is not listed in this document, it is possible that
there are no drivers for it available under Linux. You can check with
some of the references listed at the end of this document for
assistance.
</Para>
</Sect3>
<Sect3><Title>Step 4: Can you read data from the drive?</Title>
<Para>
Try reading from the CD-ROM drive. Typing the following command should
cause the drive activity light (if present) to come on and no errors
should be reported. Use whatever device file is appropriate for your
drive and make sure a CD-ROM is inserted; use Control-C to exit.
</Para>
<Para>
<Screen>
# dd if=/dev/cdrom of=/dev/null bs=2048
^C
124+0 records in
124+0 records out
</Screen>
</Para>
<Para>
If this works, then the kernel is communicating with the drive and you
can move on to step 5.
</Para>
<Para>
If not, then a possible cause is the device file. Make sure than the
device file in the <Filename>/dev</Filename> directory has the correct major and
minor numbers as listed previously for your drive type. Check that the
permissions on the device file allow reading and writing.
</Para>
<Para>
A remote possibility is a hardware problem. Try testing the drive
under another operating system, if possible, to determine if this
could be the case.
</Para>
</Sect3>
<Sect3><Title>Step 5: Can you mount the drive?</Title>
<Para>
If you can read from the drive but cannot mount it, first
verify that you compiled in ISO-9660 file system support by reading
<Filename>/proc/filesystems</Filename>, as described previously.
</Para>
<Para>
Make sure you are mounting the drive with the "-t iso9660" and "-r"
options and that a known good ISO-9660 CD-ROM (not Audio CD) is
inserted in the drive. You normally must mount drives as user
<Literal remap="tt">root</Literal>.
</Para>
<Para>
Make sure that the mount point exists and is an empty directory.
</Para>
<Para>
If you are automatically mounting the CD-ROM on bootup, make sure that
you have correct entries in the <Filename>/etc/fstab</Filename> file.
</Para>
<Para>
If you are running the syslog daemon, there may be error messages from
the kernel that you are not seeing. Try using the "dmesg" command:
</Para>
<Para>
<Screen>
% dmesg
SBPCD: sbpcd_open: no disk in drive
</Screen>
</Para>
<Para>
There may also be errors logged to files in <Filename>/var/log</Filename>,
depending on how your system is configured.
</Para>
</Sect3>
<Sect3><Title>Debugging Audio Problems</Title>
<Para>
If the drive works with CD-ROMs, but not for playing audio CDs, here
are some possible solutions.
</Para>
<Para>
You need an application program to play audio CDs. Some applications
may be broken or may not be compatible with your drive. Try other
applications and/or try recompiling them yourself. A good place
to look for software is
<ULink URL="ftp://www.ibiblio.org/pub/Linux/apps/sound/cdrom/">
ftp://www.ibiblio.org/pub/Linux/apps/sound/cdrom/</ULink>.
</Para>
<Para>
A few of the CD-ROM drivers do not support playing Audio CDs. Check
the documentation file or source code to see if that is the case.
</Para>
<Para>
Check if the audio can be played through the headphone jack. If so,
then the problem is likely related to your sound card. Use a mixer
program to set the input device and volume levels. Make sure you have
installed an audio cable from the CD-ROM drive to the sound card. Make
sure that the kernel sound card driver is installed and working (see the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Sound-HOWTO.html">Sound HOWTO</ULink>).
</Para>
</Sect3>
<Sect3><Title>When All Else Fails</Title>
<Para>
If you still have problems, here are some final suggestions for things
to try:
<ItemizedList>
<ListItem>
<Para>
carefully re-read this HOWTO document
</Para>
</ListItem>
<ListItem>
<Para>
read the references listed at the end of this document,
especially the relevant kernel source files
</Para>
</ListItem>
<ListItem>
<Para>
post a question to one of the <Literal remap="tt">comp.os.linux</Literal> or
other Usenet newsgroups
</Para>
</ListItem>
<ListItem>
<Para>
send a question to the Linux mailing list
</Para>
</ListItem>
<ListItem>
<Para>
try using the latest Linux kernel
</Para>
</ListItem>
<ListItem>
<Para>
contact your computer dealer
</Para>
</ListItem>
<ListItem>
<Para>
contact the CD-ROM manufacturer
</Para>
</ListItem>
<ListItem>
<Para>
send mail to the maintainer of the relevant kernel driver (look in
the file <Filename>/usr/src/linux/MAINTAINERS</Filename>)
</Para>
</ListItem>
<ListItem>
<Para>
send mail to me
</Para>
</ListItem>
<ListItem>
<Para>
fire up emacs and type <Literal remap="tt">Esc-x doctor</Literal> :-)
</Para>
</ListItem>
</ItemizedList>
</Para>
</Sect3>
</Sect2>
</Sect1>
<Sect1><Title>Applications</Title>
<Para>
This section briefly lists a few of the many applications
related to CD-ROM that are available under Linux. Check the Linux
Software Map for the latest versions and archive sites.
</Para>
<Sect2><Title>Audio CD Players</Title>
<Para>
Several programs are available for playing audio CDs,
either through a headphone jack or an attached sound card.
</Para>
<Para>
<VariableList>
<VarListEntry>
<Term>kscd</Term>
<ListItem>
<Para>
A graphical CD player included as part of the KDE desktop environment.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>gtcd</Term>
<ListItem>
<Para>
A graphical CD player included as part of the GNOME desktop environment.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Workman</Term>
<ListItem>
<Para>
a graphical player running under X11 and supporting
a CD database and many other features
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>WorkBone</Term>
<ListItem>
<Para>
an interactive text-mode player
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>xcdplayer</Term>
<ListItem>
<Para>
a simple X11 based player
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>cdplayer</Term>
<ListItem>
<Para>
a very simple command line based player
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Xmcd</Term>
<ListItem>
<Para>
an X11/Motif based player
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>xmitsumi</Term>
<ListItem>
<Para>
another X11 based player for Mitsumi drives
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>xplaycd</Term>
<ListItem>
<Para>
another X11 based player, bundled with sound mixer
and VU meter programs
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>cdtool</Term>
<ListItem>
<Para>
command line tools for playing audio CDs
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</Para>
<Para>
Some of these programs are coded to use a specific device file for the
CD-ROM (e.g. <Filename>/dev/cdrom</Filename>). You may be able to pass the correct
device name as a parameter, or you can create a symbolic link in the
<Filename>/dev</Filename> directory. If sending the CD output to a sound card, you
may wish to use a mixer program to set volume settings or select the
CD-ROM input for recording.
</Para>
</Sect2>
<Sect2><Title>PhotoCD</Title>
<Para>
PhotoCDs use an ISO-9660 file system containing image files
in a proprietary format. Not all CD-ROM drives support reading
PhotoCDs.
</Para>
<Para>
The <Literal remap="tt">hpcdtoppm</Literal> program by Hadmut Danisch converts PhotoCD
files to the portable pixmap format. It can be obtained from
<ULink URL="ftp://ftp.gwdg.de/pub/linux/hpcdtoppm">
ftp://ftp.gwdg.de/pub/linux/hpcdtoppm</ULink>
or as part of the PBM (portable bit map) utilities, available on many
archive sites (look for "pbm" or "netpbm").
</Para>
<Para>
The <Literal remap="tt">photocd</Literal> program by Gerd Knorr
(<ULink URL="mailto:kraxel@cs.tu-berlin.de">kraxel@cs.tu-berlin.de</ULink>)
can convert PhotoCD images into Targa or Windows and OS/2 bitmap
files.
</Para>
<Para>
The same author has written the program <Literal remap="tt">xpcd</Literal>, an X11-based
program for handling PhotoCD images. You can select the images with a
mouse, preview the image in a small window, and load the image with
any of the five possible resolutions. You can also mark a part of the
Image and load only the selected part. Look for these packages at
<ULink URL="ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/">
ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/</ULink>.
</Para>
<Para>
The ImageMagick image file manipulation program also supports PhotoCD
files. It is available from
<ULink URL="ftp://ftp.x.org/contrib/applications/ImageMagick/">
ftp://ftp.x.org/contrib/applications/ImageMagick/</ULink>.
</Para>
</Sect2>
<Sect2><Title>Mkisofs</Title>
<Para>
Eric Youngdale's <Literal remap="tt">mkisofs</Literal> package allows creating an ISO-9660
file system on a hard disk partition. This can then be used to assist
in creating and testing CD-ROM file systems before mastering discs.
</Para>
</Sect2>
<Sect2><Title>ISO-9660 Utilities</Title>
<Para>
These are some utilities for verifying the format of ISO-9660
formatted discs; you may find them useful for testing suspect CDs. The
package can be found at
<ULink URL="ftp://ftp.cdrom.com/pub/unixfreeware/archive/">
ftp://ftp.cdrom.com/pub/unixfreeware/archive/</ULink>. They were
written by Bill Siegmund and Rich Morin.
</Para>
</Sect2>
</Sect1>
<Sect1><Title>Answers to Frequently Asked Questions</Title>
<Sect2><Title>How can a non-root user mount and unmount discs?</Title>
<Para>
Most <Literal remap="tt">mount</Literal> commands support the <Emphasis>user</Emphasis> option. If you
make an entry such as the following in <Filename>/etc/fstab</Filename>:
</Para>
<Para>
<Screen>
/dev/sbpcd /mnt/cdrom iso9660 user,noauto,ro
</Screen>
</Para>
<Para>
then an ordinary user will be allowed to mount and unmount the drive
using these commands:
</Para>
<Para>
<Screen>
% mount /mnt/cdrom
% umount /mnt/cdrom
</Screen>
</Para>
<Para>
By default the disc will be mounted with some options that help
enforce security (e.g. programs cannot executed, device files are
ignored). If this is too restrictive you can use additional options
(e.g. the "exec" option will enable execution or programs). See the
mount(8) man page for details.
</Para>
<Para>
Another method is to get the <Literal remap="tt">usermount</Literal> package which allows
non-root users to mount and unmount removable devices such as floppies
and CD-ROMs, but restricts access to other devices (such as hard disk
partitions). It is available on major archive sites.
</Para>
<Para>
Yet another option is to use the <Literal remap="tt">sudo</Literal> program
which allows users to run selective programs with root privileges.
</Para>
</Sect2>
<Sect2><Title>Why do I get device is busy when unmounting a CD-ROM?</Title>
<Para>
The disc cannot be unmounted if any processes are accessing the drive,
including having their default directory set to the mounted
filesystem. If you cannot identify the processes using the disc, you
can use the <Literal remap="tt">fuser</Literal> command, as shown in the following example.
</Para>
<Para>
<Screen>
% umount /cdrom
umount: /dev/hdd: device is busy
% fuser -v /cdrom
USER PID ACCESS COMMAND
/mnt/cdrom tranter 133 ..c.. bash
</Screen>
</Para>
<Para>
On some systems you may need to be root when running the
<Literal remap="tt">fuser</Literal> command in order to see the processes of other users.
</Para>
</Sect2>
<Sect2><Title>How do I export a CD-ROM to other hosts over NFS?</Title>
<Para>
You need to add an entry to the <Filename>/etc/exports</Filename> file. Users on
other machines will then be able to mount the device. See the
<Literal remap="tt">exports(5)</Literal> man page for details.
</Para>
</Sect2>
<Sect2><Title>Can I boot Linux from a CD-ROM?</Title>
<Para>
Most Linux distributions support directly booting a Linux kernel from
CD as an alternative to a boot floppy. This requires a bootable CD and
ROM BIOS and CD-ROM drive which supporting booting from CD.
</Para>
<Para>
The latest version of <Literal remap="tt">mkisofs</Literal>
supports creating such disks using the El Torito standard for bootable
CDs.
</Para>
</Sect2>
<Sect2><Title>How can I read digital data from audio CDs?</Title>
<Para>
Heiko Eissfeldt (<ULink URL="mailto:heiko@colossus.escape.de">heiko@colossus.escape.de</ULink>)
and Olaf Kindel have written a
utility that reads audio data and saves it as <Literal remap="tt">.wav</Literal> format
sound files. The package is called <Literal remap="tt">cdda2wav.tar.gz</Literal> and can be
found on <Literal remap="tt">www.ibiblio.org</Literal>.
</Para>
<Para>
Another utility to extract digital audio is <Literal remap="tt">cdparanoia</Literal>
available from
<ULink URL="http://www.xiph.org/paranoia/">http://www.xiph.org/paranoia</ULink>.
</Para>
<Para>
Because CD-ROM drives are changing very quickly, it is difficult to
list which models support reading digital data. Your best
bet is to get the latest <Literal remap="tt">cdda2wav</Literal> or <Literal remap="tt">cdparanoia</Literal>
package and read the documentation.
</Para>
<Para>
For more information on this subject, see the web site
<ULink URL="http://www.tardis.ed.ac.uk/~psyche/cdda/">http://www.tardis.ed.ac.uk/~psyche/cdda/</ULink>
and the alt.cd-rom FAQ listed in the references section.
</Para>
</Sect2>
<Sect2><Title>Why doesn't the find command work properly?</Title>
<Para>
On ISO-9660 formatted discs without the Rock Ridge Extensions, you
need to add the <Literal remap="tt">-noleaf</Literal> option to the <Literal remap="tt">find</Literal> command.
See the find(1) man page for details.
</Para>
<Para>
(In my experience virtually all recent Linux CDs use the Rock Ridge
extensions, so this problem should occur very rarely.)
</Para>
</Sect2>
<Sect2><Title>Does Linux support any recordable CD-ROM drives?</Title>
<Para>
Linux supports most CD-R and CD-RW drives. The cdrecord and mkisofs
tools can be used to burn CDs, there are also many graphical
front-ends to these tools. For more information see the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/CD-Writing-HOWTO.html">
Linux CD-Writing HOWTO</ULink>.
</Para>
</Sect2>
<Sect2><Title>Why do I get mount: Read-only file system when mounting a CD-ROM?</Title>
<Para>
CD-ROM is a read-only media. With some early kernels you could mount a
CD-ROM for read/write; attempts to write data to the CD would simple
be ignored. As of kernel version 1.1.33 this was corrected so that
CD-ROMs must be mounted read only (e.g. using the -r option to mount).
</Para>
</Sect2>
<Sect2><Title>Why does the disc tray open when I shut down the system?</Title>
<Para>
The sbpcd driver supports automatically ejecting the CD when it is
unmounted. In some older kernel versions this was the default
behaviour. If you shut down the system, a mounted CD will be
unmounted, causing it to eject.
</Para>
<Para>
This feature is for convenience when changing discs. If the tray is
open when you mount or read a CD, it will also automatically be
closed.
</Para>
<Para>
I found that this caused problems with a few programs (e.g. cdplay and
workbone). As of the 1.1.60 kernel you can control this feature under
software control. A sample program is included in the sbpcd
documentation file (or use the
<ULink URL="http://www.pobox.com/~tranter/eject.html">eject</ULink> program).
You can also control the default behaviour by editing the kernel
source file <Filename>sbpcd.h</Filename>.
</Para>
</Sect2>
<Sect2><Title>I have a "special" CD that can't be mounted</Title>
<Para>
If you have a particular disc that cannot be mounted, here are some
possible reasons:
<OrderedList>
<ListItem>
<Para>
It is an XA, CD-R, or CD-RW disc and your drive or the Linux driver
does not support reading these discs (this is only likely for very old
drives).
</Para>
</ListItem>
<ListItem>
<Para>
It is a DVD disc, which is only readable by a DVD-ROM drive.
</Para>
</ListItem>
<ListItem>
<Para>
The disc doesn't use an ISO-9660 file system (e.g. some use
SunOS or HFS).
</Para>
</ListItem>
<ListItem>
<Para>
It is an audio CD.
</Para>
</ListItem>
<ListItem>
<Para>
The CD is damaged or defective.
</Para>
</ListItem>
<ListItem>
<Para>
You put it in the drive upside down :-)
</Para>
</ListItem>
</OrderedList>
</Para>
</Sect2>
<Sect2><Title>Do multi-platter CD-ROM drives work with Linux?</Title>
<Para>
Several users have reported success with SCSI multi-disc CD-ROM
changers. You probably need to enable the "Probe all LUNs on each
SCSI device" kernel configuration option (this is not necessary if
your CD changer is already known to the SCSI-driver. Have a look at
<Filename>/usr/src/linux/drivers/scsi.c</Filename>).
</Para>
<Para>
At least one user also had to increase a SCSI timeout value in the
kernel driver. A symptom of this is an error message like "wrong fs
type, bad option, bad superblock on /dev/sr5, or too many mounted file
systems" when trying to mount a CD for the first time, but a second
mount immediately afterwards succeeds. To increase the timeout
increase the value of IOCTL&lowbar;TIMEOUT at the beginning of
<Filename>/usr/src/linux/drivers/scsi/sr&lowbar;ioctl.c</Filename> and recompile the
kernel. A value of 10000 instead of the default 3000 is reported to
work with a NEC Multispin 4Xc.
</Para>
<Para>
It might be necessary to create additional block special files, so
that all LUNs can be accessed. A device file is needed for every
LUN. So for a 7 disc changer <Literal remap="tt">/dev/sr0</Literal> to <Literal remap="tt">/dev/sr6</Literal>
are needed (more if you have additional SCSI CD-ROM drives). To create
the block special file execute <Literal remap="tt">mknod /dev/sr? b 11 ?</Literal> as root
with ? being the required number.
</Para>
<Para>
The Nakamichi MBR-7 7 disc changer, NEC Multispin 4Xc and Pioneer 12
disc changer have been reported to work.
</Para>
<Para>
EIDE/ATAPI multi-disc changers are also available. The kernel has
support for some drives using the CDROM&lowbar;SELECT&lowbar;DISC ioctl
function. The IDE-CD kernel driver documentation file includes source
code for a program to select changer slots, or you can use various
utilities such as the <Literal remap="tt">eject</Literal> program described earlier.
</Para>
</Sect2>
<Sect2><Title>I get "/cdrom: Permission denied" errors</Title>
<Para>
Some CDs have root directory file permissions that only allow user
<Literal remap="tt">root</Literal> to read them. This is an error on the part of the CD-ROM
vendor and is a real inconvenience. A more common occurrence is for
certain files or directories not to be world readable. Some people
have patched their kernels to work around the problem.
</Para>
<Para>
Also see the related question on hidden files later in this document.
</Para>
</Sect2>
<Sect2><Title>How do I interpret IDE CD kernel error messages?</Title>
<Para>
What does it mean when I get a kernel message from the IDE CD-ROM
driver like "hdxx: code: xx key: x asc: xx ascq: x"?
</Para>
<Para>
This is an status/error message from the IDE CD-ROM drive. By default
the IDECD driver prints out the raw information instead of wasting
kernel space with error messages. You can change the default to
display the actual error messages by going into
<Filename>/usr/src/linux/drivers/block/ide-cd.c</Filename>, changing the value of
VERBOSE&lowbar;IDE&lowbar;CD&lowbar;ERRORS to 1, and recompiling the kernel.
</Para>
</Sect2>
<Sect2><Title>How can I tell what speed CD-ROM I have?</Title>
<Para>
Here's one way. This command measures how long is takes to read 1500K
of data from CD:
</Para>
<Para>
<Screen>
% time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
1500+0 records in
1500+0 records out
real 5.24
user 0.03
sys 5.07
</Screen>
</Para>
<Para>
The transfer rate of single speed drives is 150 kilobytes
per second, which should take about 10 seconds. At double speed it
would take five seconds, quad speed would take 2.5, etc.
</Para>
<Para>
The "real" time above is probably the best number to look at -- in
this case it indicates a double speed drive. You can increase the
amount of data transferred to get a more accurate value (the data does
not get cached). You should probably run the command a few times and
take the average.
</Para>
<Para>
I've also written a small C program that measures and reports CD-ROM
data transfer rate; I can send it to you on request.
</Para>
</Sect2>
<Sect2><Title>My CD-ROM stopped working after Linux was installed</Title>
<Para>
The usual symptom is that the boot disk used to initially install
Linux recognized your CD-ROM drive, but after Linux was installed on
the hard drive or floppy and rebooted it no longer recognizes the
CD-ROM.
</Para>
<Para>
The most common reason for this problem is that with some Linux
distributions the kernel that is installed on your hard drive (or
floppy) is not necessarily the same one that was on your boot
disk. You selected a boot disk that matched your CD-ROM hardware,
while the kernel you installed is a "generic" kernel that is lacking
CD-ROM support. You can verify this by following the troubleshooting
guidelines discussed previously in this document (e.g. start by
checking <Filename>/proc/devices</Filename>).
</Para>
<Para>
The solution is to recompile the kernel, ensuring that the drivers for
your CD-ROM drive and any others that are needed (e.g. SCSI
controller, ISO-9660 file system) are included. See the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ULink>
if you don't know how to do this.
</Para>
<Para>
If you passed any command line options to the boot disk
(e.g. "hdc=cdrom") you need to add these to your boot program
configuration file (typically /etc/lilo.conf).
</Para>
</Sect2>
<Sect2><Title>There are "hidden" files on a CD which I can't read</Title>
<Para>
Some CDs have files with the "hidden" bit set on them. Normally these
files are not visible. If you mount the CD with the "unhide" option
then the files should be accessible (this doesn't seem to be
documented anywhere).
</Para>
</Sect2>
<Sect2><Title>Where is the CD-ROM API documented?</Title>
<Para>
If you want to write your own application, such as an audio CD player
program, you will need to understand the application programming
interface (API) provided by Linux.
</Para>
<Para>
Originally the CD-ROM kernel drivers used their own ioctl() functions
to support features specific to each drive. Header files such as
<Filename>/usr/include/linux/sbpcd.h</Filename> describe these. Because many of
the drivers were based on other drivers, the interfaces, while not
identical, have a lot in common.
</Para>
<Para>
More recently there has been an initiative headed by David van Leeuwen
(<ULink URL="mailto:david@tm.tno.nl">david@tm.tno.nl</ULink>) to
standardize the API for CD-ROM drives, putting common code
in one place and ensuring that all drivers exhibit the same behaviour.
This is documented in the file
<Filename>/usr/src/linux/Documentation/cdrom/cdrom-standard.tex</Filename>.
Several kernel drivers support this. As of the 2.0 kernel all CD-ROM
drivers conform to this API.
</Para>
<Para>
My book, <Emphasis>Linux Multimedia Guide</Emphasis>, goes into quite a bit of
detail on how to program CD-ROM drives, especially for audio
functions. See the end of the References section.
</Para>
</Sect2>
<Sect2><Title>Why don't I see long filenames on this Windows CD-ROM?</Title>
<Para>
If you have a CD-ROM which has long filenames under Windows
but not under Linux, it may be formatted using Microsoft's proprietary
Joliet filesystem. See the next question for a solution.
</Para>
</Sect2>
<Sect2><Title>Is Microsoft's Joliet filesystem supported?</Title>
<Para>
Microsoft has created an extension to the ISO CD-ROM format called
Joliet. It allows for long filenames encoded using the
16-bit UNICODE format.
</Para>
<Para>
Starting with version 2.0.34 the Linux kernel has support for the
Microsoft Joliet file system extensions. You need to enable support
for it in the kernel.
</Para>
<Para>
If you want to display filenames with native language characters from
Joliet CD-ROMs correctly on the screen, you need to enable support in
the kernel for the appropriate NLS ISO8859 character sets.
</Para>
</Sect2>
<Sect2><Title>Does Linux support "enhanced" CDs?</Title>
<Para>
Some audio CDs are "enhanced" with additional data. Typically you
will find that these CDs have the usual audio CD tracks as well as a
data track which can be mounted as an ISO-9660 file system.
</Para>
<Para>
An enhanced CD I examined had Microsoft Windows and Apple Macintosh
applications on it (which won't run directly under Linux of course,
although I had partial success running the Windows application under
the WINE Windows emulator). There were some GIF images which could be
viewed using a standard viewer such as <Literal remap="tt">xv</Literal> and some animations
in Apple QuickTime format which could be viewed using the
<Literal remap="tt">xanim</Literal> program. It was a multi-session disk which some very old
CD-ROM drives do not support reading. On the disc was a
<Literal remap="tt">readme.txt</Literal> file containing an Enhanced CD FAQ.
</Para>
</Sect2>
<Sect2><Title>Does Linux support DVD-ROM?</Title>
<Para>
SCSI and ATAPI compliant DVD-ROM drives should work under Linux for
reading discs formatted with an ISO-9660 file system. In other words
they will work as a (possibly large) CD-ROM drive.
</Para>
<Para>
Many DVD-ROM discs use the UDF file system. Recent kernels have UDF
filesystem support.
</Para>
<Para>
A number of Linux MPEG-2 DVD players are available. For more
information see the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/DVD-Playing-HOWTO.html">DVD Playing HOWTO</ULink>.
</Para>
</Sect2>
<Sect2><Title>Does Linux support CD-RW?</Title>
<Para>
SCSI and ATAPI compliant CD-RW drives work under Linux for discs
formatted with an ISO-9660 or UDF file system. This includes the
ability to write to the disc. Utilities such as cdrecord can be used
to erase a disc.
</Para>
</Sect2>
<Sect2><Title>How do I mount a multi-session disc?</Title>
<Para>
You mount a multi-session disc like any other CD-ROM. The normal
behaviour for multi-session support is that the
<Emphasis>last</Emphasis> session will be seen when you mount the
disc. You will not see multiple partitions. If it does not work it
could be for three reasons:
<OrderedList>
<ListItem>
<Para>
Your CD-ROM drive does not support reading multi-session CDs (it would
probably have to be quite old for this to be the case).
</Para>
</ListItem>
<ListItem>
<Para>
The Linux kernel driver for your CD-ROM type does not support
multi-session (mostly only some old proprietary, non-IDE/ATAPI
and non-SCSI drives fall into this category).
</Para>
</ListItem>
<ListItem>
<Para>
If you are mounting a CD with a file system other than ISO-9660, then
multi-session may not be supported.
</Para>
</ListItem>
</OrderedList>
</Para>
</Sect2>
<Sect2><Title>How do I read a CD volume label?</Title>
<Para>
There is a small utility called <Literal remap="tt">volname</Literal>
included with recent versions of the <Literal remap="tt">eject</Literal> program.
Alternatively you can run this shell command:
</Para>
<Para>
<Screen>
dd if=/dev/cdrom bs=1 skip=32808 count=32
</Screen>
</Para>
<Para>
assuming /dev/cdrom is the device file name for your drive.
</Para>
</Sect2>
<Sect2><Title>My IDE CD-R or CD-RW drive is not working with Linux</Title>
<Para>
You need to use the IDE SCSI emulation driver for writable drives.
See the
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/CD-Writing-HOWTO.html">
Linux CD-Writing HOWTO</ULink> for more information.
</Para>
</Sect2>
<Sect2><Title>Is the <Emphasis>insert your brand/model here</Emphasis> IDE CD-ROM drive supported?</Title>
<Para>
Yes, of course it is. Linux supports the IDE interface used by all
modern IDE CD-ROM drives. It has been like this since kernel version
1.1.85.
</Para>
</Sect2>
<Sect2><Title>I can't seem to find a driver for my IDE drive in the kernel source?</Title>
<Para>
Unlike for the older proprietary drives, there isn't a specific driver
for each model of ATAPI/IDE CD-ROM drives. All drives conforming to
the standard should work with the ATAPI CD-ROM driver included in the
standard Linux kernel.
</Para>
</Sect2>
<Sect2><Title>I'm having problems with my CD-ROM on Red Hat 7.1</Title>
<Para>
You may be running into an issue with hardware that does not support
DMA (Direct Memory Access). RedHat ships a highly tuned version of the
Linux kernel which enables DMA on selected IDE controller chipsets.
Information on this issue can be found at
<ULink URL="http://www.exocore.com/linux/rhl71dma/">http://www.exocore.com/linux/rhl71dma/</ULink>
</Para>
</Sect2>
</Sect1>
<Sect1><Title>References</Title>
<Para>
I have already mentioned the documentation files, typically installed in
<Filename>/usr/src/linux/Documentation/cdrom</Filename>. These can be a gold mine
of useful information.
</Para>
<Para>
The following Usenet FAQs are posted
periodically to <ULink URL="news:news.answers">news.answers</ULink>
and archived at Internet FTP sites such as
<ULink URL="ftp://rtfm.mit.edu/">ftp://rtfm.mit.edu/</ULink>.
<ItemizedList>
<ListItem>
<Para>
alt.cd-rom FAQ
</Para>
</ListItem>
<ListItem>
<Para>
comp.periphs.scsi FAQ
</Para>
</ListItem>
<ListItem>
<Para>
Enhanced IDE/Fast-ATA/ATA-2 FAQ
</Para>
</ListItem>
</ItemizedList>
Several other Linux HOWTOs have useful information relevant to CD-ROM:
<ItemizedList>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/pub/Linux/docs/HOWTO/unmaintained/SCSI-HOWTO">Linux SCSI HOWTO</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Hardware-HOWTO.html">Hardware Compatibility HOWTO</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Sound-HOWTO.html">Sound HOWTO</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/Distribution-HOWTO.html">Distribution HOWTO</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="http://www.ibiblio.org/LDP/HOWTO/CD-Writing-HOWTO.html">CD Writing HOWTO</ULink>
</Para>
</ListItem>
</ItemizedList>
At least a dozen companies sell Linux distributions on CD-ROM; most of
them are listed in the Distribution HOWTO.
</Para>
<Para>
The following Usenet news groups cover CD-ROM related topics:
<ItemizedList>
<ListItem>
<Para>
<ULink URL="news:comp.publish.cdrom.hardware">comp.publish.cdrom.hardware</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="news:comp.publish.cdrom.multimedia">comp.publish.cdrom.multimedia</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="news:comp.publish.cdrom.software">comp.publish.cdrom.software</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="news:comp.sys.ibmpc.hardware.cd-rom">comp.sys.ibm.pc.hardware.cd-rom</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="news:alt.cd-rom">alt.cd-rom</ULink>
</Para>
</ListItem>
<ListItem>
<Para>
<ULink URL="news:alt.cd-rom.reviews">alt.cd-rom.reviews</ULink>
</Para>
</ListItem>
</ItemizedList>
The <Literal remap="tt">comp.os.linux</Literal> newsgroups are also good sources of Linux
specific information.
</Para>
<Para>
A FAQ document on IDE and ATA devices can be found at
<ULink URL="ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-IDE/">
ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-IDE/</ULink>
and at
<ULink URL="http://www.seagate.com/techsuppt/faq/faqlist.html">
http://www.seagate.com/techsuppt/faq/faqlist.html</ULink>.
</Para>
<Para>
A web site dedicated to multimedia can be found at <ULink
URL="http://www.scala.com/multimedia/">http://www.scala.com/multimedia/</ULink>.
Creative Labs has a web site at
<ULink URL="http://www.creaf.com/">http://www.creaf.com/</ULink>.
</Para>
<Para>
The <Emphasis>Linux Software Map</Emphasis> (LSM) is an invaluable
reference for locating Linux software. The LSM home page is at
<ULink URL="http://www.ExecPC.com/lsm/">http://www.ExecPC.com/lsm/</ULink>.
and there is an on-line browsable version at
<ULink URL="http://www.boutell.com/lsm/">http://www.boutell.com/lsm/</ULink>.
</Para>
<Para>
Another great site for finding Linux applications is
<ULink URL="http://www.freshmeat.net/">http://www.freshmeat.net/</ULink>.
</Para>
<Para>
The Linux mailing list has a number of "channels" dedicated
to different topics. To find out how to join, send a mail message with
the word "help" as the message body to
<ULink URL="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</ULink>.
</Para>
<Para>
The Linux Documentation Project has produced several books
on Linux, including <Emphasis>Linux Installation and Getting
Started</Emphasis>. These are freely available by anonymous FTP from major
Linux archive sites or can be purchased in hardcopy format.
</Para>
<Para>
Finally, a shameless plug: If you want to learn a lot more about
multimedia under Linux (especially CD-ROM and sound card applications
and programming), check out my book <Emphasis>Linux Multimedia Guide</Emphasis>,
ISBN 1-56592-219-0, published by O'Reilly and
Associates. As well as the original English version, French and
Japanese translations are now in print. For details, call 800-998-9938
in North America or check the web page
<ULink URL="http://www.ora.com/catalog/multilinux/noframes.html">
http://www.ora.com/catalog/multilinux/noframes.html</ULink>.
</Para>
</Sect1>
</Article>