6 Answers to Frequently Asked Questions

Contents of this section

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.

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

6.5 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 works with the Toshiba XM3401 and XM4101 SCSI drives. The package is called cdda2wav.tar.gz and can be found on sunsite.unc.edu. Other users have reported success with the Chinon 535 and Toshiba 3601B drives.

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://ftp.gwdg.de/pub/linux/misc/cdda2wav-sbpcd.2.tar.gz .

Even though the standard cdda2wav program claims to support the Panasonic drives, it does not yet work properly, because of the need to handle "overlap" of the data.

The CDU-33 driver supports reading audio data. It is said to work with the cdda2wav program.

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

6.6 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.7 Is the Reveal Multimedia Effects kit CD-ROM supported?

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

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:

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:

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

I expect the appropriate line for a Reveal card to be

append="cdu31a=0x654,0"

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 /usr/src/linux/drivers/block/cdu31a.c ; search for the string "cdu31a_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 --

  1. 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.
  2. 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:
    rdev  /dev/fd0 /dev/fd0                 ; root=floppy
    rdev -r /dev/fd0 1440                   ; ramdisk
    rdev -t /dev/fd0 -3                     ; prompt for screen mode
    
    Then use it to boot the installation root-disk. Make a mount point for the CD that won't interfere with the installation procedure:
    # mkdir /cd
    # mount -r -t iso9660 /dev/fd0 /cd
    
    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.
  3. 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.

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.

6.8 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.9 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.10 Why does the disc 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 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 "eject" program).

6.11 I have a "special" CD that can't be mounted

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 does 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_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:

  1. The disc doesn't use an ISO-9660 file system (e.g. some use SunOS)
  2. It is an audio CD
  3. The CD is damaged or defective
  4. You put it in the drive upside down :-)

6.12 Why does the drive light flash on my CDU-33 drive?

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

6.13 Do multi-platter CD-ROM drives work with Linux?

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.

6.14 How do you pronounce "Matsushita" ?

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

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter