<!doctype linuxdoc system> 

<article>

<title>The Linux CD-ROM HOWTO
<author>Jeff Tranter, <htmlurl url="mailto:jeff&lowbar;tranter@mitel.com"
name="jeff&lowbar;tranter@mitel.com">
<date>v1.6, 18 October 1995

<abstract>
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.
</abstract>

<toc>

<sect>Introduction<p>

This is the Linux CD-ROM HOWTO document. 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.

<sect1>Acknowledgments<p>

Much of this information came from the <tt>README</tt> files provided
with the Linux kernel source code, the internet
<htmlurl url="news:alt.cd-rom" name="alt.cdrom"> newsgroup FAQ, and input
from Linux users.

Thanks to the
<htmlurl
url="ftp://sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-sgml-1.3.tar.gz"
name="Linuxdoc-SGML"> package, this HOWTO is available in several
formats, all generated from a common source file.

<sect1>Revision History<p>

<descrip>

<tag>Version 1.0</tag>First version made publicly available

<tag>Version 1.1</tag>CDU33A is explicitly supported as of 1.1.20
kernel; notes on Reveal FX; info on reading audio tracks; info on some
alpha drivers; added troubleshooting section; a few other minor
additions

<tag>Version 1.2</tag>ISO-9660 file systems must be mounted read-only
starting with 1.1.33 kernel; clarified that SB16 SCSI is supported and
newer Aztech drives are not supported; references to photocd and xpcd
programs; note new on sbpcd autoeject feature

<tag>Version 1.3</tag>Minor change to the way SBPCD eject feature is
disabled starting with the 1.1.49 kernel; added info on XA discs and
how to identify them

<tag>Version 1.4</tag>HOWTO now available in other languages; IBM and
Longshine drives now supported by SBPCD; alpha driver for Aztech
drives; CDU-33 driver no longer auto-probes, supports PhotoCD and
audio; more than 2 SCSI drives are supported; new driver for IDE;
reminder to check drive jumpers; can now set SBPCD auto-eject with
IOCTL; list drivers with multisession support; question on flashing
light on CDU-33

<tag>Version 1.5</tag>A long overdue update (I've been busy); document
placed under GPL; info on many new kernel drivers; more info on
configuration and troubleshooting; lots of HTML links added; many
other minor changes

<tag>Version 1.6</tag>Added link to eject program; question on file
permission patch; link to Creative Labs Web site; reference to
ATA/EIDE FAQ and FTP site; note that many Creative Labs and Mitsumi
drives are now EIDE; mention Supermount; drives listed as supporting
digital data are obsolete, refer to cdda2wav; more info on writing
CDs; multi-disc EIDE drive info; a few typos fixed

</descrip>

<sect1>New Versions Of This Document<p>

New versions of this document will be periodically posted to the
<htmlurl url="news:comp.os.linux.answers"
name="comp.os.linux.answers"> newsgroup. They will also be uploaded to
various anonymous ftp sites that archive such information including
<url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/">.

Hypertext versions of this and other Linux HOWTOs are available on
many World-Wide-Web sites, including <url
url="http://sunsite.unc.edu/mdw/mdw.html">. Most Linux CD-ROM
distributions include the HOWTOs, and you can also buy printed copies
from several vendors.

A French translation of this document, by Bruno Cornec
(<htmlurl url="mailto:cornec@stna7.stna.dgac.fr"
name="cornec@stna7.stna.dgac.fr">) is available at
<url url="ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/">.

A Japanese translation by Itsushi Minoura
(<htmlurl url="mailto:minoura@uni.zool.s.u-tokyo.ac.jp"
name="minoura@uni.zool.s.u-tokyo.ac.jp">) is available from
<url url="http://yebisu.ics.es.osaka-u.ac.jp/linux/">.

<sect1>Feedback<p>

I rely on you, the users, to make this HOWTO useful. If you have any
suggestions, corrections, or comments, please send them to me,
<htmlurl url="mailto:jeff&lowbar;tranter@mitel.com"
name="jeff&lowbar;tranter@mitel.com">, and I will try to incorporate them in
the next revision.

I am also willing to answer general questions on CD-ROM and Linux, as
best I can. Before doing so, please read all of the information in
this HOWTO, and send me detailed information about the problem.

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.

<sect1>Distribution Policy<p>

Copyright (C) 1995 Jeff Tranter.

This HOWTO is free documentation; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This document is distributed in the hope that it will be useful, but
<bf>without any warranty</bf>; without even the implied warranty of
<bf>merchantability</bf> or <bf>fitness for a particular purpose</bf>.
See the GNU General Public License for more details.

You can obtain a copy of the GNU General Public License by writing to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
USA.

<sect>CD-ROM Technology<p>

<verb>
"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."
--- from a CD-ROM instruction manual
</verb>

Don't Panic! The world of CD-ROM technology is not as confusing as
your instruction manual.

CD-ROM stands for <em>Compact Disc Read-Only Memory</em>, 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.

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.

First generation drives (known as <em>single speed</em>), provide a
transfer rate of approximately 150 kilobytes per second; these are now
generally considered obsolete. Double speed drives (300 kilobytes per
second) are widely available, and many users are now opting for quad
speed (600 kilobytes per second) or even higher.

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. Some CDs also allow
reading the frames of data from audio CDs in digital form.

CD-ROMs are usually formatted with an ISO-9660 (formerly called
<em>High Sierra</em>) file system. This format restricts filenames to
the MS-DOS style (8+3 characters). The <em>Rock Ridge Extensions</em>
use undefined fields in the ISO-9660 standard to support longer
filenames and additional Unix style information (e.g. file ownership,
symbolic links, etc.).

<em>PhotoCD</em> 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 <em>multi-session</em> capability.

CD recorders (CD-R) have recently become available. They use a
different media and specialized equipment for recording, but the
resulting disc can be read by any CD-ROM drive.

In the future CD-ROM drive vendors are expected to offer technology
that will increase storage capacity by an order of magnitude.

<sect>Supported Hardware<p>

This section lists the CD-ROM drivers and interfaces that are
currently supported under Linux. The information here is based on the
latest Linux kernels, which at time of writing were version 1.2.13
(latest stable release) and 1.3.35 (latest development release).

This information is only valid for Linux on the Intel platform. Some
information may be applicable to other processor architectures, but I
have no first hand experience or information.

<sect1>SCSI CD-ROM Drives<p>

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.

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.

You will also need a supported SCSI controller card; see the
<htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html"
name="SCSI HOWTO">
for more information on interface hardware.

Note that some CD-ROMs include a 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 <em>not</em>
work under Linux.

<sect1>Proprietary CD-ROM Drives<p>

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.

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.

The table below lists the proprietary CD-ROM drives that are known to
be supported under Linux. Drivers for additional devices are always
in development and may be available as kernel patches. They can most
often be found at <url
url="ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/">. Also
check the README files included with the kernel distribution, usually
installed in <htmlurl url="/usr/src/linux/drivers/block/"
name="/usr/src/linux/drivers/block/">, for the latest information.

<verb>

                Proprietary CD-ROM Drives

Vendor		Model		Kernel Driver	Notes
------		-----		-------------	--------
Panasonic	CR-521		sbpcd		Note 1
Panasonic	CR-522		sbpcd		Note 1
Panasonic	CR-523		sbpcd		Note 1
Panasonic	CR-562		sbpcd		Note 1
Panasonic	CR-563		sbpcd		Note 1
Creative Labs	CD-200		sbpcd		Note 2
IBM 		External ISA	sbpcd		Note 3
Longshine	LCS-7260 	sbpcd
Teac		CD-55A 		sbpcd
Sony		CDU-31A		cdu31a
Sony		CDU-33A		cdu31a
Sony		CDU-535		sonycd535	Note 4
Sony		CDU-531 	sonycd535
Aztech		CDA268-01A	aztcd
Orchid		CDS-3110	aztcd
Okano/Wearnes	CDD110		aztcd
GoldStar	R420		gscd		Note 5
Philips/LMS	CM206		cm206		Note 6
Mitsumi		CRMC LU005S	mcd/mcdx	Note 7, 8
Mitsumi		FX001		mcd/mcdx	Note 7, 8
Optics Storage	Dolphin 8000AT	optcd		Note 9
Sanyo		H94A		sjcd		Note 9
</verb>

Notes:

<enum>

<item>The drives may be sold under the names Creative Labs, Panasonic,
Matsushita, or Kotobuki.

<item>Support for this drive is new and not fully tested.

<item>This drive is the same as a Panasonic CR-562.

<item>May also be sold under the Procomm name.

<item>May also be sold as part of a Reveal Multimedia Kit.

<item>The Philips CM205 is <em>not</em> supported by this driver, but
there is a separate Alpha release driver available.

<item>May also be sold under the Radio Shack name.

<item>There are two drivers available. "mcd" is the original one, and
"mcdx" is a new experimental driver with more features (but possibly
less stable).

<item>This driver is considered experimental.

</enum>

If a drive listed here is not supported by your kernel, you need to
upgrade to a newer version. Some of the drivers require a 1.3.x
kernel.

<sect1>ATAPI CD-ROM Drives<p>

ATAPI (ATA Packet Interface) is a protocol for controlling mass
storage devices, similar to SCSI. It builds on the ATA (AT Attachment)
interface, the official ANSI standard name for for the IDE interface
developed for hard disk drives. ATAPI is commonly used for hard disks,
CD-ROM drives, tape drives, and other devices. While relatively new,
it is rapidly becoming the most popular type of interface. It offers
most of the functionality of SCSI, without the need for an expensive
controller or cables.

The Linux kernel has a device driver that should work with any ATAPI
CD-ROM drive. Vendors shipping compatible drives include Aztech,
Mitsumi, NEC, Sony, Creative Labs, and Vertos.

<sect>Installation<p>

Installation of a CD-ROM under Linux consists of these steps:

<enum>
<item>Installing the hardware.
<item>Configuring and building the Linux kernel.
<item>Creating device files and setting boot time parameters
<item>Booting the Linux kernel.
<item>Mounting the media.
</enum>

The next sections will cover each of these steps in detail.

<sect1>Installing the Hardware<p>

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 README files
that include this information.

As explained in the file <tt>README.ide</tt>, ATAPI CD-ROMS should be
jumpered as "single" or "master", and not "slave" when only one IDE
device is attached to an interface.

<sect1>Configuring and Building the Kernel<p>

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:

<enum>
<item>install over a network
<item>boot DOS, and install the Linux files onto your hard disk
<item>boot DOS, and create a set of floppies to install Linux
<item>find someone who can build you a boot disk with the needed CD-ROM driver
</enum>

The <url
url="http://sunsite.unc.edu/mdw/HOWTO/Installation-HOWTO.html"
name="Linux Installation HOWTO"> 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).

