The Linux CD-ROM HOWTO

Jeff Tranter, Jeff Tranter@Mitel.COM v1.2, 21 August 1994

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.

Contents

1 Introduction 2 1.1 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 New Versions Of This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 CD-ROM Technology 3

3 Supported Hardware 4 3.1 SCSI CD-ROM Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2 Proprietary CD-ROM Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 IDE CD-ROM Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Installation 6 4.1 Installing Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.2 Configuring and Building the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.3 Creating the Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.3.1 Matsushita/Kotobuki/Panasonic/Creative Labs . . . . . . . . . . . . . . . . . . . . . . 7 4.3.2 Sony CDU31A/CDU33A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.3.3 Sony CDU535/CDU531 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.3.4 Mitsumi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.3.5 LMS/Philips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.3.6 SCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.4 Mounting/Unmounting/Ejecting Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.5 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5 Applications 10

5.1 Audio CD players . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.2 Inheriting File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.3 PhotoCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.4 Mkisofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.5 9660 u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

6 Answers to Frequently Asked Questions 12 6.1 How can a non-root user mount and unmount discs? . . . . . . . . . . . . . . . . . . . . . . . 12 6.2 Why do I get device is busy when unmounting a CD-ROM? . . . . . . . . . . . . . . . . . 13 6.3 How do I export a CD-ROM to other hosts over NFS? . . . . . . . . . . . . . . . . . . . . . . 13 6.4 Can I boot Linux from a CD-ROM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 6.5 Why doesn’t the kernel recognize my CD-ROM drive? . . . . . . . . . . . . . . . . . . . . . . 13 6.6 How can I read digital data from audio CDs? . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 6.7 How do I turn off the autoprobing messages on boot? . . . . . . . . . . . . . . . . . . . . . . 14 6.8 Why doesn’t the find command work properly? . . . . . . . . . . . . . . . . . . . . . . . . . 14 6.9 Is the Reveal Multimedia Effects kit CD-ROM supported? . . . . . . . . . . . . . . . . . . . . 14 6.10 Does Linux support any recordable CD-ROM drives? . . . . . . . . . . . . . . . . . . . . . . . 15 6.11 The eject function (e.g. from Workman) does not work! . . . . . . . . . . . . . . . . . . . . . 15 6.12 You say I need to configure and build a kernel - how do I do that? . . . . . . . . . . . . . . . 15 6.13 Why do I get mount: Read-only file system when mounting a CD-ROM? . . . . . . . . 16 6.14 Why does the disk tray open when I shut down the system? . . . . . . . . . . . . . . . . . . . 16

7 References 16

1 Introduction

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.

1.1 Acknowledgments

Much of this information came from the file README.sbpcd provided with the Linux kernel source code and written by Eberhard Moenkeberg (eberhard moenkeberg@rollo.central.de), the internet alt.cd-rom FAQ, and input from Linux users.

Thanks to Matt Welsh’s Linuxdoc-SGML package, this HOWTO is now available in several formats, all generated from a common source file.

1.2 Revision History

Version 1.0 first version made publicly available

Version 1.1 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

Version 1.2 ISO9660 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 on new sbpcd autoeject feature

1.3 New Versions Of This Document

New versions of this document will be periodically posted to comp.os.linux.announce. They will also be uploaded to various anonymous ftp sites that archive such information including

sunsite.unc.edu:/pub/Linux/docs/HOWTO.

1.4 Feedback

I rely on you, the users, to make this HOWTO useful. If you have any suggestions, corrections, or comments, please send them to the author and I will try to incorporate them in the next revision.

2 CD-ROM Technology

"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

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

CD-ROM stands for Compact Disc Read-Only Memory, 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 single speed), provide a transfer rate of approximately 150 kilobytes per second. Double speed drives are commonly available, and triple and quad speed drives have recently been introduced.

Most CD-ROM drives use either the Small Computer Systems Interface (SCSI) or a vendor proprietary interface. They also typically support playing audio CDs via an external headphone jack or line level output.

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

PhotoCD 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.

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.

3 Supported Hardware

