home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / CDROM-HO < prev    next >
Encoding:
Text File  |  1995-04-20  |  38.4 KB  |  1,215 lines

  1.   The Linux CD-ROM HOWTO
  2.   Jeff Tranter, Jeff_Tranter@Mitel.COM
  3.   v1.4, 2 December 1994
  4.  
  5.   This document describes how to install, configure, and use CD-ROM
  6.   drives under Linux. It lists the supported hardware and answers a num-
  7.   ber of frequently asked questions. The intent is to bring new users up
  8.   to speed quickly and reduce the amount of traffic in the usenet news
  9.   groups.
  10.  
  11.   1.  Introduction
  12.  
  13.  
  14.   This is the Linux CD-ROM HOWTO document. It is intended as a quick
  15.   reference covering everything you need to know to install and
  16.   configure CD-ROM hardware under Linux. Frequently asked questions
  17.   related to CD-ROM are answered, and references are given to other
  18.   sources of information related to CD-ROM applications and technology.
  19.  
  20.  
  21.   1.1.  Acknowledgments
  22.  
  23.  
  24.   Much of this information came from the file README.sbpcd provided with
  25.   the Linux kernel source code and written by Eberhard Moenkeberg
  26.   (eberhard_moenkeberg@rollo.central.de), the internet alt.cd-rom FAQ,
  27.   and input from Linux users.
  28.  
  29.   Thanks to the Linuxdoc-SGML package, this HOWTO is available in
  30.   several formats, all generated from a common source file.
  31.  
  32.  
  33.   1.2.  Revision History
  34.  
  35.  
  36.  
  37.      Version 1.0
  38.         first version made publicly available
  39.  
  40.      Version 1.1
  41.         CDU33A is explicitly supported as of 1.1.20 kernel; notes on
  42.         Reveal FX; info on reading audio tracks; info on some alpha
  43.         drivers; added troubleshooting section; a few other minor
  44.         additions
  45.  
  46.      Version 1.2
  47.         ISO9660 file systems must be mounted read-only starting with
  48.         1.1.33 kernel; clarified that SB16 SCSI is supported and newer
  49.         Aztech drives are not supported; references to photocd and xpcd
  50.         programs; note new on sbpcd autoeject feature
  51.  
  52.      Version 1.3
  53.         minor change to the way SBPCD eject feature is disabled starting
  54.         with the 1.1.49 kernel; added info on XA discs and how to
  55.         identify them
  56.  
  57.      Version 1.4
  58.         HOWTO now available in other languages; IBM and Longshine drives
  59.         now supported by SBPCD; alpha driver for Aztech drives; CDU-33
  60.         driver no longer auto-probes, supports PhotoCD and audio; more
  61.         than 2 SCSI drives are supported; new driver for IDE; reminder
  62.         to check drive jumpers; can now set SBPCD auto-eject with IOCTL;
  63.         list drivers with multisession support; question on flashing
  64.         light on CDU-33
  65.  
  66.  
  67.   1.3.  New Versions Of This Document
  68.  
  69.  
  70.   New versions of this document will be periodically posted to
  71.   comp.os.linux.announce. They will also be uploaded to various
  72.   anonymous ftp sites that archive such information including
  73.   sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  74.  
  75.   Hypertext versions of this and other Linux HOWTOs are available on
  76.   many World-Wide-Web sites. You can also buy printed copies from
  77.   several vendors.
  78.  
  79.   A French translation of this HOWTO, by Bruno Cornec
  80.   (cornec@stna7.stna.dgac.fr) is available at
  81.   ftp.ibp.fr:/pub2/linux/french/docs/HOWTO. A Japanese translation is
  82.   also in progress.
  83.  
  84.  
  85.   1.4.  Feedback
  86.  
  87.  
  88.   I rely on you, the users, to make this HOWTO useful. If you have any
  89.   suggestions, corrections, or comments, please send them to the author
  90.   and I will try to incorporate them in the next revision.
  91.  
  92.  
  93.   2.  CD-ROM Technology
  94.  
  95.  
  96.  
  97.   "CD-ROM is read-only memory, and audio compact disc system is
  98.   available as package-media of digital data for those purpose. For
  99.   playing audio CD, please insert Head-phone jack."
  100.   --- from a CD-ROM instruction manual
  101.  
  102.  
  103.  
  104.   Don't Panic! The world of CD-ROM technology is not as confusing as
  105.   your instruction manual.
  106.  
  107.   CD-ROM stands for Compact Disc Read-Only Memory, a mass storage medium
  108.   utilizing an optical laser to read microscopic pits on the aluminized
  109.   layer of a polycarbonate disc. The same format is used for audio
  110.   Compact Discs. Because of its high storage capacity, reliability, and
  111.   low cost, CD-ROM has become an increasingly popular storage media.
  112.  
  113.   The storage capacity of a CD-ROM disc is approximately 650 megabytes,
  114.   equivalent to over 500 high density 3.5" floppy disks or roughly
  115.   250,000 typed pages.
  116.  
  117.   First generation drives (known as single speed), provide a transfer
  118.   rate of approximately 150 kilobytes per second. Double speed drives
  119.   are commonly available, and triple and quad speed drives have recently
  120.   been introduced.
  121.  
  122.   Most CD-ROM drives use either the Small Computer Systems Interface
  123.   (SCSI) or a vendor proprietary interface. They also typically support
  124.   playing audio CDs via an external headphone jack or line level output.
  125.  
  126.   CD-ROMs are usually formatted with an ISO-9660 (formerly called High
  127.   Sierra) file system. This format restricts filenames to the MS-DOS
  128.   style (8+3 characters). The Rock Ridge Extensions use undefined fields
  129.   in the ISO-9660 standard to support longer filenames and additional
  130.   Unix style information (e.g. file ownership, symbolic links, etc.).
  131.  
  132.  
  133.   PhotoCD is a standard developed by Kodak for storing photographic
  134.   images as digital data on a CD-ROM. With appropriate software, you can
  135.   view the images on a computer, manipulate them, or send them to a
  136.   printer.
  137.  
  138.   CD recorders (CD-R) have recently become available. They use a
  139.   different media and specialized equipment for recording, but the
  140.   resulting disc can be read by any CD-ROM drive.
  141.  
  142.  
  143.   3.  Supported Hardware
  144.  
  145.  
  146.   This section lists the CD-ROM drivers and interfaces that are
  147.   currently supported under Linux. The information here is based on the
  148.   latest Linux kernel, which at time of writing was version 1.1.69.
  149.  
  150.  
  151.   3.1.  SCSI CD-ROM Drives
  152.  
  153.  
  154.   SCSI (Small Computer Systems Interface) is a popular format for CD-ROM
  155.   drives. Its chief advantages are a reasonably fast transfer rate,
  156.   multi-device capability, and support on a variety of computer
  157.   platforms.
  158.  
  159.   Any SCSI CD-ROM drive with a block size of 512 or 2048 bytes should
  160.   work under Linux; this includes the vast majority of CD-ROM drives on
  161.   the market.
  162.  
  163.   You will also need a supported SCSI controller card; see the SCSI
  164.   HOWTO for more information on interface hardware.
  165.  
  166.   Note that some CD-ROMs include a controller with a modified interface
  167.   that is not fully SCSI compatible (e.g. it may not support adding
  168.   other SCSI devices on the bus).
  169.  
  170.  
  171.   3.2.  Proprietary CD-ROM Drives
  172.  
  173.  
  174.   Several CD-ROM drives using proprietary interfaces are available; the
  175.   interface is often provided on a sound card. Simple interface cards
  176.   equivalent to that provided on the sound card are also available.
  177.   These drives generally tend to be lower in cost and smaller than SCSI
  178.   drives.
  179.  
  180.   The following proprietary CD-ROM drives are supported by the Linux
  181.   kernel (drives listed together are compatible):
  182.  
  183.  
  184.   o  Matsushita/Kotobuki/Panasonic/Creative Labs models CR-521, CR-522,
  185.      CR-523, CR-562, CR-563, Longshine LCS-7260, IBM
  186.  
  187.   o  Mitsumi/Radio Shack
  188.  
  189.   o  Sony CDU31A and CDU33A
  190.  
  191.   o  Sony CDU535 and CDU531 (driver is available as a kernel patch)
  192.  
  193.   o  LMS/Philips CD205/225/202 (driver is available as a kernel patch)
  194.  
  195.   o  NEC CDR-260 (driver is available as a kernel patch)
  196.  
  197.   o  Aztech CD268A (driver is available as a kernel patch)
  198.  
  199.   The following sound card interfaces are supported:
  200.  
  201.  
  202.   o  SoundBlaster/Pro
  203.  
  204.   o  SoundBlaster/16 (both the proprietary interface and SCSI versions)
  205.  
  206.   o  Galaxy
  207.  
  208.   o  SoundFX
  209.  
  210.   o  Spea Media FX sound card (Sequoia S-1000)
  211.  
  212.   The following interface cards are also supported:
  213.  
  214.  
  215.   o  Panasonic CI-101P
  216.  
  217.   o  LaserMate
  218.  
  219.   o  Aztech (see below)
  220.  
  221.   o  WDH-7001C
  222.  
  223.   IBM sells an external CD-ROM drive and interface card that is
  224.   compatible with the Panasonic CR-562 driver.
  225.  
  226.   Only the older Aztech drives compatible with the Matsushita/Panasonic
  227.   driver. There is an ALPHA driver available separately for the CD268A
  228.   drive.  You can find it at ftp.gwdg.de in the directory
  229.   pub/linux/cdrom/drivers/aztech.
  230.  
  231.   Drivers for some additional devices are in development and may be
  232.   available as kernel patches. They can most likely be found on
  233.   sunsite.unc.edu in the directory /pub/Linux/kernel/patches/cdrom.
  234.   Check the Linux Software Map for availability.
  235.  
  236.  
  237.   3.3.  IDE CD-ROM Drives
  238.  
  239.  
  240.   CD-ROM drives based on a modified version the IDE hard disk (ATAPI)
  241.   standard have recently been introduced. One such drive is the NEC
  242.   CDR-260. An alpha release of a Linux kernel driver for IDE hard disks
  243.   and CD-ROM drives is available on sunsite.unc.edu. It works with the
  244.   NEC CDR-260 and possibly others.
  245.  
  246.   Note that the proprietary interfaces are sometimes erroneously
  247.   referred to as IDE interfaces, because like IDE, they use a simple
  248.   interface based on the PC/AT bus.
  249.  
  250.  
  251.   4.  Installation
  252.  
  253.  
  254.   Installation of CD-ROM under Linux consists of these steps:
  255.  
  256.  
  257.   1. Installing the hardware.
  258.  
  259.   2. Configuring and building the Linux kernel.
  260.  
  261.   3. Creating the necessary device files.
  262.  
  263.   4. Mounting the media.
  264.  
  265.   4.1.  Installing Hardware
  266.  
  267.  
  268.   Follow the manufacturer's instructions for installing the hardware or
  269.   have your dealer perform the installation. The details will vary
  270.   depending on whether the drive is internal or external and on the type
  271.   of interface used. There are no special installation requirements for
  272.   Linux. You may need to set jumpers on the drive and/or interface card
  273.   for correct operation.
  274.  
  275.  
  276.   4.2.  Configuring and Building the Kernel
  277.  
  278.  
  279.   In order to use a CD-ROM you need the appropriate device drivers. To
  280.   mount most CD-ROM discs you also need the ISO-9660 file system support
  281.   in the kernel. Follow your usual procedure for building the kernel: do
  282.   a "make config" and select the appropriate drivers when prompted.
  283.  
  284.   For SCSI CD-ROMs you need to answer "yes" to "SCSI support?", and then
  285.   enable "Scsi CDROM support" and the driver for the appropriate SCSI
  286.   interface (e.g. "Adaptec AHA1542 support").
  287.  
  288.   For the proprietary interface drives, select "Sony CDU31A/CDU33A CDROM
  289.   driver support", "Mitsumi CDROM driver support", or
  290.   "Matsushita/Panasonic CDROM driver support", according to your drive
  291.   type. The Matsushita driver also supports up to 4 controllers.
  292.  
  293.   For other drive types you must obtain the driver separately and apply
  294.   it as a kernel patch.
  295.  
  296.   If you are using the Matsushita/Panasonic drive, you have the choice
  297.   of letting the kernel auto-probe for the drive, passing it on the
  298.   kernel command line, or explicitly setting it in the file
  299.   /usr/src/linux/include/linux/sbpcd.h. It is recommended that you
  300.   initially set it to auto-probe. Later you can set the type and save
  301.   some time during bootup.
  302.  
  303.   As of the 1.1.64 kernel, autoprobing for the CDU-31A drives has been
  304.   removed.  You now need to either add your drive to the configuration
  305.   table in the driver or use a LILO boot-line configuration. The format
  306.   of the LILO command line is:
  307.  
  308.  
  309.  
  310.        ______________________________________________________________________
  311.        cdu31a=<I/O address>,<interrupt>[,PAS]
  312.        ______________________________________________________________________
  313.  
  314.  
  315.  
  316.  
  317.   Setting the interrupt to 0 will disable the interrupts and use polled
  318.   I/O.  The PAS option is for ProAudioSpectum16 sound card users that
  319.   are not using the sound driver. A typical card would have a
  320.   configuration like one of the following:
  321.  
  322.  
  323.  
  324.        ______________________________________________________________________
  325.        cdu31a=0x340,0
  326.        cdu31a=0x340,5
  327.        ______________________________________________________________________
  328.  
  329.  
  330.  
  331.   The easiest way to set this up is to add a line such as the following
  332.   to your LILO configuration file:
  333.  
  334.  
  335.  
  336.        ______________________________________________________________________
  337.        append="cdu31a=0x1f88,0,PAS"
  338.        ______________________________________________________________________
  339.  
  340.  
  341.  
  342.  
  343.   Again, remember to compile in the ISO-9660 file system support. The
  344.   Rock Ridge extensions are fully supported by the kernel driver.
  345.  
  346.   If you have a sound card that is supported under Linux, you should
  347.   enable and configure the kernel sound driver at this time as well.
  348.  
  349.   After selecting the device drivers, compile the kernel and install it
  350.   following your usual procedure.
  351.  
  352.  
  353.   4.3.  Creating the Device Files
  354.  
  355.  
  356.   If you are running a standard Linux distribution you may have created
  357.   the necessary device files during installation.  Under Slackware
  358.   Linux, for example, there is a menu-based setup tool that includes CD-
  359.   ROM setup, and most systems have a /dev/MAKEDEV script. It is
  360.   recommended that you at least verify the device files against the
  361.   information in this section.
  362.  
  363.   Create the device file by running the shell commands indicated for
  364.   your drive type. This should be done as user root. Note that some
  365.   Linux distributions may use slightly different CD-ROM device names
  366.   from those listed here.
  367.  
  368.   It is recommended that you also create a symbolic link to the CD-ROM
  369.   device to make it easier to remember. For example, for a Panasonic CD-
  370.   ROM drive, the link would be created using
  371.  
  372.  
  373.  
  374.        ______________________________________________________________________
  375.        % ln -s /dev/sbpcd /dev/cdrom
  376.        ______________________________________________________________________
  377.  
  378.  
  379.  
  380.  
  381.   If you want to play audio CDs, you will need to set the protection on
  382.   the device files to allow users to read and write, e.g.
  383.  
  384.  
  385.  
  386.        ______________________________________________________________________
  387.        % chmod 666 /dev/sbpcd
  388.        ______________________________________________________________________
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.   4.3.1.  Matsushita/Kotobuki/Panasonic/Creative Labs/IBM
  398.  
  399.  
  400.   Up to four drives per controller are supported. Only the first device
  401.   is needed if you have only one drive. If you have more than one
  402.   controller, create devices with major numbers 26, 27, and 28, up to a
  403.   maximum of 4 controllers (this is 16 CD-ROM drives in total; hopefully
  404.   enough for most users :-).
  405.  
  406.  
  407.  
  408.        ______________________________________________________________________
  409.        % mknod /dev/sbpcd  b 25 0
  410.        % mknod /dev/sbpcd0 b 25 0
  411.        % mknod /dev/sbpcd1 b 25 1
  412.        % mknod /dev/sbpcd2 b 25 2
  413.        % mknod /dev/sbpcd3 b 25 3
  414.        ______________________________________________________________________
  415.  
  416.  
  417.  
  418.  
  419.  
  420.   4.3.2.  Sony CDU31A/CDU33A
  421.  
  422.  
  423.   Only one drive is supported by this kernel driver. See the comments in
  424.   the file /usr/src/linux/drivers/block/cdu31a.c for information on
  425.   configuring the interface card. As of the 1.1.60 kernel, the driver
  426.   supports playing audio CDs and PhotoCD (but not multisession yet).
  427.  
  428.  
  429.  
  430.        ______________________________________________________________________
  431.        % mknod /dev/cdu31a b 15 0
  432.        ______________________________________________________________________
  433.  
  434.  
  435.  
  436.  
  437.   See the kernel source file cdu31a.c for information on configuring the
  438.   drive interface card. Also see the notes given previously about
  439.   specifying the configuration on the LILO command line.
  440.  
  441.  
  442.   4.3.3.  Sony CDU535/CDU531
  443.  
  444.  
  445.   Note again that the driver is currently only available as a kernel
  446.   patch.
  447.  
  448.  
  449.  
  450.        ______________________________________________________________________
  451.        % mknod /dev/cdu535 b 24 0
  452.        ______________________________________________________________________
  453.  
  454.  
  455.  
  456.  
  457.   Some Linux distributions use /dev/sonycd for this device.  Older
  458.   versions of the driver used major device number 21; make sure your
  459.   device file is correct.
  460.  
  461.  
  462.  
  463.   4.3.4.  Mitsumi
  464.  
  465.  
  466.   The kernel supports one Mitsumi drive. Recent kernels (1.1.25)
  467.   incorporate changes to improve performance.
  468.  
  469.  
  470.  
  471.        ______________________________________________________________________
  472.        % mknod /dev/mcd b 23 0
  473.        ______________________________________________________________________
  474.  
  475.  
  476.  
  477.  
  478.  
  479.   4.3.5.  LMS/Philips
  480.  
  481.  
  482.   Note again that this driver is currently only available as a kernel
  483.   patch. See the README file included with the patches for more
  484.   information.
  485.  
  486.  
  487.  
  488.        ______________________________________________________________________
  489.        % mknod /dev/lmscd b 24 0
  490.        ______________________________________________________________________
  491.  
  492.  
  493.  
  494.  
  495.  
  496.   4.3.6.  SCSI
  497.  
  498.  
  499.   Multiple drives are supported (up to the limit of the number of
  500.   devices on the SCSI bus).  Create device files with major number 11
  501.   and minor numbers starting at zero:
  502.  
  503.  
  504.  
  505.        ______________________________________________________________________
  506.        % mknod /dev/scd0 b 11 0
  507.        % mknod /dev/scd1 b 11 1
  508.        ______________________________________________________________________
  509.  
  510.  
  511.  
  512.  
  513.  
  514.   4.3.7.  IDE Drives
  515.  
  516.  
  517.   Information on creating the devices files are included with the kernel
  518.   patch for these drives.
  519.  
  520.  
  521.   4.4.  Mounting/Unmounting/Ejecting Devices
  522.  
  523.  
  524.   You can now reboot with the new kernel. Watch for a message such as
  525.   the following indicating that the CD-ROM has been found by the device
  526.   driver (the message will vary depending on the drive type):
  527.  
  528.  
  529.        ______________________________________________________________________
  530.        SBPCD version 2.5 Eberhard Moenkeberg <emoenke@gwdg.de>
  531.        SBPCD: Looking for a SoundBlaster/Matsushita CD-ROM drive
  532.        SBPCD:
  533.        SBPCD: = = = = = = = = = = W A R N I N G = = = = = = = = = =
  534.        SBPCD: Auto-Probing can cause a hang (f.e. touching an ethernet card).
  535.        SBPCD: If that happens, you have to reboot and use the
  536.        SBPCD: LILO (kernel) command line feature like:
  537.        SBPCD:
  538.        SBPCD:    LILO boot: linux sbpcd=0x230,SoundBlaster
  539.        SBPCD: or like:
  540.        SBPCD:    LILO boot: linux sbpcd=0x300,LaserMate
  541.        SBPCD: or like:
  542.        SBPCD:    LILO boot: linux sbpcd=0x330,SPEA
  543.        SBPCD:
  544.        SBPCD: with your REAL address.
  545.        SBPCD: = = = = = = = = = = END of WARNING = = = = = = = = = =
  546.        SBPCD:
  547.        SBPCD: Trying to detect a SoundBlaster CD-ROM drive at 0x230.
  548.        SBPCD: - Drive 0: CR-562-x (0.76)
  549.        SBPCD: 1 SoundBlaster CD-ROM drive(s) at 0x0230.
  550.        SBPCD: init done.
  551.        ______________________________________________________________________
  552.  
  553.  
  554.  
  555.  
  556.   (If the bootup messages scroll by too quickly to read, you should be
  557.   able to retrieve them with the dmesg command)
  558.  
  559.   To mount a CD-ROM, insert a disc in the drive, and run the mount
  560.   command as root (this assumes you created a symbolic link to your
  561.   device file as recommended above):
  562.  
  563.  
  564.  
  565.        ______________________________________________________________________
  566.        % mount -t iso9660 -r /dev/cdrom /mnt
  567.        ______________________________________________________________________
  568.  
  569.  
  570.  
  571.  
  572.   The CD can now be accessed under the directory /mnt.  Note that /mnt
  573.   is commonly used as a temporary mount point; a more suitable name for
  574.   a permanent installation might be something like /cdrom.  There are
  575.   other options to the mount command that you may wish to use; see the
  576.   mount(8) man page for details.
  577.  
  578.   You can add an entry to /etc/fstab to automatically mount a CD-ROM
  579.   when Linux boots or to specify parameters to use when it is mounted;
  580.   see the fstab(5) man page.
  581.  
  582.   Note that to play audio CDs you should not try to mount them.
  583.  
  584.   To unmount a CD-ROM, use the umount command as root:
  585.  
  586.  
  587.  
  588.        ______________________________________________________________________
  589.        % umount /mnt
  590.        ______________________________________________________________________
  591.  
  592.  
  593.  
  594.  
  595.   The disc can only be unmounted if no processes are currently accessing
  596.   the drive (including having their default directory set to the mounted
  597.   drive). You can then eject the disc. Most drives have an eject button;
  598.   there is also a standalone eject program that allows ejecting CD-ROMs
  599.   under software control.
  600.  
  601.   Note that you should not eject a disc while it is mounted (this may or
  602.   may not be possible depending on the type of drive). The sbpcd driver
  603.   will automatically eject a CD-ROM when it is unmounted and insert the
  604.   CD tray when a disc is mounted (you can turn this feature off when
  605.   compiling the kernel or by using a software command).
  606.  
  607.  
  608.   4.5.  Troubleshooting
  609.  
  610.  
  611.   If you still encounter problems, here are some things to check.
  612.  
  613.   If you recompiled the kernel yourself, verify that you are running the
  614.   new kernel by looking at the timestamp:
  615.  
  616.  
  617.  
  618.        ______________________________________________________________________
  619.        % uname -a
  620.        Linux fizzbin 1.1.31 #1 Wed Jul 20 16:53:35 EDT 1994 i386
  621.        ______________________________________________________________________
  622.  
  623.  
  624.  
  625.  
  626.   With recent 1.1.x kernels, you can see what drivers are compiled in by
  627.   looking at /proc/devices:
  628.  
  629.  
  630.  
  631.        ______________________________________________________________________
  632.        % cat /proc/devices
  633.        Character devices:
  634.         1 mem
  635.         4 tty
  636.         5 cua
  637.         6 lp
  638.        14 sound
  639.        15 Joystick
  640.  
  641.        Block devices:
  642.         2 fd
  643.         3 hd
  644.        25 sbpcd
  645.        ______________________________________________________________________
  646.  
  647.  
  648.  
  649.  
  650.   If your drive has hardware jumpers for addressing, check that they are
  651.   set correctly (e.g. drive 0 if you have only one drive).
  652.  
  653.   Try reading from the CD-ROM drive. Typing the following command should
  654.   cause the drive activity light come on and no errors should be
  655.   reported. Use whatever device file is appropriate for your drive and
  656.   make sure a CD-ROM is inserted; use Control-C to exit.
  657.  
  658.  
  659.  
  660.  
  661.   ______________________________________________________________________
  662.   dd if=/dev/cdrom of=/dev/null bs=2048
  663.   ^C
  664.   124+0 records in
  665.   124+0 records out
  666.   ______________________________________________________________________
  667.  
  668.  
  669.  
  670.  
  671.   If you can read from the drive but cannot mount it, verify that you
  672.   compiled in ISO9660 file system support. With the 1.1.x kernels this
  673.   can be done as follows:
  674.  
  675.  
  676.  
  677.        ______________________________________________________________________
  678.        % cat /proc/filesystems
  679.                ext2
  680.                msdos
  681.        nodev   proc
  682.                iso9660
  683.        ______________________________________________________________________
  684.  
  685.  
  686.  
  687.  
  688.   Make sure you are mounting the drive with the "-t iso9660" and "-r"
  689.   options and that a known good CD-ROM (not Audio CD) is inserted in the
  690.   drive.
  691.  
  692.   Make sure that the CD-ROM device files are correct, according to the
  693.   information in the previous section.
  694.  
  695.   If you are running the syslog daemon, there may be error messages from
  696.   the kernel that you are not seeing. Try using the "dmesg" command:
  697.  
  698.  
  699.  
  700.        ______________________________________________________________________
  701.        % dmesg
  702.        SBPCD: sbpcd_open: no disk in drive
  703.        ______________________________________________________________________
  704.  
  705.  
  706.  
  707.  
  708.   There may also be errors logged to files in /var/adm, depending on how
  709.   you system is configured.
  710.  
  711.  
  712.   5.  Applications
  713.  
  714.  
  715.   This section briefly lists some of the key applications related to CD-
  716.   ROM that are available under Linux. Check the Linux Software Map for
  717.   the latest versions and archive sites.
  718.  
  719.  
  720.   5.1.  Audio CD players
  721.  
  722.  
  723.   Several programs are available for playing audio CDs, either through a
  724.   headphone jack or an attached sound card.
  725.  
  726.  
  727.      Workman
  728.         a graphical player running under X11 and supporting a CD
  729.         database and many other features
  730.  
  731.      WorkBone
  732.         an interactive text-mode player
  733.  
  734.      xcdplayer
  735.         a simple X11 based player
  736.  
  737.      cdplayer
  738.         a very simple command line based player
  739.  
  740.      Xmcd
  741.         an X11/Motif based player
  742.  
  743.      xmitsumi
  744.         another X11 based player for Mitsumi drives
  745.  
  746.      xplaycd
  747.         another X11 based player, bundled with sound mixer and VU meter
  748.         programs
  749.  
  750.      cdtool
  751.         command line tools for playing audio CDs
  752.  
  753.   Some of these programs are coded to use a specific device file for the
  754.   CD-ROM (e.g. /dev/cdrom). You may be able to pass the correct device
  755.   name as a parameter, or you can create a symbolic link in the /dev
  756.   directory. If sending the CD output to a sound card, you may wish to
  757.   use a mixer program to set volume settings or select the CD-ROM input
  758.   for recording.
  759.  
  760.  
  761.   5.2.  Inheriting File System
  762.  
  763.  
  764.   The Inheriting File System (IFS) is a kernel driver that allows
  765.   mounting multiple file systems at the same point. It is similar to the
  766.   Translucent File System provided under SunOS. By mounting a hard disk
  767.   directory over a CD-ROM file system, you can effectively obtain a
  768.   writable CD-ROM file system.
  769.  
  770.   The current version is experimental and was written for the 0.99pl11
  771.   and pl12 kernels; it may or may not work with more recent revisions.
  772.   The author is Werner Almesberger (almesber@bernina.ethz.ch).
  773.  
  774.  
  775.   5.3.  PhotoCD
  776.  
  777.  
  778.   PhotoCDs use an ISO-9660 file system containing image files in a
  779.   proprietary format. Not all CD-ROM drives support reading PhotoCDs.
  780.  
  781.   The hpcdtoppm program by Hadmut Danisch converts PhotoCD files to the
  782.   portable pixmap format. It can be obtained from
  783.   ftp.gwdg.de:/pub/linux/hpcdtoppm or as part of the PBM (portable bit
  784.   map) utilities, available on many archive sites (look for "pbm" or
  785.   "netpbm").
  786.  
  787.   The photocd program by Gerd Knorr kraxel@cs.tu-berlin.de can convert
  788.   PhotoCD images into targa or Windows and OS/2 bitmap files.
  789.  
  790.   The same author has written the program xpcd, an X11-based program for
  791.   handling PhotoCD images. You can select the images with a mouse,
  792.   preview the image in a small window, and load the image with any of
  793.   the five possible resolutions. You can also mark a part of the Image
  794.   and load only the selected part. Look for these packages at ftp.cs.tu-
  795.   berlin.de:/pub/linux/Local/misc.
  796.  
  797.   (I've actually tried a PhotoCD! If anyone wants more detail on how to
  798.   view files, etc... let me know and I can expand this section).
  799.  
  800.  
  801.   5.4.  Mkisofs
  802.  
  803.  
  804.   Eric Youngdale's mkisofs package allows creating an ISO-9660 file
  805.   system on a hard disk partition. This can then be used to assist in
  806.   creating and testing CD-ROM file systems before mastering discs.
  807.  
  808.   The tools for actually writing data to writable CD-ROM drives tend to
  809.   be vendor specific. They also require writing the data with no
  810.   interruptions, so a multitasking operating system like Linux is not
  811.   particularly well suited.
  812.  
  813.  
  814.   5.5.  9660_u
  815.  
  816.  
  817.   These are some utilities for verifying the format of ISO-9660
  818.   formatted discs; you may find them useful for testing suspect CDs. The
  819.   package can be found on ftp.cdrom.com in the /pub/ptf directory. They
  820.   were written by Bill Siegmund and Rich Morin.
  821.  
  822.  
  823.   6.  Answers to Frequently Asked Questions
  824.  
  825.  
  826.  
  827.   6.1.  How can a non-root user mount and unmount discs?
  828.  
  829.  
  830.   Some mount commands support the user option. If you make an entry such
  831.   as the following in /etc/fstab:
  832.  
  833.  
  834.  
  835.        ______________________________________________________________________
  836.        /dev/sbpcd  /cdrom   iso9660     user,noauto,ro
  837.        ______________________________________________________________________
  838.  
  839.  
  840.  
  841.  
  842.   then an ordinary user will be allowed to mount and unmount the drive
  843.   using these commands:
  844.  
  845.  
  846.  
  847.        ______________________________________________________________________
  848.        % mount /cdrom
  849.        % umount /cdrom
  850.        ______________________________________________________________________
  851.  
  852.  
  853.  
  854.  
  855.   The disc will be mounted with some options that ensure security (e.g.
  856.   programs cannot executed, device files are ignored); in some cases
  857.   this may be too restrictive.
  858.  
  859.   Another method is to get the usermount package which allows non-root
  860.   users to mount and unmount removable devices such as floppies and CD-
  861.   ROMs, but restricts access to other devices (such as hard disk
  862.   partitions). It is available on major archive sites.
  863.  
  864.   The archive site ftp.cdrom.com has the source file mount.c which
  865.   allows mounting an unmounting of CD-ROMs (only) by normal users. It
  866.   runs as a setuid executable.
  867.  
  868.  
  869.   6.2.  Why do I get device is busy when unmounting a CD-ROM?
  870.  
  871.  
  872.   The disc cannot be unmounted if any processes are accessing the drive,
  873.   including having their default directory set to the mounted
  874.   filesystem. If you cannot identify the processes using the disc, you
  875.   can use the fuser command, as shown in the following example.
  876.  
  877.  
  878.  
  879.        ______________________________________________________________________
  880.        % umount /cdrom
  881.        umount: /dev/sbpcd: device is busy
  882.        % fuser -v /cdrom
  883.        /cdrom:               USER       PID ACCESS COMMAND
  884.                              tranter     50 ..c..  bash
  885.        ______________________________________________________________________
  886.  
  887.  
  888.  
  889.  
  890.  
  891.   6.3.  How do I export a CD-ROM to other hosts over NFS?
  892.  
  893.  
  894.   You need to add an entry to the /etc/exports file; see the exports(5)
  895.   man page for details.
  896.  
  897.  
  898.   6.4.  Can I boot Linux from a CD-ROM?
  899.  
  900.  
  901.   The easiest way to boot from CD-ROM is to use a boot floppy. Several
  902.   of the Linux CD-ROM distributions (e.g. Yggdrasil) include one, or you
  903.   can use the boot disk(s) from one of the Linux distributions (e.g.
  904.   Slackware) that includes the necessary CD-ROM drivers for your system.
  905.  
  906.   In the future it may be possible to boot from IDE CD-ROM drives which
  907.   have the appropriate ROM BIOS functions.
  908.  
  909.  
  910.   6.5.  Why doesn't the kernel recognize my CD-ROM drive?
  911.  
  912.  
  913.   If you have a proprietary interface at a non-standard address, you may
  914.   need to set the i/o port location in the appropriate kernel header
  915.   file. Similarly, auto-probing by the kernel driver may conflict with
  916.   another device (e.g. network card) and cause your system to hang.
  917.  
  918.   For the Matsushita/Kotubuki/Panasonic/Creative Labs drives, you need
  919.   to edit the file sbpcd.h. For the Mitsumi drives it is mcd.h and for
  920.   Sony drives it is cdu31a.h. All of these files are normally installed
  921.   in /usr/include/linux. Alternatively you can set the drive parameters
  922.   on the LILO command line.
  923.  
  924.  
  925.   6.6.  How can I read digital data from audio CDs?
  926.  
  927.  
  928.   Only a few CD-ROM drives support this. Heiko Eissfeldt
  929.   (heiko@colossus.escape.de) and Olaf Kindel have written a utility that
  930.   reads audio data and saves it as .wav format sound files. It only
  931.   works with the Toshiba XM3401 and XM4101 SCSI drives. The package is
  932.   called cdda2wav.tar.gz and can be found on sunsite.unc.edu.
  933.  
  934.   The Panasonic SBPCD driver also has support for reading sound data
  935.   beginning with the 2.0 driver included in the 1.1.22 kernel. A
  936.   modified version of the cdda2wav program that works with this can be
  937.   found at ftp.gwdg.de in /pub/linux/misc/cdda2wav-sbpcd.2.tar.gz
  938.  
  939.   Even though the standard cdda2wav program claims to support the
  940.   Panasonic drives, it does not yet work properly, because of the need
  941.   to handle "overlap" of the data.
  942.  
  943.   The CDU-33 driver now supports reading audio data. It is said to work
  944.   with the cdda2wav program.
  945.  
  946.   For more information on this subject, see the alt.cd-rom FAQ listed in
  947.   the references section.
  948.  
  949.  
  950.   6.7.  How do I turn off the autoprobing messages on boot?
  951.  
  952.  
  953.   The SBPCD driver displays a lot of information during bootup. If you
  954.   want to suppress this, set the variable sbpcd_debug in the file
  955.   sbpcd.c. The comments in the file explain the various values that this
  956.   can be set to.
  957.  
  958.  
  959.   6.8.  Why doesn't the find command work properly?
  960.  
  961.  
  962.   On ISO-9660 formatted discs without the Rock Ridge Extensions, you
  963.   need to add the -noleaf option to the find command.
  964.  
  965.   The reason for this is that the number of links for each directory
  966.   file is not easily obtainable, so it is set to 2. The default behavior
  967.   for the find program is to look for (i_links - 2) subdirectories in
  968.   each directory, and it then assumes that the rest are regular files.
  969.   The -noleaf switch disables this optimization.
  970.  
  971.  
  972.   6.9.  Is the Reveal Multimedia Effects kit CD-ROM supported?
  973.  
  974.  
  975.   (the following was provided by Horne@leader.pfc.mit.edu)
  976.  
  977.   Here's what I discovered about the Reveal Multimedia kits that are
  978.   available fairly cheap ($300 or so) from department stores. After some
  979.   thrashing I discovered how to make the following CD work under linux.
  980.  
  981.   This is a Reveal Multimedia FX kit, which includes a Sound FX SC400
  982.   sound card, which has interfaces for Sony CDU33A, Panasonic CR-563,
  983.   and Mitsumi LU005s. My kit includes a Sony.
  984.  
  985.   The tricks to making the Sony CD work are as follows:
  986.  
  987.  
  988.   o  Decide which kernel to patch. I pulled the 1.0 kernel off the
  989.      Trans-Ameritech CD-ROM via DOS (My system started out as SLS a long
  990.      time ago)
  991.   o  Add addresses 0x634, 0x654 to the table at the top of the cdu31a
  992.      driver:
  993.  
  994.  
  995.  
  996.        ______________________________________________________________________
  997.        static unsigned short cdu31a_addresses[] =
  998.        {
  999.           0x340,       /* Standard configuration Sony Interface */
  1000.           0x1f88,      /* Fusion CD-16 */
  1001.           0x230,       /* SoundBlaster 16 card */
  1002.           0x360,       /* Secondary standard Sony Interface */
  1003.           0x320,       /* Secondary standard Sony Interface */
  1004.           0x330,       /* Secondary standard Sony Interface */
  1005.           0x634,
  1006.           0x654,
  1007.           0
  1008.        };
  1009.        ______________________________________________________________________
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.   o  Recompile your kernel, specifying Sony CDU31A and ISO9960 support
  1016.  
  1017.   o  Create the device file (use major number 15, not 21 as in the
  1018.      Transameritech doc)
  1019.  
  1020.  
  1021.  
  1022.        ______________________________________________________________________
  1023.        % mknod /dev/cd b 15 0
  1024.        ______________________________________________________________________
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.   o  Mount the drive
  1031.  
  1032.  
  1033.  
  1034.        ______________________________________________________________________
  1035.        % mount -t iso9660 -r /dev/cd /cdrom
  1036.        ______________________________________________________________________
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.   I'm still working on the actual sound support (I don't really need it
  1043.   yet) but that should be much easier.
  1044.  
  1045.   Thanks to Reveal tech support for the info that the CD interface is at
  1046.   0x414 off of the soundcard base address, Roman at Trans-Ameritech
  1047.   (roman@btr.btr.com) who suggested patching the CDU31A driver, and Dale
  1048.   Elrod (dale@post.dungeon.com) who provided an existence proof (Dale,
  1049.   your zImage didn't recognize the drive - I expect you actually have
  1050.   slightly different hardware. I'd have returned this thing a week ago,
  1051.   though, if I hadn't thought you had it working.)
  1052.  
  1053.   The original driver is due to minyard@wf-rch.cirr.com, and Linus made
  1054.   it all possible.
  1055.  
  1056.  
  1057.   6.10.  Does Linux support any recordable CD-ROM drives?
  1058.  
  1059.  
  1060.   According to Adam J. Richter, adam@yggdrasil.com:
  1061.  
  1062.   The Yggdrasil distribution can drive a Philips CD writer with an
  1063.   Adaptec 154x SCSI controller. I'm not sure which other SCSI
  1064.   controllers, if any, will work. You can use mkisofs to make an
  1065.   ISO-9660 filesystem and cdwrite to write it to the CD. If you want us
  1066.   to help you set this up, you can call us on our 900 technical support
  1067.   number: 1-900-446-6075 extension 835 (US$2.95/minute, U.S. only).
  1068.  
  1069.  
  1070.   6.11.  The eject function (e.g. from Workman) does not work!
  1071.  
  1072.  
  1073.   The SBPCD driver had a problem where the drive could be locked and the
  1074.   eject ioctl() would fail. This appears to be corrected starting with
  1075.   the 1.1.29 kernel.
  1076.  
  1077.  
  1078.   6.12.  You say I need to configure and build a kernel - how do I do
  1079.   that?
  1080.  
  1081.  
  1082.   This is not the kernel HOWTO (any volunteers?). Until one is written,
  1083.   try reading the file /usr/src/linux/README; it is reasonably complete.
  1084.  
  1085.   If you really don't want to compile a kernel, you may be able to find
  1086.   a precompiled kernel that has the drivers you need as part of a Linux
  1087.   distribution (e.g. the Slackware "q" series of disks).
  1088.  
  1089.  
  1090.   6.13.  Why do I get mount: Read-only file system when mounting a CD-
  1091.   ROM?
  1092.  
  1093.  
  1094.   With older kernels you could mount a CD-ROM for read/write; attempts
  1095.   to write data to the CD would not generate any errors. As of kernel
  1096.   version 1.1.33 this was corrected so that CD-ROMs must be mounted read
  1097.   only (e.g. using the -r option to mount).
  1098.  
  1099.  
  1100.   6.14.  Why does the disc tray open when I shut down the system?
  1101.  
  1102.  
  1103.   As of the 1.1.38 kernel, the sbpcd driver ejects the CD when it is
  1104.   unmounted or closed. If you shut down the system, a mounted CD will be
  1105.   unmounted.
  1106.  
  1107.   This feature is for convenience when changing discs. If the tray is
  1108.   open when you mount or read a CD, it will also automatically be
  1109.   closed.
  1110.  
  1111.   I found that this caused problems with a few programs (e.g. cdplay and
  1112.   workbone). As of the 1.1.60 kernel you can control this feature under
  1113.   software control. A sample program is included in the README.sbpcd
  1114.   file (or use the "eject" program).
  1115.  
  1116.  
  1117.   6.15.  I have a "special" CD that can't be mounted
  1118.  
  1119.  
  1120.   The "special" CD is likely an XA disc (like all Photo CDs or "one-
  1121.   offs" created using CD-R drives). Most of the Linux kernel CD-ROM
  1122.   drivers do not support XA discs, although you may be able to find a
  1123.   patch to add support on one of the archive sites.
  1124.  
  1125.   The sbpcd driver does support XA. If you are using this driver you can
  1126.   determine if the disc is XA using the following procedure: go into the
  1127.   file sbpcd.c and enable the display of the "Table of Contents"
  1128.   (DBG_TOC). Build and install the new kernel and boot from it. During
  1129.   each mount the TOC info will be written (either to the console or to a
  1130.   log file). If the first displayed value in the TOC header line is
  1131.   "20", then it is an XA disc. That byte is "00" with normal disks. If
  1132.   the TOC display shows different tracks, that is also a sign that it is
  1133.   an XA disc.
  1134.  
  1135.   (thanks to Eberhard Moenkeberg for the above information)
  1136.  
  1137.  
  1138.   6.16.  Which kernel drivers support multisession?
  1139.  
  1140.  
  1141.   The SBPCD driver supports multisession.
  1142.  
  1143.   The SCSI CD-ROM driver supports multisession with NEC and TOSHIBA
  1144.   drives.
  1145.  
  1146.   The CDU-31A driver has some multi-session support written but it does
  1147.   not yet work.
  1148.  
  1149.   Some drivers available as kernel patches may support multisession for
  1150.   other drives.
  1151.  
  1152.  
  1153.   6.17.  Why does the drive light flash on my CDU-33 drive?
  1154.  
  1155.  
  1156.   This is normal and was added in a recent revision of the driver. It
  1157.   flashes the drive light when a CD is mounted (it's not a bug, it's a
  1158.   feature...).
  1159.  
  1160.  
  1161.   7.  References
  1162.  
  1163.  
  1164.   Information on the Panasonic CD-ROM driver can be found in the file
  1165.   /usr/src/linux/drivers/block/README.sbpcd.
  1166.  
  1167.   The following usenet FAQs are posted periodically to news.answers and
  1168.   archived at internet FTP sites such as rtfm.mit.edu:
  1169.  
  1170.  
  1171.   o  alt.cd-rom FAQ
  1172.  
  1173.   o  comp.periphs.scsi FAQ
  1174.  
  1175.   Several other Linux HOWTOs have useful information relevant to CD-ROM:
  1176.  
  1177.  
  1178.   o  SCSI HOWTO
  1179.  
  1180.   o  Hardware Compatibility HOWTO
  1181.  
  1182.   o  Sound HOWTO
  1183.  
  1184.   o  Distribution HOWTO
  1185.  
  1186.   At least 10 companies sell Linux distributions on CD-ROM; most of them
  1187.   are listed in the Distribution HOWTO.
  1188.  
  1189.   The following Usenet news groups cover CD-ROM related topics:
  1190.  
  1191.  
  1192.   o  comp.publish.cdrom.hardware
  1193.  
  1194.   o  comp.publish.cdrom.multimedia
  1195.  
  1196.   o  comp.publish.cdrom.software
  1197.  
  1198.   o  comp.sys.ibm.pc.hardware.cd-rom
  1199.  
  1200.   o  alt.cd-rom
  1201.  
  1202.   o  alt.cd-rom.reviews
  1203.  
  1204.   The internet site ftp.cdrom.com has a large archive of CD-ROM
  1205.   information and software; look in the directory /pub/cdrom.
  1206.  
  1207.   The Linux Documentation Project has produced several books on Linux,
  1208.   including Linux Installation and Getting Started. These are freely
  1209.   available by anonymous FTP from major Linux archive sites or can be
  1210.   purchased in hardcopy format.
  1211.  
  1212.   The Linux Software Map (LSM) is an invaluable reference for locating
  1213.   Linux software. The LSM can be found on various anonymous FTP sites,
  1214.   including sunsite.unc.edu:/pub/Linux/docs/LSM.gz.
  1215.