Once Linux has initially been installed, most users will want to
compile their own kernel, usually for one of these reasons:

<itemize>
<item>to support a CD-ROM drive or other hardware
<item>to upgrade to a newer kernel release
<item>to free up memory resources by minimizing the size of the kernel
</itemize>

The <url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
name="Linux Kernel HOWTO"> should be consulted for the details of
building a kernel. I will just mention here some issues that are
specific to CD-ROM drives.

Obviously, you need to compile in support for your CD-ROM drive when
you do a "make config".

If you have an ATAPI CD-ROM drive, you need to answer <tt>yes</tt> to
the questions:

<tscreen><verb>
"Normal (MFM/RLL) disk and IDE disk/cdrom support?"
"Include support for IDE/ATAPI CDROMs?"
</verb></tscreen>

For SCSI CD-ROM drives, enable these options:

<tscreen><verb>
SCSI support?
SCSI CDROM support?
</verb></tscreen>

Also enable support for your SCSI host adaptor when prompted, e.g.

<tscreen><verb>
Adaptec AHA1542 support?
</verb></tscreen>

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.

Virtually all CD-ROMs use the ISO-9660 file system, so you must
also enable:

<tscreen><verb>
ISO9660 cdrom filesystem support?
</verb></tscreen>

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 <url
url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html" name="Sound
HOWTO"> can be a useful reference here.

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.

Many of the CD-ROM drivers can be built as loadable kernel
modules. How to do this is described in the modules documentation and
the <url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
name="Kernel HOWTO">

If a drive type listed here is not supported by your kernel, you
likely need to upgrade to a newer version (several of the drivers are
only offered in the 1.3.x kernels).

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 <url
url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html" name="Kernel
HOWTO"> explains how to do this.

<sect1>Creating Device Files and Setting Boot Time Parameters<p>

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 <tt>setup</tt> tool that
includes CD-ROM setup, and most systems have a <tt>/dev/MAKEDEV</tt>
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.

You create the device file by running the shell commands indicated for
your drive type. This should be done as user <tt>root</tt>. Note that
some Linux distributions may use slightly different CD-ROM device
names from those listed here.

It is recommended that you also create a symbolic link to the CD-ROM
device to make it easier to remember. For example, for a Panasonic
CD-ROM drive, the link would be created using

<tscreen><verb>
% ln -s /dev/sbpcd /dev/cdrom
</verb></tscreen>

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 and write, e.g.

<tscreen><verb>
% chmod 666 /dev/sbpcd
% ls -l /dev/sbpcd
brw-rw-rw-   1 root     disk      25,   0 Jul 18  1994 /dev/sbpcd
</verb></tscreen>

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
<tt>append</tt> command such as the following to your
<tt>/etc/lilo.conf</tt> file:

<tscreen><verb>
append = "sbpcd=0x230,SoundBlaster"
</verb></tscreen>

See the LILO documentation for more information.

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.

<sect2>Sbpcd Driver<p>

<verb>
       Principal author: Eberhard Moenkeberg (emoenke@gwdg.de)
  Multi-session support: yes (but not CD-52x drives)
 Multiple drive support: yes
Loadable module support: yes
   Reading audio frames: yes (CR-562 and CR-563 only)
           Auto-probing: yes
            Device file: /dev/sbpcd, major 25
     Configuration file: sbpcd.h
   Kernel config option: Matsushita/Panasonic CDROM support?
            README file: README.sbpcd
</verb>

This driver accepts a kernel command line of the form:

<tscreen><verb>
sbpcd=<io-address>,<interface-type>
</verb></tscreen>

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 <tt>sbpcd.h</tt> for hints on
what interface type to use. Using <tt>sbpcd=0</tt> disables
auto-probing, rendering the driver useless.

The device file can be created using:

<tscreen><verb>
% mknod /dev/sbpcd b 25 0
</verb></tscreen>

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 :-).

See the file <tt>README.sbpcd</tt> for more information on this
driver.

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.

<sect2>Sonycdu535 Driver<p>

<verb>
       Principal author: Ken Pizzini (ken@halcyon.com)
  Multi-session support: no
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/sonycd535, major 24
     Configuration file: sonycd535.h
   Kernel config option: Sony CDU535 CDROM support?
            README file: README.sonycd535
</verb>

This driver accepts a kernel command line of the form:

<tscreen><verb>
sonycd535=<io-address>
</verb></tscreen>

where &lt;io-address&gt is the base address of the controller
(e.g. 0x320). Alternatively you can set the address in the file
<tt>sonycd535.h</tt> and compile it in.

The device file can be created using:

<tscreen><verb>
% mknod /dev/sonycd535 b 24 0
</verb></tscreen>

Some Linux distributions use <tt>/dev/sonycd</tt> for this device.
Older versions of the driver used major device number 21; make sure
your device file is correct.

This driver was previously distributed as a patch but is now part of
the standard kernel. See the file <tt>README.sonycd535</tt> for more
information on this driver.

<sect2>Cdu31a Driver<p>

<verb>
       Principal author: Corey Minyard (minyard@wf-rch.cirr.com)
  Multi-session support: yes
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: yes
           Auto-probing: no
            Device file: /dev/cdu31a, major 15
     Configuration file: cdu31a.h
   Kernel config option: Sony CDU31A/CDU33A CDROM support?
            README file: README.cdu31a
</verb>

This driver accepts a kernel command line of the form:

<tscreen><verb>
cdu31a=<io-address>,<interrupt>,PAS
</verb></tscreen>

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.

The device file can be created using:

<tscreen><verb>
% mknod /dev/cdu31a b 15 0
</verb></tscreen>

See the file <tt>README.cdu31a</tt> for more information on this
driver.

Also see the Web page put together by Jeffrey Oxenreider (<htmlurl
url="mailto:zureal@infinet.com" name="zureal@infinet.com">) that
covers a lot of common problems with these drives. It can be found at
<url url="http://www.infinet.com/~zureal/cdu31a.html">.

<sect2>Aztcd Driver<p>

<verb>
       Principal author: Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
  Multi-session support: yes
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/aztcd0, major 29
     Configuration file: aztcd.h
   Kernel config option: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
            README file: README.aztcd
</verb>

This driver accepts a kernel command line of the form:

<tscreen><verb>
aztcd=<io-address>
</verb></tscreen>

where the parameter is the I/O base address of the card (e.g. 0x340).

The device file can be created using:

<tscreen><verb>
% mknod /dev/aztcd0 b 29 0
</verb></tscreen>

See the file README.aztcd for more information on this driver.

<sect2>Gscd Driver<p>

<verb>
       Principal author: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
  Multi-session support: no
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/gscd0, major 16
     Configuration file: gscd.h
   Kernel config option: Goldstar R420 CDROM support?
            README file: README.gscd
</verb>

This driver accepts a kernel command line of the form:

<tscreen><verb>
gscd=<io-address>
</verb></tscreen>

specifying the I/O base address of the card (e.g. 0x340).

The device file can be created using:

<tscreen><verb>
% mknod /dev/gscd0 b 16 0
</verb></tscreen>

See the file <tt>README.gscd</tt> and the World-Wide Web site
<url url="http://linux.rz.fh-hannover.de/~raupach">
for more information on this driver.

<sect2>Mcd Driver<p>

<verb>
       Principal author: Martin Harriss (martin@bdsi.com)
  Multi-session support: no
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/mcd, major 23
     Configuration file: mcd.h
   Kernel config option: Standard Mitsumi CDROM support?
            README file: README.mcd
</verb>

This is the older driver for Mitsumi drivers that has been available
for some time. You might want to try the newer <tt>mcdx</tt> driver,
which has some new features but is still considered experimental.

This driver accepts a kernel command line of the form:

<tscreen><verb>
mcd=<io-address>,<irq>
</verb></tscreen>

specifying the I/O base address of the card (e.g. 0x340) and the IRQ
request number used.

The device file can be created using:

<tscreen><verb>
% mknod /dev/mcd b 23 0
</verb></tscreen>

See the file <tt>README.mcd</tt> for more information on this driver.

<sect2>Mcdx Driver<p>

<verb>
       Principal author: Heiko Schlittermann
  Multi-session support: yes
 Multiple drive support: yes
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/mcdx0, major 20
     Configuration file: mcdc.h
   Kernel config option: Experimental Mitsumi support?
            README file: README.mcdx
</verb>

This is a new and currently experimental driver for Mitsumi drivers.
The older and possibly more stable <tt>mcd</tt> driver is still
available.

This driver accepts a kernel command line of the form:

<tscreen><verb>
mcdx=<io-address>,<irq>
</verb></tscreen>

specifying the I/O base address of the card (e.g. 0x340) and the IRQ
request number used.

The device file can be created using:

<tscreen><verb>
% mknod /dev/mcdx0 b 20 0
</verb></tscreen>

If you recently bought a Mitsumi CD-ROM drive, don't assume that it
should use this kernel driver. Some Mitsumi models are now EIDE/ATAPI
drives and should use the idecd kernel driver.

See the file <tt>README.mcdx</tt> for more information on this driver.

<sect2>Cm206 Driver<p>

<verb>
       Principal author: David A. van Leeuwen (david@tm.tno.nl)
  Multi-session support: yes
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: yes
            Device file: /dev/cm206cd, major 32
     Configuration file: cm206.h
   Kernel config option: Philips/LMS CM206 CDROM support?
            README file: README.cm206