This section lists the CD-ROM drivers and interfaces that are currently supported under Linux. The information here is based on the latest Linux kernel, which at time of writing was version 1.1.46 (and changing by the minute).

3.1 SCSI CD-ROM Drives

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.

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 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. does not support adding other SCSI devices on the bus).

3.2 Proprietary CD-ROM Drives

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. The following proprietary CD-ROM drives are supported by the Linux kernel (drives listed together are compatible):

• Matsushita/Kotobuki/Panasonic/Creative Labs models CR-521, CR-522, CR-523, CR-562, CR-563 • Mitsumi/Radio Shack

• Sony CDU31A and CDU33A

• Sony CDU535 and CDU531 (driver is available as a kernel patch)

• LMS/Philips CD205/225/202 (driver is available as a kernel patch)

The following sound card interfaces are supported:

• SoundBlaster/Pro

• SoundBlaster/16 (both the proprietary interface and SCSI versions)

• Galaxy

• SoundFX

• Spea Media FX sound card (Sequoia S-1000)

The following interface cards are also supported:

• Panasonic CI-101P

• LaserMate

• Aztech (see below)

• WDH-7001C

Note that only the older Aztech drives compatible with Matsushita/Panasonic are supported; newer models use a different interface and are not supported. The Matsushita/Kotobuki/Panasonic/Creative Labs kernel driver supports multi-session, PhotoCD, and up to 4 drives with one controller card. A maximum of 4 controller cards is also supported. Drivers for some additional devices are in development and may be available as kernel patches. They can most likely be found on sunsite.unc.edu in the directory /pub/Linux/kernel/patches/cdrom. Check the Linux Software Map for availability.

3.3 IDE CD-ROM Drives

CD-ROM drives based on a modified version the IDE hard disk (ATAPI) standard have recently been introduced. One such drive is the NEC CDR-260. An alpha release of a Linux kernel driver for it is available on sunsite.unc.edu. It was written by Scott Snyder (snyder@fnald0.fnal.gov).

Note that the proprietary interfaces are sometimes erroneously referred to as IDE interfaces, because like IDE, they use a simple interface based on the PC/AT bus.

4 Installation

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

1. Installing the hardware.

2. Configuring and building the Linux kernel.

3. Creating the necessary device files.

4. Mounting the media.

4.1 Installing Hardware

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.

4.2 Configuring and Building the Kernel

In order to use a CD-ROM you need the appropriate device drivers. To mount most CD-ROM discs you also need the ISO-9660 file system support in the kernel. Follow your usual procedure for building the kernel: do a ”make config” and select the appropriate drivers when prompted.

For SCSI CD-ROMs you need to answer ”yes” to ”SCSI support?”, and then enable ”Scsi CDROM support” and the driver for the appropriate SCSI interface (e.g. ”Adaptec AHA1542 support”).

For the proprietary interface drives, select ”Sony CDU31A/CDU33A CDROM driver support”, ”Mitsumi CDROM driver support”, or ”Matsushita/Panasonic CDROM driver support”, according to your drive type.

For the Sony CDU535 and CDU531 drives you must obtain the driver separately and apply it as a kernel patch.

If you are using the Matsushita/Panasonic drive, you have the choice of letting the kernel autoprobe for the drive, passing it on the kernel command line, or explicitly setting it in the file /usr/src/linux/include/linux/sbpcd.h. It is recommended that you initially set it to auto-probe. Later you can set the type and save some time during bootup.

Again, remember to compile in the ISO-9660 file system support. The Rock Ridge extensions are fully supported by the kernel driver.

If you have a sound card that is supported under Linux, you should enable and confgure the kernel sound driver at this time as well.

After selecting the device drivers, compile the kernel and install it following your usual procedure.

4.3 Creating the Device Files

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 setup tool that includes CD-ROM setup, and most systems have a /dev/MAKEDEV script. It is recommended that you at least verify the device files against the information in this section.

Create the device file by running the shell commands indicated for your drive type. This should be done as user root. 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 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

     % ln -s /dev/sbpcd /dev/cdrom

If you want to play audio CDs, you will need to set the protection on the device files to allow users to read and write, e.g.

     % chmod 666 /dev/sbpcd

4.3.1 Matsushita/Kotobuki/Panasonic/Creative Labs

Up to four drives per controller are supported. Only the first device is needed if you have only one drive. 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 :-).

     % mknod /dev/sbpcd  b 25 0
     % mknod /dev/sbpcd0 b 25 0
     % mknod /dev/sbpcd1 b 25 1
     % mknod /dev/sbpcd2 b 25 2
     % mknod /dev/sbpcd3 b 25 3

4.3.2 Sony CDU31A/CDU33A

Only one drive is supported by this kernel driver. See the comments in the file /usr/src/linux/drivers/block/cdu31a.c for information on configuring the interface card.

     % mknod /dev/cdu31a b 15 0

4.3.3 Sony CDU535/CDU531

Note again that the driver is currently only available as a kernel patch.

     % mknod /dev/cdu535 b 24 0

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

4.3.4 Mitsumi

The kernel supports one Mitsumi drive. Recent kernels (1.1.25) incorporate changes to improve performance.

     % mknod /dev/mcd b 23 0

4.3.5 LMS/Philips

Note again that this driver is currently only available as a kernel patch. See the README file included with the patches for more information.

     % mknod /dev/lmscd b 24 0

4.3.6 SCSI

Up to two drives are supported, corresponding to the first two CD-ROM devices found by the kernel.

     % mknod /dev/scd0 b 11 0
     % mknod /dev/scd1 b 11 1

4.4 Mounting/Unmounting/Ejecting Devices

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

     SBPCD version 2.5 Eberhard Moenkeberg <emoenke@gwdg.de>
     SBPCD: Looking for a SoundBlaster/Matsushita CD-ROM drive
     SBPCD:
     SBPCD: = = = = = = = = = = W A R N I N G = = = = = = = = = =
     SBPCD: Auto-Probing can cause a hang (f.e. touching an ethernet card).
     SBPCD: If that happens, you have to reboot and use the
     SBPCD: LILO (kernel) command line feature like:
     SBPCD:
     SBPCD:    LILO boot: linux sbpcd=0x230,SoundBlaster
     SBPCD: or like:
     SBPCD:    LILO boot: linux sbpcd=0x300,LaserMate
     SBPCD: or like:
     SBPCD:    LILO boot: linux sbpcd=0x330,SPEA

     SBPCD:
     SBPCD: with your REAL address.
     SBPCD: = = = = = = = = = = END of WARNING = = = = = = = = = =
     SBPCD:
     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.

(If the bootup messages scroll by too quickly to read, you should be able to retrieve them with the dmesg command)

To mount a CD-ROM, insert a disc in the drive, and run the mount command as root (this assumes you created a symbolic link to your device file as recommended above):

     % mount -t iso9660 -r /dev/cdrom /mnt

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

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

Note that to play audio CDs you should not try to mount them.

To unmount a CD-ROM, use the umount command as root:

     % umount /mnt

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. 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 will automatically eject a CD-ROM when it is unmounted and insert the CD tray when a disc is mounted (starting with the 1.1.38 kernel).

4.5 Troubleshooting

If you still encounter problems, here are some things to check.

If you recompiled the kernel yourself, verify that you are running the new kernel by looking at the timestamp:

     % uname -a
     Linux fizzbin 1.1.31 #1 Wed Jul 20 16:53:35 EDT 1994 i386

With recent 1.1.x kernels, you can see what drivers are compiled in by looking at /proc/devices:

     % 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

Try reading from the CD-ROM drive. Typing the following command should cause the drive activity light 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.

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

If you can read from the drive but cannot mount it, verify that you compiled in ISO9660 file system support. With the 1.1.x kernels this can be done as follows:

     % cat /proc/filesystems
             ext2
             msdos
     nodev   proc
             iso9660

Make sure you are mounting the drive with the ”-t iso9660” and ”-r” options and that a known good CD-ROM is inserted in the drive.

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:

     % dmesg
     SBPCD: sbpcd_open: no disk in drive

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