</verb>

The driver accepts a kernel command line of the form:

<tscreen><verb>
cm206=<io-address>,<interrupt>
</verb></tscreen>

where the first number is the I/O base address of the card
(e.g. 0x340). The second is the interrupt channel.

The device file can be created using:

<tscreen><verb>
% mknod /dev/cm206cd b 32 0
</verb></tscreen>

See the file <tt>README.cm206</tt> for more information on this
driver.

<sect2>Optcd Driver<p>

<verb>
       Principal author: Leo Spiekman (spiekman@dutette.et.tudelft.nl)
  Multi-session support: no
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/optcd0, major 17
     Configuration file: optcd.h
   Kernel config option: Experimental Optics Storage ... CDROM support?
            README file: README.optcd
</verb>

The driver accepts a kernel command line of the form

<tscreen><verb>
optcd=<io-address>
</verb></tscreen>

to specify the I/O base address of the card (e.g. 0x340).

The device file can be created using:

<tscreen><verb>
% mknod /dev/optcd0 b 17 0
</verb></tscreen>

See the file <tt>README.optcd</tt> for more information on this
driver.

<sect2>Sjcd Driver<p>

<verb>
       Principal author: Vadim V. Model (vadim@rbrf.msk.su)
  Multi-session support: no
 Multiple drive support: no
Loadable module support: yes
   Reading audio frames: no
           Auto-probing: no
            Device file: /dev/sjcd, major 18
     Configuration file: sjcd.h
   Kernel config option: Experimental Sanyo H94A CDROM support?
            README file: README.sjcd
</verb>

The driver accepts a kernel command line of the form:

<tscreen><verb>
sjcd=<io-address>,<interrupt>,<dma>
</verb></tscreen>

indicating the base address, interrupt, and DMA channel to be used
(e.g. sjcd=0x340,10,5).

The device file can be created using:

<tscreen><verb>
% mknod /dev/sjcd b 18 0
</verb></tscreen>

See the file <tt>README.sjcd</tt> for more information on this driver.

<sect2>SCSI Driver<p>

<verb>
       Principal author: David Giller
  Multi-session support: yes (depending on drive)
 Multiple drive support: yes
Loadable module support: yes
   Reading audio frames: yes (depending on drive)
           Auto-probing: yes
            Device file: /dev/scd0, major 11
     Configuration file: cdrom.h
   Kernel config option: SCSI CDROM support?
            README file: none
</verb>

There are kernel command line option specific to each type of SCSI
controller. See the <htmlurl
url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html" name="SCSI
HOWTO"> for more information.

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:

<tscreen><verb>
% mknod /dev/scd0 b 11 0
% mknod /dev/scd1 b 11 1
</verb></tscreen>

<sect2>IDECD Driver<p>

<verb>
       Principal author: Scott Snyder (snyder@fnald0.fnal.gov)
  Multi-session support: no
 Multiple drive support: yes
Loadable module support: no
   Reading audio frames: no
           Auto-probing: yes
            Device file: /dev/hd{b,c},  major 22
     Configuration file: cdrom.h
   Kernel config option: Include support for IDE/ATAPI CDROMs?
            README file: README.ide
</verb>

This is the driver for ATAPI CD-ROMS. The driver accepts a kernel
command line of the form

<tscreen><verb>
hdx=cyls,heads,sects,wpcom,irq
  or
hdx=cdrom
</verb></tscreen>

where <tt>hdx</tt> can be any of {hda,hdb,hdc,hdd}, or simply hd, for
the "next" drive in sequence. Only the first three parameters are
required (cyls,heads,sects). For example <tt>hdc=1050,32,64
hdd=cdrom</tt>.

<sect1>Booting the Linux Kernel<p>

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):

<tscreen><verb>
SBPCD: Trying to detect a SoundBlaster CD-ROM drive at 0x230.
SBPCD: - Drive 0: CR-562-x (0.76)
SBPCD: 1 SoundBlaster CD-ROM drive(s) at 0x0230.
SBPCD: init done.
</verb></tscreen>

If the bootup messages scroll by too quickly to read, you should be
able to retrieve them using <tt>dmesg</tt> or <tt>tail
/var/adm/messages</tt>.

If the drive is not found, then a problem has occurred, See the
section on troubleshooting.

<sect1>Mounting, Unmounting, and Ejecting Devices<p>

To mount a CD-ROM, insert a disc in the drive, and run the
<tt>mount</tt> command as <tt>root</tt> (this assumes you created a
symbolic link to your device file as recommended above and that an
empty directory <tt>/mnt</tt> exists):

<tscreen><verb>
% mount -t iso9660 -r /dev/cdrom /mnt
</verb></tscreen>

The CD can now be accessed under the directory <tt>/mnt</tt>. Note
that <tt>/mnt</tt> is commonly used as a temporary mount point; a more
suitable name for a permanent installation might be something like
<tt>/cdrom</tt>. There are other options to the mount command that
you may wish to use; see the <tt>mount(8)</tt> man page for details.

You can add an entry to <tt>/etc/fstab</tt> to automatically mount a
CD-ROM when Linux boots or to specify parameters to use when it is
mounted; see the <tt>fstab(5)</tt> man page.

Note that to play audio CDs you should <em>not</em> try to mount them.

To unmount a CD-ROM, use the <tt>umount</tt> command as <tt>root</tt>:

<tscreen><verb>
% umount /mnt
</verb></tscreen>

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 <htmlurl
url="ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/eject-1.1.tar.gz"
name="eject"> program that allows ejecting CD-ROMs under software
control.

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). The sbpcd driver
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).

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.

Stephen Tweedie (<htmlurl url="mailto:sct@dcs.ed.ac.uk"
name="sct@dcs.ed.ac.uk">) recently announced the <tt>Supermount</tt>
package which provides transparent mounting of removable media
including CD-ROM. You can find it at <url
url="ftp://sunsite.unc.edu/pub/linux/patches/diskdrives/">.

<sect1>Troubleshooting<p>

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.

<sect2>Step 1: Make sure you are really running the kernel you compiled<p>

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 <tt>uname</tt> command:

<tscreen><verb>
% uname -a
Linux fizzbin 1.1.31 #1 Wed Jul 20 16:53:35 EDT 1994 i386
</verb></tscreen>

or by displaying the file <tt>/proc/version</tt>:

<tscreen><verb>
% cat /proc/version
Linux version 1.2.13 (root@fizzbin) (gcc version 2.6.3) #9 Sun Aug 6 11:56:47 EDT 1995
</verb></tscreen>

If the date stamp doesn't seem to match when you compiled the kernel,
then you are running an old kernel. Did you really reboot? If you use
LILO, did you re-install it (typically by running
<tt>/etc/lilo/install</tt>)? If booting from floppy, did you create a
new boot floppy and use it when booting?

<sect2>Step 2: Make sure the proper kernel drivers are compiled in<p>

You can see what drivers are compiled in by looking at
<tt>/proc/devices</tt>:

<tscreen><verb>
% cat /proc/devices
Character devices:
 1 mem
 4 tty
 5 cua
 6 lp
14 sound
15 Joystick

Block devices:
 2 fd
 3 hd
25 sbpcd
</verb></tscreen>

First look for your CD-ROM device driver. These are all block devices,
in this case we can see that the <tt>sbpcd</tt> driver was present.

Also make sure that ISO-9660 filesystem support was compiled in, by
looking at <tt>/proc/filesystems</tt>:

<tscreen><verb>
% cat /proc/filesystems
        ext2
        msdos
nodev   proc
        iso9660
</verb></tscreen>

You can also see what i/o port addresses are being used by a driver
with the file <tt>/proc/ioports</tt>:

<tscreen><verb>
howto % cat /proc/ioports
 ...
0230-0233 : sbpcd
 ...
</verb></tscreen>

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.

<sect2>Step 3: Did the kernel detect your drive during booting?<p>

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
<tt>dmesg</tt> command:

<tscreen><verb>
% dmesg
</verb></tscreen>

or

<tscreen><verb>
% tail /var/adm/messages
</verb></tscreen>

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.

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.

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.

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 <tt>Control-Alt-Delete</tt>.

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.

<sect2>Step 4: Can you read data from the drive?<p>

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.

<tscreen><verb>
dd if=/dev/cdrom of=/dev/null bs=2048
^C
124+0 records in
124+0 records out
</verb></tscreen>

If this works, then the kernel is communicating with the drive and you
can move on to step 5.

If not, then a possible cause is the device file. Make sure than the
device file in the <tt>/dev</tt> 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.

A remote possibility is a hardware problem. Try testing the drive
under DOS, if possible, to determine if this could be the case.

<sect2>Step 5: Can you mount the drive?<p>

If you can read from the drive but cannot mount it, first verify that
you compiled in ISO-9660 file system support by reading
<tt>/proc/filesystems</tt>, as described previously.

Make sure you are mounting the drive with the "-t iso9660" and "-r"
options and that a known good CD-ROM (not Audio CD) is inserted in the
drive. You normally must mount drives as user <tt>root</tt>.

With ATAPI CD-ROM drives you may need to mount specifying a block size
of 2048 bytes. Add the option "-o block=2048" to the mount parameters.

Make sure that the mount point exists and is an empty directory.

If you are automatically mounting the CD-ROM on bootup, make sure that
you have correct entries in the /etc/fstab file.

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:

<tscreen><verb>
% dmesg
SBPCD: sbpcd_open: no disk in drive
</verb></tscreen>

There may also be errors logged to files in <tt>/var/adm</tt>,
depending on how your system is configured.

<sect2>Debugging Audio Problems<p>

If the drive works with CD-ROMS, but not for playing audio CDs, here
are some possible solutions.

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 few of the CD-ROM drivers do not support playing Audio CDs. Check
the README file or source code to see if that is the case.

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. Mask 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 <htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html"
name="Sound HOWTO">).

<sect2>When All Else Fails<p>

If you still have problems, here are some final suggestions for things
to try:

<itemize>
<item>carefully re-read this HOWTO document
<item>read the references listed at the end of this document,
especially the relevant kernel source README files
<item>post a question to one of the <tt>comp.os.linux</tt> or
other usenet newsgroups
<item>send a question to the Linux mailing list
<item>try using the latest Linux kernel
<item>contact your computer dealer
<item>contact the CD-ROM manufacturer
<item>send mail to the author of the relevant kernel driver
<item>send mail to me
<item>fire up emacs and type <tt>Esc-x doctor</tt>
</itemize>

<sect>Applications<p>

This section briefly lists some of the key applications related to
CD-ROM that are available under Linux. Check the Linux Software Map
for the latest versions and archive sites.

<sect1>Audio CD Players<p>

Several programs are available for playing audio CDs, either through a
headphone jack or an attached sound card.

<descrip>
<tag>Workman</tag>a graphical player running under X11 and supporting
a CD database and many other features
<tag>WorkBone</tag>an interactive text-mode player
<tag>xcdplayer</tag>a simple X11 based player
<tag>cdplayer</tag>a very simple command line based player
<tag>Xmcd</tag>an X11/Motif based player
<tag>xmitsumi</tag>another X11 based player for Mitsumi drives
<tag>xplaycd</tag>another X11 based player, bundled with sound mixer 
and VU meter programs
<tag>cdtool</tag>command line tools for playing audio CDs
</descrip>

Some of these programs are coded to use a specific device file for the
CD-ROM (e.g. <tt>/dev/cdrom</tt>). You may be able to pass the correct
device name as a parameter, or you can create a symbolic link in the
<tt>/dev</tt> 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.

<sect1>Inheriting File System<p>

The Inheriting File System (IFS) is a kernel driver that allows
mounting multiple file systems at the same point. It is similar to the
Translucent File System provided under SunOS. By mounting a hard disk
directory over a CD-ROM file system, you can effectively obtain a
writable CD-ROM file system.

The current version is experimental and was written for the 0.99pl11
and pl12 kernels; it may or may not work with more recent revisions.
The author is Werner Almesberger (<htmlurl
url="mailto:almesber@bernina.ethz.ch"
name="almesber@bernina.ethz.ch">).

A similar package, called the user file system, is another possible
method of providing similar functionality.

<sect1>PhotoCD<p>

PhotoCDs use an ISO-9660 file system containing image files in a
proprietary format. Not all CD-ROM drives support reading PhotoCDs.

The <tt>hpcdtoppm</tt> program by Hadmut Danisch converts PhotoCD
files to the portable pixmap format. It can be obtained from <url
url="ftp://ftp.gwdg.de/pub/linux/hpcdtoppm"> or as part of the PBM
(portable bit map) utilities, available on many archive sites (look
for "pbm" or "netpbm").

The <tt>photocd</tt> program by Gerd Knorr <htmlurl
url="mailto:kraxel@cs.tu-berlin.de" name="kraxel@cs.tu-berlin.de"> can
convert PhotoCD images into Targa or Windows and OS/2 bitmap files.

The same author has written the program <tt>xpcd</tt>, 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 <url
url="ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/">.

The ImageMagick image file manipulation program also supports PhotoCD
files. It is available from <url
url="ftp://ftp.x.org/contrib/applications/ImageMagick/">.

<sect1>Mkisofs<p>