5 Applications

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.

5.1 Audio CD players

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

Workman

a graphical player running under X11 and supporting a CD database and many other features WorkBone

an interactive text-mode player xcdplayer

a simple X11 based player cdplayer

a very simple command line based player Xmcd

an X11/Motif based player xmitsumi

another X11 based player for Mitsumi drives xplaycd

another X11 based player, bundled with sound mixer and VU meter programs cdtool

command line tools for playing audio CDs

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

5.2 Inheriting File System

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 (almesber@bernina.ethz.ch).

5.3 PhotoCD

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

The hpcdtoppm program by Hadmut Danisch converts PhotoCD files to the portable pixmap format. It can be obtained from 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 photocd program by Gerd Knorr 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 xpcd, 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 ftp.cs.tu-berlin.de:/pub/linux/Local/misc.

(I’ve actually tried a PhotoCD! If anyone wants more detail on how to view files, etc... let me know and I can expand this section).

5.4 Mkisofs

Eric Youngdale’s mkisofs 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.

5.5 9660 u

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 on ftp.cdrom.com in the /pub/ptf directory. They were written by Bill Siegmund and Rich Morin.

6 Answers to Frequently Asked Questions

6.1 How can a non-root user mount and unmount discs?

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

     /dev/sbpcd  /cdrom   iso9660     user,noauto,ro

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

     % mount /cdrom
     % umount /cdrom

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 usermount 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 ftp.cdrom.com has the source file mount.c which allows mounting an unmounting of CD-ROMs (only) by normal users. It runs as a setuid executable.

6.2 Why do I get device is busy when unmounting a CD-ROM?

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

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

6.3 How do I export a CD-ROM to other hosts over NFS?

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

6.4 Can I boot Linux from a CD-ROM?

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.

6.5 Why doesn’t the kernel recognize my CD-ROM drive?

If you have a proprietary interface at a non-standard address, you may need to set the i/o port location in the appropriate kernel header file. Similarly, auto-probing by the kernel driver may conflict with another device (e.g. network card) and cause your system to hang.

For the Matsushita/Kotubuki/Panasonic/Creative Labs drives, you need to edit the file sbpcd.h. For the Mitsumi drives it is mcd.h and for Sony drives it is cdu31a.h. All of these files are normally installed in

/usr/include/linux.

6.6 How can I read digital data from audio CDs?

Only a few CD-ROM drives support this. Heiko Eissfeldt (heiko@colossus.escape.de) and Olaf Kindel have written a utility that reads audio data and saves it as .wav format sound files. It only works with the Toshiba XM3401 and XM4101 SCSI drives. The package is called cdda2wav.tar.gz and can be found on

sunsite.unc.edu.

The Panasonic SBPCD driver also has support for reading sound data beginning with the 2.0 driver included in the 1.1.22 kernel. A modified version of the cdda2wav program that works with this can be found at

ftp.gwdg.de in /pub/linux/misc/cdda2wav-sbpcd.2.tar.gz (a newer version may be available by the

time you read this).

At time of writing there was a new driver for the Mitsumi drives in alpha test that supported reading audio tracks.

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

6.7 How do I turn off the autoprobing messages on boot?

The SBPCD driver displays a lot of information during bootup. If you want to suppress this, set the variable sbpcd debug in the file sbpcd.c. The comments in the file explain the various values that this can be set to.

6.8 Why doesn’t the find command work properly?

On ISO-9660 formatted discs without the Rock Ridge Extensions, you need to add the -noleaf option to the find 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 find program is to look for (i links - 2) subdirectories in each directory, and it then assumes that the rest are regular files. The -noleaf switch disables this optimization.

6.9 Is the Reveal Multimedia Effects kit CD-ROM supported?

(the following was provided by Horne@leader.pfc.mit.edu)

Here’s what I discovered about the Reveal Multimedia kits that are available fairly cheap ($300 or so) from department stores. After some thrashing I discovered how to make the following CD work under linux.