Eric Youngdale's <tt>mkisofs</tt> 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.

The tools for actually writing data to writable CD-ROM drives tend to
be vendor specific. They also require writing the data with no
interruptions, so a multitasking operating system like Linux is not
particularly well suited.

<sect1>ISO-9660 Utilities<p>

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 <url url="ftp://ftp.cdrom.com/pub/cdrom/ptf/">.
They were written by Bill Siegmund and Rich Morin.

<sect>Answers to Frequently Asked Questions<p>

<sect1>How can a non-root user mount and unmount discs?<p>

Some <tt>mount</tt> commands support the <em>user</em> option. If you
make an entry such as the following in <tt>/etc/fstab</tt>:

<tscreen><verb>
/dev/sbpcd  /cdrom   iso9660     user,noauto,ro
</verb></tscreen>

then an ordinary user will be allowed to mount and unmount the drive
using these commands:

<tscreen><verb>
% mount /cdrom
% umount /cdrom
</verb></tscreen>

The disc will be mounted with some options that ensure security
(e.g. programs cannot executed, device files are ignored); in some
cases this may be too restrictive.

Another method is to get the <tt>usermount</tt> 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.

The archive site <tt>ftp.cdrom.com</tt> has the source file
<tt>mount.c</tt> which allows mounting an unmounting of CD-ROMs (only)
by normal users. It runs as a setuid executable.

<sect1>Why do I get <tt>device is busy</tt> when unmounting a CD-ROM?<p>

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 <tt>fuser</tt> command, as shown in the following example.

<tscreen><verb>
% umount /cdrom
umount: /dev/sbpcd: device is busy
% fuser -v /cdrom
/cdrom:               USER       PID ACCESS COMMAND
                      tranter     50 ..c..  bash
</verb></tscreen>

<sect1>How do I export a CD-ROM to other hosts over NFS?<p>

You need to add an entry to the <tt>/etc/exports</tt> file; see the
<tt>exports(5)</tt> man page for details.

<sect1>Can I boot Linux from a CD-ROM?<p>

The easiest way to boot from CD-ROM is to use a boot floppy. Several
of the Linux CD-ROM distributions (e.g. Yggdrasil) include one, or you
can use the boot disk(s) from one of the Linux distributions
(e.g. Slackware) that includes the necessary CD-ROM drivers for your
system.

In the future it may be possible to boot from ATAPI CD-ROM drives
which have the appropriate ROM BIOS functions.

<sect1>How can I read digital data from audio CDs?<p>

Heiko Eissfeldt (<htmlurl url="mailto:heiko@colossus.escape.de"
name="heiko@colossus.escape.de">) and Olaf Kindel have written a
utility that reads audio data and saves it as <tt>.wav</tt> format
sound files. The package is called <tt>cdda2wav.tar.gz</tt> and can be
found on <tt>sunsite.unc.edu</tt>.

Because CD-ROM drives are changing very quickly, it is difficult to
list which models support reading digital data. You best bet is to get
the latest <tt>cdda2wav</tt> package and read the documentation.

For more information on this subject, also see the alt.cd-rom FAQ
listed in the references section.

<sect1>Why doesn't the <tt>find</tt> command work properly?<p>

On ISO-9660 formatted discs without the Rock Ridge Extensions, you
need to add the <tt>-noleaf</tt> option to the <tt>find</tt> command.

The reason for this is that the number of links for each directory
file is not easily obtainable, so it is set to 2. The default behavior
for the <tt>find</tt> program is to look for (i&lowbar;links - 2)
subdirectories in each directory, and it then assumes that the rest
are regular files. The <tt>-noleaf</tt> switch disables this
optimization.

<sect1>Is the Reveal Multimedia Effects kit CD-ROM supported?<p>

(The following was provided by Steve Horne <htmlurl
url="mailto:Horne@cmod2.pfc.mit.edu" name="Horne@cmod2.pfc.mit.edu">.
This only applies to certain Reveal drives; apparently newer ones are
made by Panasonic and work fine with the sbpcd driver.)

About a year ago I bought a Reveal CD/soundcard kit, and managed to
get my particular configuration to work under Linux. I posted the
tricks I used to make the thing work; that note got into the CD-ROM
HOWTO. Recently I've been receiving a couple of requests a week for
help on making Reveal kits work under Linux.

I'm no expert. All I did was hammer away at Reveal Tech Support until
they gave me the address of the appropriate port, then added the two
SOUND-FX lines to the cdu31a driver.  I don't know how to help most of
the people who e-mail me.  This is the note I plan to send them. It
would be a good idea for you to condense it to the appropriate level
for the HOWTO. In particular, I don't want anyone to get the
impression that this is a good card to buy for a linux system.  It's
not.

REVEAL cards -  under Linux

Summary:

<itemize>
<item>Don't buy one.
<item>If you already have one, and have a Sony drive, you can make the
CD work.
<item>If you don't have a Sony drive, you can probably make the drive
work, but I'm not certain, since I don't have that hardware.
<item>Sound support is poor. If Aztech would release programming
information, there would be some hope.
</itemize>

Fine print:

If your kit has a Sony, the cdu31a driver will work for you.  You need
a kernel with cdu31a support compiled in. The following is from the
comments in the cdu31a source code:

<tscreen><verb>
 * WARNING -    All autoprobes have been removed from the driver.
 *              You MUST configure the CDU31A via a LILO config
 *              at boot time or in lilo.conf.  I have the
 *              following in my lilo.conf:
 *
 *                append="cdu31a=0x1f88,0,PAS"
 *
 *              The first number is the I/O base address of the
 *              card.  The second is the interrupt (0 means none).
 *              The third should be "PAS" if on a Pro-Audio
 *              spectrum, or nothing if on something else.
</verb></tscreen>

I expect the appropriate line for a Reveal card to be 

<tscreen><verb>
append="cdu31a=0x654,0"
</verb></tscreen>

Since I don't consistently use LILO, I have just put the autoprobing
back in by deleting the conditional stuff, and put my address first.
(The file is <url url="/usr/src/linux/drivers/block/cdu31a.c">; search
for the string "cdu31a&lowbar;addresses" to find the spot.)

THIS WILL NOT WORK IF YOUR KIT DOESN'T HAVE A SONY DRIVE!  (I don't
know that for sure, but I'd be very surprised if it did.)

By analogy to the Sony case, I expect that if you have a Panasonic or
Mitsumi drive, you need to obtain from Reveal Tech Support the base
register for your CD-ROM type, then use the appropriate driver. (I
don't know if the sbpcd driver will work; it might. No matter what,
you need those addresses.)  I don't know if the "append=..." will work
with the other drivers.

You can't patch the driver or lilo.conf until you have some sort of
system up.  If you are starting from scratch (DOS only, no Linux) here
are a few things to try --