This is a Reveal Multimedia FX kit, which includes a Sound FX SC400 sound card, which has interfaces for Sony CDU33A, Panasonic CR-563, and Mitsumi LU005s. My kit includes a Sony.

The tricks to making the Sony CD work are as follows:

• Decide which kernel to patch. I pulled the 1.0 kernel off the Trans-Ameritech CD-ROM via DOS (My system started out as SLS a long time ago)

• Add addresses 0x634, 0x654 to the table at the top of the cdu31a driver:

          static unsigned short cdu31a_addresses[] =
          {
             0x340,       /* Standard configuration Sony Interface */
             0x1f88,      /* Fusion CD-16 */

             0x230,       /* SoundBlaster 16 card */
             0x360,       /* Secondary standard Sony Interface */
             0x320,       /* Secondary standard Sony Interface */
             0x330,       /* Secondary standard Sony Interface */
             0x634,
             0x654,
             0
          };

• Recompile your kernel, specifying Sony CDU31A and ISO9960 support

• Create the device file (use major number 15, not 21 as in the Transameritech doc)

          % mknod /dev/cd b 15 0

• Mount the drive

          % mount -t iso9660 -r /dev/cd /cdrom

I’m still working on the actual sound support (I don’t really need it yet) but that should be much easier.

Thanks to Reveal tech support for the info that the CD interface is at 0x414 off of the soundcard base address, Roman at Trans-Ameritech (roman@btr.btr.com) who suggested patching the CDU31A driver, and Dale Elrod (dale@post.dungeon.com) who provided an existence proof (Dale, your zImage didn’t recognize the drive - I expect you actually have slightly different hardware. I’d have returned this thing a week ago, though, if I hadn’t thought you had it working.)

The original driver is due to minyard@wf-rch.cirr.com, and Linus made it all possible.

6.10 Does Linux support any recordable CD-ROM drives?

According to Adam J. Richter, 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 mkisofs to make an ISO-9660 filesystem and cdwrite 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$2.95/minute, U.S. only).

6.11 The eject function (e.g. from Workman) does not work!

The SBPCD driver had a problem where the drive could be locked and the eject ioctl() would fail. This appears to be corrected starting with the 1.1.29 kernel.

6.12 You say I need to configure and build a kernel - how do I do that?

This is not the kernel HOWTO (any volunteers?). Until one is written, try reading the file /usr/src/linux/README; it is reasonably complete.

If you really don’t want to compile a kernel, you may be able to find a precompiled kernel that has the drivers you need as part of a Linux distribution (e.g. the Slackware ”q” series of disks).

6.13 Why do I get mount: Read-only file system when mounting a CD-ROM?

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

6.14 Why does the disk tray open when I shut down the system?

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

This feature is for convenience when changing disks. 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). You can turn of the feature by commenting out the line

     #define EJECT 1

in the file /usr/src/linux/drivers/block/sbpcd.c and recompile the kernel.

7 References

Information on the Panasonic CD-ROM driver can be found in the file

/usr/src/linux/drivers/block/README.sbpcd.

The following usenet FAQs are posted periodically to news.answers and archived at internet FTP sites such

as rtfm.mit.edu:

• alt.cd-rom FAQ

• comp.periphs.scsi FAQ

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

• SCSI HOWTO

• Hardware Compatibility HOWTO

• Sound HOWTO

• Distribution HOWTO

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:

• comp.publish.cdrom.hardware

• comp.publish.cdrom.multimedia

• comp.publish.cdrom.software

• comp.sys.ibm.pc.hardware.cd-rom

• alt.cd-rom

• alt.cd-rom.reviews

The internet site ftp.cdrom.com has a large archive of CD-ROM information and software; look in the

directory /pub/cdrom.

The Linux Documentation Project has produced several books on Linux, including Linux Installation and Getting Started. These are freely available by anonymous FTP from major Linux archive sites or can be purchased in hardcopy format. The Linux Software Map (LSM) is an invaluable reference for locating Linux software. The LSM can be found on various anonymous FTP sites, including sunsite.unc.edu:/pub/Linux/docs/LSM.gz.