<enum>
<item>
Copy the installation files to a DOS partition and install from there.
This is foolproof but will require up to 90 MB of space in your DOS
partition.  Once the system is up you can use the above tricks.  It's
possible to bootstrap yourself up by installing only the A, AP, and D
series (if you are using Slackware) plus a kernel source tree (Q ?).
This will give you the tools to patch and build a kernel.

<item>If you either have a Sony CD or are otherwise confident, have a
friend make you a patched kernel -- (autoprobes on, your address
first.)  Rdev it in the usual way:

<tscreen><verb>
rdev  /dev/fd0 /dev/fd0			; root=floppy
rdev -r /dev/fd0 1440                   ; ramdisk
rdev -t /dev/fd0 -3                     ; prompt for screen mode
</verb></tscreen>

Then use it to boot the installation root-disk. Make a mount point
for the CD that won't interfere with the installation procedure:

<tscreen><verb>
# mkdir /cd
# mount -r -t iso9660 /dev/fd0 /cd
</verb></tscreen>

Then use the "install from mounted directory" option. Of course, the
kernels in the distribution won't work for you; copy your custom
kernel instead.

<item>It's just barely possible (I haven't checked) that the new
LOADLIN routine, which boots Linux from DOS, might save you. I
believe it's possible to use it like LILO to pass data to the kernel,
so it might work to boot DOS, then boot Linux, passing the hardware
addresses to the driver via LOADLIN. I've never tried this.

</enum>

Sound support:

This card (isc-400) isn't well supported by Linux, which is a shame
because it seems to be a nice piece of hardware. The card will
produce output in the 8-bit SB mode. I haven't made the mixer work,
so recording doesn't work properly either. The MSS mode doesn't have
an IRQ; I don't know how to tell the driver that, so that doesn't
work. I haven't seen the AdLib compatibility work.

I have tried, and at least one other person has tried, to obtain
programming information for the native mode(s) of the card. After many
hours on the phone I was referred to Singapore. I passed at that
point. When I get serious about sound again, I'll buy a genuine
SoundBlaster card.

<sect1>Does Linux support any recordable CD-ROM drives?<p>

According to Adam J. Richter, <htmlurl url="mailto:adam@yggdrasil.com"
name="adam@yggdrasil.com">:

The Yggdrasil distribution can drive a Philips CD writer with an
Adaptec 154x SCSI controller. I'm not sure which other SCSI
controllers, if any, will work. You can use <tt>mkisofs</tt> to make
an ISO-9660 filesystem and <tt>cdwrite</tt> to write it to the CD. If
you want us to help you set this up, you can call us on our 900
technical support number: 1-900-446-6075 extension 835
(US&dollar;2.95/minute, U.S. only).

George Moody, <htmlurl url="mailto:george@hstbme.mit.edu"
name="george@hstbme.mit.edu"> reports:

I use `mkisofs' (from tsx-11.mit.edu and other standard sources) and
`cdwrite' (from ftp.yggdrasil.com) to write CDs using the following
configuration:

<itemize>
<item> Philips CDD522 CD recorder
<item> Seagate ST15150N hard disk (4.1 GB `Barracuda' drive, not an AV drive)
<item> NCR B355 PCI SCSI controller (uses 53C810, praised as cheap and fast in the PCI-HOWTO)
</itemize>

The hard disk and the CD recorder are on the same SCSI bus.  My system
is a 100 MHz Pentium running Linux 1.2.12.  I'm using the standard NCR
PCI-SCSI driver, not one of the new alpha versions that are said to
support disconnect/ reconnect.  I've been able to make CDs at 2x speed
from image files in both ext2fs and MSDOS file systems (I haven't
tried copying from a raw disk device, since I don't have a partition
to spare).  The only problem is that occasionally the system gets
wedged *after* `fixating' the CD; when this happens, I reboot the
system and everything's OK, including the CD I've just written.  I run
`cdwrite' as root, sometimes while running X11 and a few low-load X11
clients, but I try not to do anything else with the system while
writing a CD.

Also see the Linux CD-Writer mini-HOWTO document, found
at <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/CD-Writer">
or <url url="http://sunsite.unc.edu/mdw/HOWTO/CD-Writer.html">.

<sect1>Why do I get <tt>mount: Read-only file system</tt> when mounting a CD-ROM?<p>

CD-ROM is a read-only media. With older kernels you could mount a
CD-ROM for read/write; attempts to write data to the CD would not
generate any errors. 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).

<sect1>Why does the disc tray open when I shut down the system?<p>

As of the 1.1.38 kernel, the sbpcd driver ejects the CD when it is
unmounted. If you shut down the system, a mounted CD will be
unmounted, causing it to eject.

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.

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 README.sbpcd
file (or use the <htmlurl
url="ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/eject-1.1.tar.gz"
name="eject"> program).

<sect1>I have a "special" CD that can't be mounted<p>

The "special" CD is likely an XA disc (like all Photo CDs or
"one-offs" created using CD-R drives). Most of the Linux kernel CD-ROM
drivers do not support XA discs, although you may be able to find a
patch to add support on one of the archive sites.

The sbpcd driver <em>does</em> support XA. If you are using this
driver you can determine if the disc is XA using the following
procedure: go into the file sbpcd.c and enable the display of the
"Table of Contents" (DBG&lowbar;TOC). Build and install the new kernel and
boot from it. During each mount the TOC info will be written (either
to the console or to a log file). If the first displayed value in the
TOC header line is "20", then it is an XA disc. That byte is "00" with
normal disks. If the TOC display shows different tracks, that is also
a sign that it is an XA disc.

(thanks to Eberhard Moenkeberg for the above information)

Other possibilities for unreadable CDs are:

<enum>
<item>The disc doesn't use an ISO-9660 file system (e.g. some use SunOS)
<item>It is an audio CD
<item>The CD is damaged or defective
<item>You put it in the drive upside down :-)
</enum>

<sect1>Why does the drive light flash on my CDU-33 drive?<p>

This is normal and was added in a recent revision of the driver. It
flashes the drive light when a CD is mounted (it's not a bug, it's a
feature...).

<sect1>Do multi-platter CD-ROM drives work with Linux?<p>

Several users have reported success with multi-disc CD-ROM changers.
All of the drives I have come across use SCSI interfaces.

You probably need to enable the "Probe all LUNs on each SCSI device"
kernel configuration option. At least one user also had to increase a
SCSI timeout value in the kernel driver.

The Nakamichi MBR-7 7 disc changer and Pioneer 12 disc changer have
been reported to work.

EIDE/ATAPI multi-disc changers are also available. They aren't yet
supported by the Linux kernel. If you are interested in helping to add
support, contact B. Galliart (<htmlurl url="mailto:bgallia@luc.edu"
name="bgallia@luc.edu">).

<sect1>I get "/cdrom: Permission denied" errors<p>

Some CDs have file permissions that only allow user <tt>root</tt> to
read them. The March 1995 InfoMagic CD set is one example.

The following patch, courtesy of Christoph Lameter (<htmlurl
url="mailto:clameter@waterf.org" name="clameter@waterf.org">) patches
the kernel to get around this problem.

<verb>
From: clameter@waterf.org (Christoph Lameter)
Newsgroups: comp.os.linux.setup
Subject: Infomagic Developers Set: Fix for CD-Rom permissions
Date: 12 Apr 1995 20:32:03 -0700
Organization: The Water Fountain - Mining for streams of Living Water
NNTP-Posting-Host: waterf.org
X-Newsreader: TIN [version 1.2 PL2]

The March 1995 Edition of the Infomagic Developers CD-ROM Set has
problems because the information stored in the root directory
permissions is causing the following problems with using the CDs

1. Disc1 will always have the owner/group of 5101/51 and has write
access allowed (?)

2. Disc2 and 3 have rwx set for root and no rights at all for any
other group/user. These discs cannot be accessed from any user other
than root! I run a BBS and I need to make them accessible for download
by others.

I have seen several fixes to this problem already floating
around. Trouble is that these fixes usually change the rights for ALL
directories on the CD. This fix here changes ONLY the rights for the
root directory of the CD-Rom. If you want to run parts of Linux
directly off the CD you might run into trouble if all directories are
readable for everyone and if they are all owned by root.

This fix will set the rights for the root directory to r-xr-xr-x and
the owner/group to the values indicated in the uid and gid options to
the mount command.

To apply:
 cd /usr/src/linux/fs/isofs
 patch <**THIS MESSAGE**

and recompile kernel (you may have to fix up the patch by hand
depending on your kernel version).

This fix should probably be incorporated into the kernel. What business 
does data on a CD have to mess around with the permissions/owners of the 
mount-point anyways?

--- inode.c.ORIG	Wed Apr 12 17:24:36 1995
+++ inode.c	Wed Apr 12 17:59:12 1995
@@ -552,7 +552,15 @@
    these numbers in the inode structure. */
 
 	if (!high_sierra)
-	  parse_rock_ridge_inode(raw_inode, inode);
+	{  parse_rock_ridge_inode(raw_inode, inode);
+           /* check for access to the root directory rights/owner CL */
+	   if((inode->i_sb->u.isofs_sb.s_firstdatazone) == inode->i_ino)
+           { /* Change owner/rights to the ones demanded by the mount command */
+             inode->i_uid = inode->i_sb->u.isofs_sb.s_uid;
+             inode->i_gid = inode->i_sb->u.isofs_sb.s_gid;
+	     inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR;
+           }
+        }
 	
 #ifdef DEBUG
 	printk("Inode: %x extent: %x\n",inode->i_ino, inode->u.isofs_i.i_first_extent);
@@ -805,4 +813,3 @@
 }
 
 #endif
-
</verb>

<sect1>How do you pronounce "Matsushita" ?<p>

I'm told that the correct pronunciation it something like
MAT-SOOSH-TA.

<sect1>How do I interpret IDE CD kernel error messages?<p>

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"?

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 <url
url="/usr/src/linux/drivers/block/ide-cd.c"> and changing the value of
VERBOSE_IDE_CD_ERRORS to 1.

<sect>References<p>

I have already mentioned the README files, typically installed in <url
url="/usr/src/linux/drivers/block/">. These can be a gold mine of
useful information.

The following usenet FAQs are posted periodically to <htmlurl
url="news:news.answers" name="news.answers"> and archived at
internet FTP sites such as <url url="ftp://rtfm.mit.edu/">:

<itemize>
<item>alt.cd-rom FAQ
<item>comp.periphs.scsi FAQ
<item>Enhanced IDE/Fast-ATA/ATA-2 FAQ
</itemize>

Several other Linux HOWTOs have useful information relevant to CD-ROM:

<itemize>

<item><url url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html" name="SCSI
HOWTO">

<item><url url="http://sunsite.unc.edu/mdw/HOWTO/Hardware-HOWTO.html"
name="Hardware Compatibility HOWTO">

<item><url url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html"
name="Sound HOWTO">

<item><url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
name="Kernel HOWTO">

<item><url url="http://sunsite.unc.edu/mdw/HOWTO/Distribution-HOWTO.html"
name="Distribution HOWTO">

</itemize>

At least 10 companies sell Linux distributions on CD-ROM; most of them
are listed in the Distribution HOWTO.

The following Usenet news groups cover CD-ROM related topics:

<itemize>
<item><htmlurl url="news:comp.publish.cdrom.hardware"
name="comp.publish.cdrom.hardware">
<item><htmlurl url="news:comp.publish.cdrom.multimedia"
name="comp.publish.cdrom.multimedia">
<item><htmlurl url="news:comp.publish.cdrom.software"
name="comp.publish.cdrom.software">
<item><htmlurl url="news:comp.sys.ibmpc.hardware.cd-rom"
name="comp.sys.ibm.pc.hardware.cd-rom">
<item><htmlurl url="news:alt.cd-rom" name="alt.cd-rom">
<item><htmlurl url="news:alt.cd-rom.reviews" name="alt.cd-rom.reviews">
</itemize>

The <tt>comp.os.linux</tt> newsgroups are also good sources of Linux
specific information.

There is a large archive of CD-ROM information and software at <url
url="ftp://ftp.cdrom.com/pub/cdrom/">.

A FAQ document on IDE and ATA devices can be found at <url
url="ftp://rftm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-IDE/">
and at <url url="http://www.seagate.com/techsuppt/faq/faqlist.html">.

Western Digital, the company that started the IDE protocol, has
information available on the IDE protocol available on their FTP site
at <url url="ftp://fission.dt.wdc.com/pub/standards/atapi">.

A Web site dedicated to multimedia can be found at <url
url="http://viswiz.gmd.de/MultimediaInfo/">. Creative Labs has a Web
site at <url url="http://www.creaf.com/">.

The Linux Documentation Project has produced several books on Linux,
including <em>Linux Installation and Getting Started</em>. These are
freely available by anonymous FTP from major Linux archive sites or
can be purchased in hardcopy format.

The <em>Linux Software Map</em> (LSM) is an invaluable reference for
locating Linux software. The LSM can be found on various anonymous FTP
sites, including <url
url="ftp://sunsite.unc.edu/pub/Linux/docs/LSM.gz/">.

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 <htmlurl
url="mailto:majordomo@vger.rutgers.edu"
name="majordomo@vger.rutgers.edu">.

</article>
