home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / OTHER_FO / SGML / CDROM_HO.GZ / CDROM-HOWTO.sgml
Encoding:
SGML Document  |  1996-06-23  |  72.5 KB  |  1,991 lines

  1. <!doctype linuxdoc system> 
  2.  
  3. <article>
  4.  
  5. <title>The Linux CD-ROM HOWTO
  6. <author>Jeff Tranter, <htmlurl url="mailto:jeff_tranter@mitel.com"
  7. name="jeff_tranter@mitel.com">
  8. <date>v1.8, 10 June 1996
  9.  
  10. <abstract>
  11. This document describes how to install, configure, and use CD-ROM
  12. drives under Linux. It lists the supported hardware and answers a
  13. number of frequently asked questions. The intent is to bring new users
  14. up to speed quickly and reduce the amount of traffic in the Usenet
  15. news groups.
  16. </abstract>
  17.  
  18. <toc>
  19.  
  20. <sect>Introduction<p>
  21.  
  22. This is the Linux CD-ROM HOWTO document. It is intended as a quick
  23. reference covering everything you need to know to install and
  24. configure CD-ROM hardware under Linux. Frequently asked questions
  25. related to CD-ROM are answered, and references are given to other
  26. sources of information related to CD-ROM applications and technology.
  27.  
  28. <sect1>Acknowledgments<p>
  29.  
  30. Much of this information came from the <tt>README</tt> files provided
  31. with the Linux kernel source code, the internet
  32. <htmlurl url="news:alt.cd-rom" name="alt.cdrom"> newsgroup FAQ, and input
  33. from Linux users.
  34.  
  35. Thanks to the <htmlurl
  36. url="ftp://sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-sgml-1.5.tar.gz"
  37. name="Linuxdoc-SGML"> package, this HOWTO is available in several
  38. formats, all generated from a common source file.
  39.  
  40. <sect1>Revision History<p>
  41.  
  42. <descrip>
  43.  
  44. <tag>Version 1.0</tag>First version made publicly available
  45.  
  46. <tag>Version 1.1</tag>CDU33A is explicitly supported as of 1.1.20
  47. kernel; notes on Reveal FX; info on reading audio tracks; info on some
  48. alpha drivers; added troubleshooting section; a few other minor
  49. additions
  50.  
  51. <tag>Version 1.2</tag>ISO-9660 file systems must be mounted read-only
  52. starting with 1.1.33 kernel; clarified that SB16 SCSI is supported and
  53. newer Aztech drives are not supported; references to photocd and xpcd
  54. programs; note on new sbpcd auto eject feature
  55.  
  56. <tag>Version 1.3</tag>Minor change to the way SBPCD eject feature is
  57. disabled starting with the 1.1.49 kernel; added info on XA discs and
  58. how to identify them
  59.  
  60. <tag>Version 1.4</tag>HOWTO now available in other languages; IBM and
  61. Longshine drives now supported by SBPCD; alpha driver for Aztech
  62. drives; CDU-33 driver no longer auto-probes, supports PhotoCD and
  63. audio; more than 2 SCSI drives are supported; new driver for IDE;
  64. reminder to check drive jumpers; can now set SBPCD auto-eject with
  65. IOCTL; list drivers with multisession support; question on flashing
  66. light on CDU-33
  67.  
  68. <tag>Version 1.5</tag>A long overdue update (I've been busy); document
  69. placed under GPL; info on many new kernel drivers; more info on
  70. configuration and troubleshooting; lots of HTML links added; many
  71. other minor changes
  72.  
  73. <tag>Version 1.6</tag>Added link to eject program; question on file
  74. permission patch; link to Creative Labs Web site; reference to
  75. ATA/EIDE FAQ and FTP site; note that many Creative Labs and Mitsumi
  76. drives are now EIDE; mention Supermount; drives listed as supporting
  77. digital data are obsolete, refer to cdda2wav; more info on writing
  78. CDs; multi-disc EIDE drive info; a few typos fixed
  79.  
  80. <tag>Version 1.7</tag>new kernel version; most README files moved to
  81. /usr/src/linux/Documentation; some drivers are no longer experimental;
  82. a few more supported drives; emphasize that most drives are now
  83. IDE/ATAPI; added questions on Plug and Play support and identifying
  84. drive speed; vger mailing lists being shut down; other miscellaneous
  85. minor changes
  86.  
  87. <tag>Version 1.8</tag>question on why CD-ROM stops working after
  88. install; aztcd driver now supports two CyCDROM drives; more pleading
  89. not to use SBPCD driver with IDE drives; some ATAPI multi-disc changer
  90. support; note on (lack of) support for parallel port drives; latest
  91. stable kernel is 2.0; other miscellaneous minor changes
  92.  
  93. </descrip>
  94.  
  95. <sect1>New Versions Of This Document<p>
  96.  
  97. New versions of this document will be periodically posted to the
  98. <htmlurl url="news:comp.os.linux.answers"
  99. name="comp.os.linux.answers"> newsgroup. They will also be uploaded to
  100. various anonymous ftp sites that archive such information including
  101. <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/">.
  102.  
  103. Hypertext versions of this and other Linux HOWTOs are available on
  104. many World-Wide-Web sites, including <url
  105. url="http://sunsite.unc.edu/mdw/mdw.html">. Most Linux CD-ROM
  106. distributions include the HOWTOs, often under the <url
  107. url="/usr/doc/"> directory, and you can also buy printed copies from
  108. several vendors.
  109.  
  110. A French translation of this document, by Bruno Cornec
  111. (<htmlurl url="mailto:cornec@stna7.stna.dgac.fr"
  112. name="cornec@stna7.stna.dgac.fr">) is available at
  113. <url url="ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/">.
  114.  
  115. A Japanese translation by Itsushi Minoura
  116. (<htmlurl url="mailto:minoura@uni.zool.s.u-tokyo.ac.jp"
  117. name="minoura@uni.zool.s.u-tokyo.ac.jp">) is available from
  118. <url url="http://yebisu.ics.es.osaka-u.ac.jp/linux/">.
  119.  
  120. If you make a translation of this document into another language, let
  121. me know and I'll include a reference to it here.
  122.  
  123. <sect1>Feedback<p>
  124.  
  125. I rely on you, the users, to make this HOWTO useful. If you have any
  126. suggestions, corrections, or comments, please send them to me,
  127. <htmlurl url="mailto:jeff_tranter@mitel.com"
  128. name="jeff_tranter@mitel.com">, and I will try to incorporate
  129. them in the next revision.
  130.  
  131. I am also willing to answer general questions on CD-ROM and Linux, as
  132. best I can. Before doing so, please read all of the information in
  133. this HOWTO, and send me detailed information about the problem.
  134.  
  135. If you publish this document on a CD-ROM or in hardcopy form, a
  136. complimentary copy would be appreciated. Mail me for my postal
  137. address. Also consider making a donation to the Linux Documentation
  138. Project to help support free documentation for Linux. Contact the
  139. Linux HOWTO coordinator, Greg Hankins (<htmlurl
  140. url="mailto:gregh@sunsite.unc.edu" name="gregh@sunsite.unc.edu">), for
  141. more information.
  142.  
  143. <sect1>Distribution Policy<p>
  144.  
  145. Copyright (C) 1996 Jeff Tranter.
  146.  
  147. This HOWTO is free documentation; you can redistribute it and/or
  148. modify it under the terms of the GNU General Public License as
  149. published by the Free Software Foundation; either version 2 of the
  150. License, or (at your option) any later version.
  151.  
  152. This document is distributed in the hope that it will be useful, but
  153. <bf>without any warranty</bf>; without even the implied warranty of
  154. <bf>merchantability</bf> or <bf>fitness for a particular purpose</bf>.
  155. See the GNU General Public License for more details.
  156.  
  157. You can obtain a copy of the GNU General Public License by writing to
  158. the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  159. USA.
  160.  
  161. <sect>CD-ROM Technology<p>
  162.  
  163. <verb>
  164. "CD-ROM is read-only memory, and audio compact disc system is
  165. available as package-media of digital data for those purpose. For
  166. playing audio CD, please insert Head-phone jack."
  167. --- from a CD-ROM instruction manual
  168. </verb>
  169.  
  170. Don't Panic! The world of CD-ROM technology is not as confusing as
  171. your instruction manual.
  172.  
  173. CD-ROM stands for <em>Compact Disc Read-Only Memory</em>, a mass
  174. storage medium utilizing an optical laser to read microscopic pits on
  175. the aluminized layer of a polycarbonate disc. The same format is used
  176. for audio Compact Discs. Because of its high storage capacity,
  177. reliability, and low cost, CD-ROM has become an increasingly popular
  178. storage media.
  179.  
  180. The storage capacity of a CD-ROM disc is approximately 650 megabytes,
  181. equivalent to over 500 high density 3.5" floppy disks or roughly
  182. 250,000 typed pages.
  183.  
  184. First generation drives (known as <em>single speed</em>), provide a
  185. transfer rate of approximately 150 kilobytes per second; these are now
  186. generally considered obsolete. Double speed drives (300 kilobytes per
  187. second) are widely available, and many users are now opting for quad
  188. speed (600 kilobytes per second) or higher.
  189.  
  190. Most CD-ROM drives use either the Small Computer Systems Interface
  191. (SCSI), ATAPI enhanced IDE interface, or a vendor proprietary
  192. interface. They also typically support playing audio CDs via an
  193. external headphone jack or line level output. Some CDs also allow
  194. reading the frames of data from audio CDs in digital form.
  195.  
  196. CD-ROMs are usually formatted with an ISO-9660 (formerly called
  197. <em>High Sierra</em>) file system. This format restricts filenames to
  198. the MS-DOS style (8+3 characters). The <em>Rock Ridge Extensions</em>
  199. use undefined fields in the ISO-9660 standard to support longer
  200. filenames and additional Unix style information (e.g. file ownership,
  201. symbolic links, etc.).
  202.  
  203. <em>PhotoCD</em> is a standard developed by Kodak for storing
  204. photographic images as digital data on a CD-ROM. With appropriate
  205. software, you can view the images on a computer, manipulate them, or
  206. send them to a printer. Information can be added to a PhotoCD at a
  207. later date; this is known as <em>multi-session</em> capability.
  208.  
  209. CD recorders (CD-R) have recently become available. They use a
  210. different media and specialized equipment for recording, but the
  211. resulting disc can be read by any CD-ROM drive.
  212.  
  213. In the future CD-ROM drive vendors are expected to offer technology
  214. that will increase storage capacity by an order of magnitude.
  215.  
  216. <sect>Supported Hardware<p>
  217.  
  218. This section lists the CD-ROM drivers and interfaces that are
  219. currently supported under Linux. The information here is based on the
  220. latest stable Linux kernel, which at time of writing was version 2.0.
  221.  
  222. This information is only valid for Linux on the Intel platform. Some
  223. information may be applicable to other processor architectures, but I
  224. have no first hand experience or information.
  225.  
  226. <sect1>SCSI CD-ROM Drives<p>
  227.  
  228. SCSI (Small Computer Systems Interface) is a popular format for CD-ROM
  229. drives. Its chief advantages are a reasonably fast transfer rate,
  230. multi-device capability, and support on a variety of computer
  231. platforms. Some disadvantages of SCSI are the need for a relatively
  232. expensive controller card and cables.
  233.  
  234. Any SCSI CD-ROM drive with a block size of 512 or 2048 bytes should
  235. work under Linux; this includes the vast majority of CD-ROM drives on
  236. the market.
  237.  
  238. You will also need a supported SCSI controller card; see the
  239. <htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html"
  240. name="SCSI HOWTO">
  241. for more information on interface hardware.
  242.  
  243. Note that some CD-ROMs include a controller with a modified interface
  244. that is not fully SCSI compatible (e.g. it may not support adding
  245. other SCSI devices on the bus). These will most likely <em>not</em>
  246. work under Linux.
  247.  
  248. <sect1>Proprietary CD-ROM Drives<p>
  249.  
  250. Several CD-ROM drives using proprietary interfaces are available; the
  251. interface is often provided on a sound card. Simple interface cards
  252. equivalent to that provided on the sound card are also available.
  253. These drives generally tend to be lower in cost and smaller than SCSI
  254. drives. Their disadvantages are the lack of standardization and
  255. expandability.
  256.  
  257. Note that proprietary interfaces are sometimes erroneously referred to
  258. as IDE interfaces, because like IDE hard disks, they use a simple
  259. interface based on the PC/AT bus. To add to the confusion, some
  260. vendors, most notably Creative Labs, have shipped many different types
  261. of CD-ROM drives and have offered proprietary, SCSI, and ATAPI
  262. interfaces on their sound cards.
  263.  
  264. The table below lists the proprietary CD-ROM drives that are known to
  265. be supported under Linux. Drivers for additional devices may be
  266. available in the latest development kernels or as kernel patches. The
  267. latter can most often be found at <url
  268. url="ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/">. Also
  269. check the README files included with the kernel distribution, usually
  270. installed <htmlurl url="/usr/src/linux/Documentation/cdrom/"
  271. name="/usr/src/linux/Documentation/cdrom/">, for the latest
  272. information.
  273.  
  274. <verb>
  275.                 Proprietary CD-ROM Drives
  276.  
  277. Vendor        Model        Kernel Driver    Notes
  278. ------        -----        -------------    --------
  279. Panasonic    CR-521        sbpcd        Note 1
  280. Panasonic    CR-522        sbpcd        Note 1
  281. Panasonic    CR-523        sbpcd        Note 1
  282. Panasonic    CR-562        sbpcd        Note 1
  283. Panasonic    CR-563        sbpcd        Note 1
  284. Creative Labs    CD-200        sbpcd
  285. IBM         External ISA    sbpcd        Note 2
  286. Longshine    LCS-7260     sbpcd
  287. Teac        CD-55A         sbpcd
  288. Sony        CDU-31A        cdu31a
  289. Sony        CDU-33A        cdu31a
  290. Sony        CDU-535        sonycd535    Note 3
  291. Sony        CDU-531     sonycd535
  292. Aztech        CDA268-01A    aztcd
  293. Orchid        CDS-3110    aztcd
  294. Okano/Wearnes    CDD110        aztcd
  295. Conrad        TXC        aztcd
  296. CyCDROM        CR520ie        aztcd
  297. CyCDROM        CR940ie        aztcd
  298. GoldStar    R420        gscd        Note 4
  299. Philips/LMS    CM206        cm206        Note 5
  300. Mitsumi        CRMC LU005S    mcd/mcdx    Note 6, 7
  301. Mitsumi        FX001        mcd/mcdx    Note 6, 7
  302. Optics Storage    Dolphin 8000AT    optcd
  303. Lasermate    CR328A        optcd
  304. Sanyo        H94A        sjcd
  305. various        various        isp16        Note 8
  306. </verb>
  307.  
  308. Notes:
  309.  
  310. <enum>
  311.  
  312. <item>These drives may be sold under the names Creative Labs,
  313. Panasonic, Matsushita, or Kotobuki.
  314.  
  315. <item>This drive is the same as a Panasonic CR-562.
  316.  
  317. <item>May also be sold under the Procomm name.
  318.  
  319. <item>May also be sold as part of a Reveal Multimedia Kit.
  320.  
  321. <item>The Philips CM205 is not supported by this driver, but there is
  322. a separate alpha release driver available from ftp://sunsite.unc.edu
  323. in /pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz
  324.  
  325. <item>May also be sold under the Radio Shack name.
  326.  
  327. <item>There are two drivers available. "mcd" is the original one, and
  328. "mcdx" is a new experimental driver with more features (but possibly
  329. less stable).
  330.  
  331. <item>This driver works with CD-ROM drives that are attached to the
  332. interface on an ISP16, MAD16 or Mozart sound card.
  333.  
  334. </enum>
  335.  
  336. If a drive listed here is not supported by your kernel, you probably
  337. need to upgrade to a newer version.
  338.  
  339. If your drive is not one of the models listed here, particularly if it
  340. was bought recently and is quad speed or faster, it probably uses the
  341. IDE/ATAPI interface listed in the next section. <em>The most common
  342. error among Linux CD-ROM users is to assume that any drive connected
  343. to a SoundBlaster card should use the SBPCD driver</em>. Creative Labs
  344. and most other vendors are no longer selling proprietary interface
  345. drives, they are following the standard ATAPI/IDE interface.
  346.  
  347. <sect1>ATAPI CD-ROM Drives<p>
  348.  
  349. ATAPI (ATA Packet Interface) is a protocol for controlling mass
  350. storage devices, similar to SCSI. It builds on the ATA (AT Attachment)
  351. interface, the official ANSI standard name for for the IDE interface
  352. developed for hard disk drives. ATAPI is commonly used for hard disks,
  353. CD-ROM drives, tape drives, and other devices.  Currently the most
  354. popular type of interface, it offers most of the functionality of
  355. SCSI, without the need for an expensive controller or cables.
  356.  
  357. The Linux kernel has a device driver that should work with any ATAPI
  358. compliant CD-ROM drive. Vendors shipping compatible drives include
  359. Aztech, Mitsumi, NEC, Sony, Creative Labs, and Vertos. If you have
  360. recently purchased a CD-ROM drive, especially if it is quad speed or
  361. faster, it is almost guaranteed to be IDE/ATAPI.
  362.  
  363. <sect1>Parallel Port Drives<p>
  364.  
  365. Some vendors sell CD-ROM drives that attach to the PC parallel port.
  366. The standard Linux kernel does not support these drives, and I am not
  367. aware of anyone working on drivers.
  368.  
  369. <sect>Installation<p>
  370.  
  371. Installation of a CD-ROM under Linux consists of these steps:
  372.  
  373. <enum>
  374. <item>Installing the hardware.
  375. <item>Configuring and building the Linux kernel.
  376. <item>Creating device files and setting boot time parameters
  377. <item>Booting the Linux kernel.
  378. <item>Mounting the media.
  379. </enum>
  380.  
  381. The next sections will cover each of these steps in detail.
  382.  
  383. <sect1>Installing the Hardware<p>
  384.  
  385. Follow the manufacturer's instructions for installing the hardware or
  386. have your dealer perform the installation. The details will vary
  387. depending on whether the drive is internal or external and on the type
  388. of interface used. There are no special installation requirements for
  389. Linux. You may need to set jumpers on the drive and/or interface card
  390. for correct operation; some of the kernel drivers include README files
  391. that include this information.
  392.  
  393. As explained in the file <tt>ide-cd</tt>, ATAPI CD-ROMS should be
  394. jumpered as "single" or "master", and not "slave" when only one IDE
  395. device is attached to an interface (this restriction is no longer
  396. enforced with recent kernels).
  397.  
  398. <sect1>Configuring and Building the Kernel<p>
  399.  
  400. When initially installing Linux from CD-ROM you will likely be using a
  401. boot and/or root disk provided as part of a Linux distribution. If
  402. possible, you should choose a boot disk with the kernel driver for
  403. your CD-ROM device type. If you cannot find a boot disk with the
  404. necessary CD-ROM driver, you have several options:
  405.  
  406. <enum>
  407. <item>install over a network
  408. <item>boot DOS, and install the Linux files onto your hard disk
  409. <item>boot DOS, and create a set of floppies to install Linux
  410. <item>find someone who can build you a boot disk with the needed
  411. CD-ROM driver
  412. </enum>
  413.  
  414. The <url
  415. url="http://sunsite.unc.edu/mdw/HOWTO/Installation-HOWTO.html"
  416. name="Linux Installation HOWTO"> has more information on installing
  417. Linux. If you purchased Linux on CD-ROM, it likely also came with some
  418. installation instructions (that little booklet inside the jewel case,
  419. and/or files on the CD).
  420.  
  421. Once Linux has initially been installed, most users will want to
  422. compile their own kernel, usually for one of these reasons:
  423.  
  424. <itemize>
  425. <item>to support a CD-ROM drive or other hardware
  426. <item>to upgrade to a newer kernel release
  427. <item>to free up memory resources by minimizing the size of the kernel
  428. </itemize>
  429.  
  430. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
  431. name="Linux Kernel HOWTO"> should be consulted for the details of
  432. building a kernel. I will just mention here some issues that are
  433. specific to CD-ROM drives.
  434.  
  435. Obviously, you need to compile in support for your CD-ROM drive when
  436. you do a "make config".
  437.  
  438. If you have an ATAPI CD-ROM drive, you need to answer <tt>yes</tt> to
  439. the questions:
  440.  
  441. <tscreen><verb>
  442. Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE) [Y/n/?]
  443. Include IDE/ATAPI CDROM support (CONFIG_BLK_DEV_IDECD) [Y/n/?]
  444. </verb></tscreen>
  445.  
  446. For SCSI CD-ROM drives, enable these options:
  447.  
  448. <tscreen><verb>
  449. SCSI support (CONFIG_SCSI) [Y/n/m/?]
  450. SCSI CD-ROM support (CONFIG_BLK_DEV_SR) [Y/n/m/?]
  451. </verb></tscreen>
  452.  
  453. Also enable support for your SCSI host adaptor when prompted, e.g.
  454.  
  455. <tscreen><verb>
  456. Adaptec AHA152X support (CONFIG_SCSI_AHA152X) [Y/n/m/?]
  457. </verb></tscreen>
  458.  
  459. For proprietary interface CD-ROM drives, enable the appropriate
  460. driver. You can use the table listed previously to determine the
  461. driver to use for your model.
  462.  
  463. Virtually all CD-ROMs use the ISO-9660 file system, so you must
  464. also enable:
  465.  
  466. <tscreen><verb>
  467. ISO9660 cdrom filesystem support (CONFIG_ISO9660_FS) [Y/n/m/?]
  468. </verb></tscreen>
  469.  
  470. Although not needed for CD-ROM operation, if you have a sound card
  471. that is supported under Linux you might want to enable and configure
  472. the kernel sound driver at this time as well. The <url
  473. url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html" name="Sound
  474. HOWTO"> can be a useful reference here.
  475.  
  476. You should then follow the usual procedure for building the kernel and
  477. installing it. Don't boot with the new kernel until you create the
  478. device files and set up any boot time parameters as described in the
  479. next section.
  480.  
  481. The ISO-9660 filesystem and almost all of the CD-ROM drivers can be
  482. built as loadable kernel modules. This scheme allows the kernel
  483. drivers to be loaded and unloaded without rebooting the kernel,
  484. freeing up memory. I recommend you get your CD-ROM installation
  485. running using compiled-in drivers first. How to do use modules is
  486. described in the modules documentation and the <url
  487. url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html" name="Kernel
  488. HOWTO">.
  489.  
  490. If a drive type listed here is not supported by your kernel, you
  491. likely need to upgrade to a newer version.
  492.  
  493. It is possible that you need to use a driver that is distributed
  494. separately from the kernel source code. This usually involves patching
  495. the kernel. Again, the <url
  496. url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html" name="Kernel
  497. HOWTO"> explains how to do this.
  498.  
  499. Note that there is a menu-based kernel configuration program invoked
  500. by "make menuconfig" and an X11-based graphical configuration invoked
  501. as "make xconfig". All three configuration methods offer on-line help.
  502.  
  503. <sect1>Creating Device Files and Setting Boot Time Parameters<p>
  504.  
  505. The kernel uses device files to identify which device driver to use.
  506. If you are running a standard Linux distribution you may have created
  507. the necessary device files during installation. Under Slackware
  508. Linux, for example, there is a menu-based <tt>setup</tt> tool that
  509. includes CD-ROM setup, and most systems have a <tt>/dev/MAKEDEV</tt>
  510. script. If you don't use these methods, you can use the more manual
  511. procedure listed in this section. Even if you use either of these
  512. methods, it is recommended that you at least verify the device files
  513. against the information in this section.
  514.  
  515. You create the device file by running the shell commands indicated for
  516. your drive type. This should be done as user <tt>root</tt>. Note that
  517. some Linux distributions may use slightly different CD-ROM device
  518. names from those listed here.
  519.  
  520. It is recommended that you also create a symbolic link to the CD-ROM
  521. device to make it easier to remember. For example, for a Panasonic
  522. CD-ROM drive, the link would be created using
  523.  
  524. <tscreen><verb>
  525. % ln -s /dev/sbpcd /dev/cdrom
  526. </verb></tscreen>
  527.  
  528. If you want to play audio CDs, you will need to set the protection on
  529. the device file (the real file, not the symbolic link to it) to allow
  530. all users to read and write, e.g.
  531.  
  532. <tscreen><verb>
  533. % chmod 666 /dev/sbpcd
  534. % ls -l /dev/sbpcd
  535. brw-rw-rw-   1 root     disk      25,   0 Jul 18  1994 /dev/sbpcd
  536. </verb></tscreen>
  537.  
  538. When booting Linux, the device drivers attempt to determine whether
  539. the appropriate devices are present, typically by probing specific
  540. addresses. Many of the drivers auto-probe at several addresses, but
  541. because of differences in configuration, possible device conflicts,
  542. and hardware limitations, the drivers sometimes need help identifying
  543. the addresses and other parameters. Most drivers support an option on
  544. the kernel command line to pass this information to the device
  545. driver. This can be done interactively, or more commonly, configured
  546. into your boot loader. With LILO, for example, you would add an
  547. <tt>append</tt> command such as the following to your
  548. <tt>/etc/lilo.conf</tt> file:
  549.  
  550. <tscreen><verb>
  551. append = "sbpcd=0x230,SoundBlaster"
  552. </verb></tscreen>
  553.  
  554. See the LILO documentation for more information.
  555.  
  556. In the next section I discuss issues specific to individual device
  557. drivers, including device files, boot parameters, and the capabilities
  558. of the different drivers. You probably only need to read the section
  559. relevant to your drive type.
  560.  
  561. <sect2>Sbpcd Driver<p>
  562.  
  563. <verb>
  564.        Principal author: Eberhard Moenkeberg (emoenke@gwdg.de)
  565.   Multi-session support: yes (but not all drives)
  566.  Multiple drive support: yes
  567. Loadable module support: yes
  568.    Reading audio frames: yes (CR-562, CR-563, CD-200 only)
  569.            Auto-probing: yes
  570.             Device file: /dev/sbpcd, major 25
  571.      Configuration file: sbpcd.h
  572.    Kernel config option: Matsushita/Panasonic CDROM support?
  573.             README file: ide-cd
  574. </verb>
  575.  
  576. This driver accepts a kernel command line of the form:
  577.  
  578. <tscreen><verb>
  579. sbpcd=<io-address>,<interface-type>
  580. </verb></tscreen>
  581.  
  582. where the first parameter is the base address of the device
  583. (e.g. 0x230), and <interface-type> is one of "SoundBlaster",
  584. "LaserMate", or "SPEA". See the file <tt>sbpcd.h</tt> for hints on
  585. what interface type to use. Using <tt>sbpcd=0</tt> disables
  586. auto-probing, rendering the driver useless.
  587.  
  588. The device file can be created using:
  589.  
  590. <tscreen><verb>
  591. % mknod /dev/sbpcd b 25 0
  592. </verb></tscreen>
  593.  
  594. Up to four drives per controller are supported. The next three drives
  595. on the first controller would use minor device numbers 1 through 3.
  596. If you have more than one controller, create devices with major
  597. numbers 26, 27, and 28, up to a maximum of 4 controllers (this is 16
  598. CD-ROM drives in total; hopefully enough for most users :-).
  599.  
  600. See the file <tt>sbpcd</tt> for more information on this
  601. driver.
  602.  
  603. If you recently bought a CD-ROM drive, don't assume that if it
  604. connects to a SoundBlaster card it should use this kernel driver. Most
  605. CD-ROM drives being sold by Creative Labs are now EIDE/ATAPI drives.
  606. Please don't bug the author with questions about using this driver
  607. with IDE drives. I quote from the README file:
  608.  
  609. <verb>
  610. sbpcd really, really is NOT for ANY IDE/ATAPI drive!
  611. Not even if you have an "original" SoundBlaster card with an IDE interface!
  612. So, you better have a look into README.ide if your port address is 0x1F0,
  613. 0x170, 0x1E8, 0x168 or similar.
  614. I get tons of mails from IDE/ATAPI drive users - I really can't continue
  615. any more to answer them all. So, if your drive/interface information sheets
  616. mention "IDE" (primary, secondary, tertiary, quaternary) and the DOS driver
  617. invoking line within your CONFIG.SYS is using an address below 0x230:
  618. DON'T ROB MY LAST NERVE - jumper your interface to address 0x170 and IRQ 15
  619. (that is the "secondary IDE" configuration), set your drive to "master" and
  620. use ide-cd as your driver. If you do not have a second IDE hard disk, use the
  621. LILO commands
  622.    hdb=noprobe hdc=cdrom
  623. and get lucky.
  624. To make it fully clear to you: if you mail me about IDE/ATAPI drive problems,
  625. my answer is above, and I simply will discard your mail, hoping to stop the
  626. flood and to find time to lead my 12-years old son towards happy computing.
  627. </verb>
  628.  
  629. <sect2>Sonycdu535 Driver<p>
  630.  
  631. <verb>
  632.        Principal author: Ken Pizzini (ken@halcyon.com)
  633.   Multi-session support: no
  634.  Multiple drive support: no
  635. Loadable module support: yes
  636.    Reading audio frames: no
  637.            Auto-probing: no
  638.             Device file: /dev/sonycd535, major 24
  639.      Configuration file: sonycd535.h
  640.    Kernel config option: Sony CDU535 CDROM support?
  641.             README file: sonycd535
  642. </verb>
  643.  
  644. This driver accepts a kernel command line of the form:
  645.  
  646. <tscreen><verb>
  647. sonycd535=<io-address>
  648. </verb></tscreen>
  649.  
  650. where <io-address> is the base address of the controller
  651. (e.g. 0x320). Alternatively you can set the address in the file
  652. <tt>sonycd535.h</tt> and compile it in.
  653.  
  654. The device file can be created using:
  655.  
  656. <tscreen><verb>
  657. % mknod /dev/sonycd535 b 24 0
  658. </verb></tscreen>
  659.  
  660. Some Linux distributions use <tt>/dev/sonycd</tt> for this device.
  661. Older versions of the driver used major device number 21; make sure
  662. your device file is correct.
  663.  
  664. This driver was previously distributed as a patch but is now part of
  665. the standard kernel. See the file <tt>sonycd535</tt> for more
  666. information on this driver.
  667.  
  668. <sect2>Cdu31a Driver<p>
  669.  
  670. <verb>
  671.        Principal author: Corey Minyard (minyard@-rch.cirr.com)
  672.   Multi-session support: yes
  673.  Multiple drive support: no
  674. Loadable module support: yes
  675.    Reading audio frames: yes
  676.            Auto-probing: no
  677.             Device file: /dev/cdu31a, major 15
  678.      Configuration file: cdu31a.h
  679.    Kernel config option: Sony CDU31A/CDU33A CDROM support?
  680.             README file: cdu31a
  681. </verb>
  682.  
  683. This driver accepts a kernel command line of the form:
  684.  
  685. <tscreen><verb>
  686. cdu31a=<io-address>,<interrupt>,PAS
  687. </verb></tscreen>
  688.  
  689. The first number is the I/O base address of the card (e.g. 0x340). The
  690. second is the interrupt number to use (0 means to use polled i/o). The
  691. optional third parameter should be "PAS" if the drive is connected to
  692. a Pro-Audio Spectrum 16 sound card, otherwise left blank.
  693.  
  694. The device file can be created using:
  695.  
  696. <tscreen><verb>
  697. % mknod /dev/cdu31a b 15 0
  698. </verb></tscreen>
  699.  
  700. See the file <tt>cdu31a</tt> for more information on this
  701. driver.
  702.  
  703. Also see the Web page put together by Jeffrey Oxenreider (<htmlurl
  704. url="mailto:zureal@infinet.com" name="zureal@infinet.com">) that
  705. covers a lot of common problems with these drives. It can be found at
  706. <url url="http://www.infinet.com/~zureal/cdu31a.html">.
  707.  
  708. <sect2>Aztcd Driver<p>
  709.  
  710. <verb>
  711.        Principal author: Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
  712.   Multi-session support: yes
  713.  Multiple drive support: no
  714. Loadable module support: yes
  715.    Reading audio frames: no
  716.            Auto-probing: no
  717.             Device file: /dev/aztcd0, major 29
  718.      Configuration file: aztcd.h
  719.    Kernel config option: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
  720.             README file: aztcd
  721. </verb>
  722.  
  723. This driver accepts a kernel command line of the form:
  724.  
  725. <tscreen><verb>
  726. aztcd=<io-address>
  727. </verb></tscreen>
  728.  
  729. where the parameter is the I/O base address of the card (e.g. 0x340).
  730.  
  731. The device file can be created using:
  732.  
  733. <tscreen><verb>
  734. % mknod /dev/aztcd0 b 29 0
  735. </verb></tscreen>
  736.  
  737. See the file aztcd for more information on this driver.
  738.  
  739. <sect2>Gscd Driver<p>
  740.  
  741. <verb>
  742.        Principal author: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
  743.   Multi-session support: no
  744.  Multiple drive support: no
  745. Loadable module support: yes
  746.    Reading audio frames: no
  747.            Auto-probing: no
  748.             Device file: /dev/gscd0, major 16
  749.      Configuration file: gscd.h
  750.    Kernel config option: Goldstar R420 CDROM support?
  751.             README file: gscd
  752. </verb>
  753.  
  754. This driver accepts a kernel command line of the form:
  755.  
  756. <tscreen><verb>
  757. gscd=<io-address>
  758. </verb></tscreen>
  759.  
  760. specifying the I/O base address of the card (e.g. 0x340).
  761.  
  762. The device file can be created using:
  763.  
  764. <tscreen><verb>
  765. % mknod /dev/gscd0 b 16 0
  766. </verb></tscreen>
  767.  
  768. See the file <tt>gscd</tt> and the World-Wide Web site
  769. <url url="http://linux.rz.fh-hannover.de/~raupach">
  770. for more information on this driver.
  771.  
  772. <sect2>Mcd Driver<p>
  773.  
  774. <verb>
  775.        Principal author: Martin  (martin@bdsi.com)
  776.     Multi-session support: no
  777.  Multiple drive support: no
  778. Loadable module support: yes
  779.    Reading audio frames: no
  780.            Auto-probing: no
  781.             Device file: /dev/mcd, major 23
  782.      Configuration file: mcd.h
  783.    Kernel config option: Standard Mitsumi CDROM support?
  784.             README file: mcd
  785. </verb>
  786.  
  787. This is the older driver for Mitsumi drivers that has been available
  788. for some time. You might want to try the newer <tt>mcdx</tt> driver,
  789. which has some new features but is still considered experimental.
  790.  
  791. This driver accepts a kernel command line of the form:
  792.  
  793. <tscreen><verb>
  794. mcd=<io-address>,<irq>
  795. </verb></tscreen>
  796.  
  797. specifying the I/O base address of the card (e.g. 0x340) and the IRQ
  798. request number used.
  799.  
  800. The device file can be created using:
  801.  
  802. <tscreen><verb>
  803. % mknod /dev/mcd b 23 0
  804. </verb></tscreen>
  805.  
  806. See the file <tt>mcd</tt> for more information on this driver.
  807.  
  808. <sect2>Mcdx Driver<p>
  809.  
  810. <verb>
  811.        Principal author: Heiko Schlittermann
  812.   Multi-session support: yes
  813.  Multiple drive support: yes
  814. Loadable module support: yes
  815.    Reading audio frames: no (not supported by hardware)
  816.            Auto-probing: no
  817.             Device file: /dev/mcdx0, major 20
  818.      Configuration file: mcdx.h
  819.    Kernel config option: Experimental Mitsumi support?
  820.             README file: mcdx
  821. </verb>
  822.  
  823. This is a new and currently experimental driver for Mitsumi drivers.
  824. The older and possibly more stable <tt>mcd</tt> driver is still
  825. available.
  826.  
  827. This driver accepts a kernel command line of the form:
  828.  
  829. <tscreen><verb>
  830. mcdx=<io-address>,<irq>
  831. </verb></tscreen>
  832.  
  833. specifying the I/O base address of the card (e.g. 0x340) and the IRQ
  834. request number used.
  835.  
  836. The device file can be created using:
  837.  
  838. <tscreen><verb>
  839. % mknod /dev/mcdx0 b 20 0
  840. </verb></tscreen>
  841.  
  842. If you recently bought a Mitsumi CD-ROM drive, don't assume that it
  843. should use this kernel driver. Some Mitsumi models are now EIDE/ATAPI
  844. drives and should use the idecd kernel driver.
  845.  
  846. See the file <tt>mcdx</tt> for more information on this driver.
  847.  
  848. <sect2>Cm206 Driver<p>
  849.  
  850. <verb>
  851.        Principal author: David A. van Leeuwen (david@tm.tno.)
  852.   Multi-session support: yes
  853.  Multiple drive support: no
  854. Loadable module support: yes
  855.    Reading audio frames: no
  856.            Auto-probing: yes
  857.             Device file: /dev/cm206cd, major 32
  858.      Configuration file: cm206.h
  859.    Kernel config option: Philips/LMS CM206 CDROM support?
  860.             README file: cm206
  861. </verb>
  862.  
  863. The driver accepts a kernel command line of the form:
  864.  
  865. <tscreen><verb>
  866. cm206=<io-address>,<interrupt>
  867. </verb></tscreen>
  868.  
  869. where the first number is the I/O base address of the card
  870. (e.g. 0x340). The second is the interrupt channel.
  871.  
  872. The device file can be created using:
  873.  
  874. <tscreen><verb>
  875. % mknod /dev/cm206cd b 32 0
  876. </verb></tscreen>
  877.  
  878. See the file <tt>cm206</tt> for more information on this
  879. driver.
  880.  
  881. <sect2>Optcd Driver<p>
  882.  
  883. <verb>
  884.        Principal author: Leo Spiekman (spiekman@dutette.et.tudelft.nl)
  885.   Multi-session support: yes
  886.  Multiple drive support: no
  887. Loadable module support: yes
  888.    Reading audio frames: no
  889.            Auto-probing: no
  890.             Device file: /dev/optcd0, major 17
  891.      Configuration file: optcd.h
  892.    Kernel config option: Experimental Optics Storage ... CDROM support?
  893.             README file: optcd
  894. </verb>
  895.  
  896. The driver accepts a kernel command line of the form
  897.  
  898. <tscreen><verb>
  899. optcd=<io-address>
  900. </verb></tscreen>
  901.  
  902. to specify the I/O base address of the card (e.g. 0x340).
  903.  
  904. The device file can be created using:
  905.  
  906. <tscreen><verb>
  907. % mknod /dev/optcd0 b 17 0
  908. </verb></tscreen>
  909.  
  910. See the file <tt>optcd</tt> for more information on this
  911. driver.
  912.  
  913. <sect2>Sjcd Driver<p>
  914.  
  915. <verb>
  916.        Principal author: Vadim V. Model (vadim@rbrf.msk.su)
  917.   Multi-session support: no
  918.  Multiple drive support: no
  919. Loadable module support: yes
  920.    Reading audio frames: no
  921.            Auto-probing: no
  922.             Device file: /dev/sjcd, major 18
  923.      Configuration file: sjcd.h
  924.    Kernel config option: Experimental Sanyo H94A CDROM support?
  925.             README file: sjcd
  926. </verb>
  927.  
  928. The driver accepts a kernel command line of the form:
  929.  
  930. <tscreen><verb>
  931. sjcd=<io-address>,<interrupt>,<dma>
  932. </verb></tscreen>
  933.  
  934. indicating the base address, interrupt, and DMA channel to be used
  935. (e.g. sjcd=0x340,10,5).
  936.  
  937. The device file can be created using:
  938.  
  939. <tscreen><verb>
  940. % mknod /dev/sjcd b 18 0
  941. </verb></tscreen>
  942.  
  943. See the file <tt>sjcd</tt> for more information on this driver.
  944.  
  945. <sect2>SCSI Driver<p>
  946.  
  947. <verb>
  948.        Principal author: David Giller
  949.   Multi-session support: yes (depending on drive)
  950.  Multiple drive support: yes
  951. Loadable module support: yes
  952.    Reading audio frames: yes (depending on drive)
  953.            Auto-probing: yes
  954.             Device file: /dev/scd0, major 11
  955.      Configuration file: cdrom.h
  956.    Kernel config option: SCSI CDROM support?
  957.             README file: none
  958. </verb>
  959.  
  960. There are kernel command line option specific to each type of SCSI
  961. controller. See the <htmlurl
  962. url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html" name="SCSI
  963. HOWTO"> for more information.
  964.  
  965. Multiple drives are supported (up to the limit of the maximum number
  966. of devices on the SCSI bus). Create device files with major number 11
  967. and minor numbers starting at zero:
  968.  
  969. <tscreen><verb>
  970. % mknod /dev/scd0 b 11 0
  971. % mknod /dev/scd1 b 11 1
  972. </verb></tscreen>
  973.  
  974. <sect2>IDECD Driver<p>
  975.  
  976. <verb>
  977.        Principal author: Scott Snyder (snyder@fnald0.fnal.gov)
  978.   Multi-session support: yes
  979.  Multiple drive support: yes
  980. Loadable module support: no
  981.    Reading audio frames: yes (on supported drives)
  982.            Auto-probing: yes
  983.             Device file: /dev/hd{b,c},  major 22
  984.      Configuration file: cdrom.h
  985.    Kernel config option: Include support for IDE/ATAPI CDROMs?
  986.             README file: ide-cd
  987. </verb>
  988.  
  989. This is the driver for ATAPI CD-ROMS. The driver accepts a kernel
  990. command line of the form
  991.  
  992. <tscreen><verb>
  993. hdx=cyls,heads,sects,wpcom,irq
  994.   or
  995. hdx=cdrom
  996. </verb></tscreen>
  997.  
  998. where <tt>hdx</tt> can be any of {hda,hdb,hdc,hdd}, or simply hd, for
  999. the "next" drive in sequence. Only the first three parameters are
  1000. required (cyls,heads,sects). For example <tt>hdc=1050,32,64
  1001. hdd=cdrom</tt>.
  1002.  
  1003. Getting the IDE driver to recognize your CD-ROM drive can be tricky,
  1004. especially if you have more than 2 devices or more than one IDE
  1005. controller. Usually all that is required is to pass the right command
  1006. line options from LILO. The file <url
  1007. url="/usr/src/linux/Documentation/ide-cd"> explains how to do
  1008. this. Read it carefully.
  1009.  
  1010. Recent Linux kernels have better support for multiple IDE devices. If
  1011. you have problems with an older kernel, upgrading may help.
  1012.  
  1013. <sect1>Booting the Linux Kernel<p>
  1014.  
  1015. You can now reboot with the new kernel. Watch for a message such as
  1016. the following indicating that the CD-ROM has been found by the device
  1017. driver (the message will vary depending on the drive type):
  1018.  
  1019. <tscreen><verb>
  1020. SBPCD: Trying to detect a SoundBlaster CD-ROM drive at 0x230.
  1021. SBPCD: - Drive 0: CR-562-x (0.76)
  1022. SBPCD: 1 SoundBlaster CD-ROM drive(s) at 0x0230.
  1023. SBPCD: init done.
  1024. </verb></tscreen>
  1025.  
  1026. If the bootup messages scroll by too quickly to read, you should be
  1027. able to retrieve them using <tt>dmesg</tt> or <tt>tail
  1028. /var/adm/messages</tt>.
  1029.  
  1030. If the drive is not found, then a problem has occurred, See the
  1031. section on troubleshooting.
  1032.  
  1033. <sect1>Mounting, Unmounting, and Ejecting Devices<p>
  1034.  
  1035. To mount a CD-ROM, insert a disc in the drive, and run the
  1036. <tt>mount</tt> command as <tt>root</tt> (this assumes you created a
  1037. symbolic link to your device file as recommended above and that an
  1038. empty directory <tt>/mnt</tt> exists):
  1039.  
  1040. <tscreen><verb>
  1041. % mount -t iso9660 -r /dev/cdrom /mnt
  1042. </verb></tscreen>
  1043.  
  1044. The CD can now be accessed under the directory <tt>/mnt</tt>. Note
  1045. that <tt>/mnt</tt> is commonly used as a temporary mount point; a more
  1046. suitable name for a permanent installation might be something like
  1047. <tt>/cdrom</tt>. There are other options to the mount command that
  1048. you may wish to use; see the <tt>mount(8)</tt> man page for details.
  1049.  
  1050. You can add an entry to <tt>/etc/fstab</tt> to automatically mount a
  1051. CD-ROM when Linux boots or to specify parameters to use when it is
  1052. mounted; see the <tt>fstab(5)</tt> man page.
  1053.  
  1054. Note that to play audio CDs you should <em>not</em> try to mount them.
  1055.  
  1056. To unmount a CD-ROM, use the <tt>umount</tt> command as <tt>root</tt>:
  1057.  
  1058. <tscreen><verb>
  1059. % umount /mnt
  1060. </verb></tscreen>
  1061.  
  1062. The disc can only be unmounted if no processes are currently accessing
  1063. the drive (including having their default directory set to the mounted
  1064. drive). You can then eject the disc. Most drives have an eject button;
  1065. there is also a standalone <htmlurl
  1066. url="ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/eject-1.1.tar.gz"
  1067. name="eject"> program that allows ejecting CD-ROMs under software
  1068. control.
  1069.  
  1070. Note that you should not eject a disc while it is mounted (this may or
  1071. may not be possible depending on the type of drive). The sbpcd driver
  1072. can automatically eject a CD-ROM when it is unmounted and insert the
  1073. CD tray when a disc is mounted (you can turn this feature off when
  1074. compiling the kernel or by using a software command).
  1075.  
  1076. Its possible that after playing an audio CD you may not be able to
  1077. mount a CD-ROM. You need to send a CD audio "stop" command (using a CD
  1078. player program) before trying the mount. This problem only appears to
  1079. occur with the SBPCD driver.
  1080.  
  1081. Stephen Tweedie (<htmlurl url="mailto:sct@dcs.ed.ac.uk"
  1082. name="sct@dcs.ed.ac.uk">) has written the <tt>Supermount</tt> package
  1083. which provides transparent mounting of removable media including
  1084. CD-ROM. You can find it at <url
  1085. url="ftp://sunsite.unc.edu/pub/linux/patches/diskdrives/">.
  1086.  
  1087. <sect1>Troubleshooting<p>
  1088.  
  1089. If you still encounter problems after following the instructions in
  1090. the HOWTO, here are some things to check. The checks are listed in
  1091. increasing order of complexity. If a check fails, solve the problem
  1092. before moving to the next stage.
  1093.  
  1094. <sect2>Step 1: Make sure you are really running the kernel you compiled<p>
  1095.  
  1096. You can check the date stamp on the kernel to see if you are running
  1097. the one that you compiled with CD-ROM support. You can do this
  1098. with the <tt>uname</tt> command:
  1099.  
  1100. <tscreen><verb>
  1101. % uname -a
  1102. Linux fizzbin 2.0.0 #1 Fri May 17 17:35:40 EDT 1996 i386
  1103. </verb></tscreen>
  1104.  
  1105. or by displaying the file <tt>/proc/version</tt>:
  1106.  
  1107. <tscreen><verb>
  1108. % cat /proc/version
  1109. Linux version 2.0.0 (root@fizzbin) (gcc version 2.7.0) #1 Fri May 17 17:35:40 EDT 1996
  1110. </verb></tscreen>
  1111.  
  1112. If the date stamp doesn't seem to match when you compiled the kernel,
  1113. then you are running an old kernel. Did you really reboot? If you use
  1114. LILO, did you re-install it (typically by running
  1115. <tt>/etc/lilo/install</tt>)? If booting from floppy, did you create a
  1116. new boot floppy and use it when booting?
  1117.  
  1118. <sect2>Step 2: Make sure the proper kernel drivers are compiled in<p>
  1119.  
  1120. You can see what drivers are compiled in by looking at
  1121. <tt>/proc/devices</tt>:
  1122.  
  1123. <tscreen><verb>
  1124. % cat /proc/devices
  1125. Character devices:
  1126.  1 mem
  1127.  4 tty
  1128.  5 cua
  1129.  6 lp
  1130. 14 sound
  1131. 15 Joystick
  1132.  
  1133. Block devices:
  1134.  2 fd
  1135.  3 hd
  1136. 25 sbpcd
  1137. </verb></tscreen>
  1138.  
  1139. First look for your CD-ROM device driver. These are all block devices,
  1140. in this case we can see that the <tt>sbpcd</tt> driver was present.
  1141.  
  1142. Also make sure that ISO-9660 filesystem support was compiled in, by
  1143. looking at <tt>/proc/filesystems</tt>:
  1144.  
  1145. <tscreen><verb>
  1146. % cat /proc/filesystems
  1147.         ext2
  1148.         msdos
  1149. nodev   proc
  1150.         iso9660
  1151. </verb></tscreen>
  1152.  
  1153. You can also see what i/o port addresses are being used by a driver
  1154. with the file <tt>/proc/ioports</tt>:
  1155.  
  1156. <tscreen><verb>
  1157. howto % cat /proc/ioports
  1158.  ...
  1159. 0230-0233 : sbpcd
  1160.  ...
  1161. </verb></tscreen>
  1162.  
  1163. If any of the drivers you thought you compiled in are not displayed,
  1164. then something went wrong with the kernel configuration or
  1165. build. Start the installation process again, beginning with
  1166. configuration and building of the kernel.
  1167.  
  1168. <sect2>Step 3: Did the kernel detect your drive during booting?<p>
  1169.  
  1170. Make sure that the CD-ROM device was detected when the kernel
  1171. booted. You should have seen a message on bootup. If the messages
  1172. scrolled off the screen, you can usually recall them using the
  1173. <tt>dmesg</tt> command:
  1174.  
  1175. <tscreen><verb>
  1176. % dmesg
  1177. </verb></tscreen>
  1178.  
  1179. or
  1180.  
  1181. <tscreen><verb>
  1182. % tail /var/adm/messages
  1183. </verb></tscreen>
  1184.  
  1185. If your drive was not found then something is wrong. Make sure it is
  1186. powered on and all cables are connected. If your drive has hardware
  1187. jumpers for addressing, check that they are set correctly (e.g. drive
  1188. 0 if you have only one drive). ATAPI CD-ROMS must be jumpered as
  1189. "single" or "master", and not "slave" when only one IDE device is
  1190. attached to an interface. If the drive works under DOS then you can be
  1191. reasonably confident that the hardware is working.
  1192.  
  1193. Many kernel drivers using auto-probing, but some do not, and in any
  1194. case the probing is not always reliable. Use the kernel command line
  1195. option listed for your kernel driver type. You may want to try several
  1196. different values if you are not sure of the i/o address or other
  1197. parameters. LILO can be (and usually is) configured to allow you to
  1198. enter the parameters manually when booting.
  1199.  
  1200. Another possibility is that you used the wrong kernel driver for your
  1201. CD-ROM driver. Some documentation may refer to proprietary interfaces
  1202. as IDE, leading some to mistakenly believe they are ATAPI drives.
  1203.  
  1204. Another possibility is that your drive (or interface card) is one of
  1205. the "compatible" type that requires initialization by the DOS
  1206. driver. Try booting DOS and loading the vendor supplied DOS device
  1207. driver. Then soft boot Linux using <tt>Control-Alt-Delete</tt>.
  1208.  
  1209. If your drive is not listed in this document, it is possible that
  1210. there are no drivers for it available under Linux. You can check with
  1211. some of the references listed at the end of this document for
  1212. assistance.
  1213.  
  1214. <sect2>Step 4: Can you read data from the drive?<p>
  1215.  
  1216. Try reading from the CD-ROM drive. Typing the following command should
  1217. cause the drive activity light (if present) to come on and no errors
  1218. should be reported. Use whatever device file is appropriate for your
  1219. drive and make sure a CD-ROM is inserted; use Control-C to exit.
  1220.  
  1221. <tscreen><verb>
  1222. dd if=/dev/cdrom of=/dev/null bs=2048
  1223. ^C
  1224. 124+0 records in
  1225. 124+0 records out
  1226. </verb></tscreen>
  1227.  
  1228. If this works, then the kernel is communicating with the drive and you
  1229. can move on to step 5.
  1230.  
  1231. If not, then a possible cause is the device file. Make sure than the
  1232. device file in the <tt>/dev</tt> directory has the correct major and
  1233. minor numbers as listed previously for your drive type. Check that the
  1234. permissions on the device file allow reading and writing.
  1235.  
  1236. A remote possibility is a hardware problem. Try testing the drive
  1237. under DOS, if possible, to determine if this could be the case.
  1238.  
  1239. <sect2>Step 5: Can you mount the drive?<p>
  1240.  
  1241. If you can read from the drive but cannot mount it, first verify that
  1242. you compiled in ISO-9660 file system support by reading
  1243. <tt>/proc/filesystems</tt>, as described previously.
  1244.  
  1245. Make sure you are mounting the drive with the "-t iso9660" and "-r"
  1246. options and that a known good CD-ROM (not Audio CD) is inserted in the
  1247. drive. You normally must mount drives as user <tt>root</tt>.
  1248.  
  1249. With ATAPI CD-ROM drives you may need to mount specifying a block size
  1250. of 2048 bytes. Add the option "-o block=2048" to the mount parameters.
  1251.  
  1252. Make sure that the mount point exists and is an empty directory.
  1253.  
  1254. If you are automatically mounting the CD-ROM on bootup, make sure that
  1255. you have correct entries in the /etc/fstab file.
  1256.  
  1257. If you are running the syslog daemon, there may be error messages from
  1258. the kernel that you are not seeing. Try using the "dmesg" command:
  1259.  
  1260. <tscreen><verb>
  1261. % dmesg
  1262. SBPCD: sbpcd_open: no disk in drive
  1263. </verb></tscreen>
  1264.  
  1265. There may also be errors logged to files in <tt>/var/adm</tt>,
  1266. depending on how your system is configured.
  1267.  
  1268. <sect2>Debugging Audio Problems<p>
  1269.  
  1270. If the drive works with CD-ROMS, but not for playing audio CDs, here
  1271. are some possible solutions.
  1272.  
  1273. You need an application program to play audio CDs. Some applications
  1274. may be broken or may not be compatible with your drive. Try other
  1275. applications and/or try recompiling them yourself.
  1276.  
  1277. A few of the CD-ROM drivers do not support playing Audio CDs. Check
  1278. the README file or source code to see if that is the case.
  1279.  
  1280. Check if the audio can be played through the headphone jack. If so,
  1281. then the problem is likely related to your sound card. Use a mixer
  1282. program to set the input device and volume levels. Mask sure you have
  1283. installed an audio cable from the CD-ROM drive to the sound card. Make
  1284. sure that the kernel sound card driver is installed and working (see
  1285. the <htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html"
  1286. name="Sound HOWTO">).
  1287.  
  1288. <sect2>When All Else Fails<p>
  1289.  
  1290. If you still have problems, here are some final suggestions for things
  1291. to try:
  1292.  
  1293. <itemize>
  1294. <item>carefully re-read this HOWTO document
  1295. <item>read the references listed at the end of this document,
  1296. especially the relevant kernel source README files
  1297. <item>post a question to one of the <tt>comp.os.linux</tt> or
  1298. other usenet newsgroups
  1299. <item>send a question to the Linux mailing list
  1300. <item>try using the latest Linux kernel
  1301. <item>contact your computer dealer
  1302. <item>contact the CD-ROM manufacturer
  1303. <item>send mail to the author of the relevant kernel driver
  1304. <item>send mail to me
  1305. <item>fire up emacs and type <tt>Esc-x doctor</tt>
  1306. </itemize>
  1307.  
  1308. <sect>Applications<p>
  1309.  
  1310. This section briefly lists some of the key applications related to
  1311. CD-ROM that are available under Linux. Check the Linux Software Map
  1312. for the latest versions and archive sites.
  1313.  
  1314. <sect1>Audio CD Players<p>
  1315.  
  1316. Several programs are available for playing audio CDs, either through a
  1317. headphone jack or an attached sound card.
  1318.  
  1319. <descrip>
  1320. <tag>Workman</tag>a graphical player running under X11 and supporting
  1321. a CD database and many other features
  1322. <tag>WorkBone</tag>an interactive text-mode player
  1323. <tag>xcdplayer</tag>a simple X11 based player
  1324. <tag>cdplayer</tag>a very simple command line based player
  1325. <tag>Xmcd</tag>an X11/Motif based player
  1326. <tag>xmitsumi</tag>another X11 based player for Mitsumi drives
  1327. <tag>xplaycd</tag>another X11 based player, bundled with sound mixer 
  1328. and VU meter programs
  1329. <tag>cdtool</tag>command line tools for playing audio CDs
  1330. </descrip>
  1331.  
  1332. Some of these programs are coded to use a specific device file for the
  1333. CD-ROM (e.g. <tt>/dev/cdrom</tt>). You may be able to pass the correct
  1334. device name as a parameter, or you can create a symbolic link in the
  1335. <tt>/dev</tt> directory. If sending the CD output to a sound card, you
  1336. may wish to use a mixer program to set volume settings or select the
  1337. CD-ROM input for recording.
  1338.  
  1339. <sect1>Inheriting File System<p>
  1340.  
  1341. The Inheriting File System (IFS) is a kernel driver that allows
  1342. mounting multiple file systems at the same point. It is similar to the
  1343. Translucent File System provided under SunOS. By mounting a hard disk
  1344. directory over a CD-ROM file system, you can effectively obtain a
  1345. writable CD-ROM file system.
  1346.  
  1347. The current version is experimental and was written for the 0.99pl11
  1348. and pl12 kernels; it may or may not work with more recent revisions.
  1349. The author is Werner Almesberger (<htmlurl
  1350. url="mailto:almesber@bernina.ethz.ch"
  1351. name="almesber@bernina.ethz.ch">).
  1352.  
  1353. A package called the user file system is another possible method of
  1354. implementing similar functionality.
  1355.  
  1356. <sect1>PhotoCD<p>
  1357.  
  1358. PhotoCDs use an ISO-9660 file system containing image files in a
  1359. proprietary format. Not all CD-ROM drives support reading PhotoCDs.
  1360.  
  1361. The <tt>hpcdtoppm</tt> program by Hadmut Danisch converts PhotoCD
  1362. files to the portable pixmap format. It can be obtained from <url
  1363. url="ftp://ftp.gwdg.de/pub/linux/hpcdtoppm"> or as part of the PBM
  1364. (portable bit map) utilities, available on many archive sites (look
  1365. for "pbm" or "netpbm").
  1366.  
  1367. The <tt>photocd</tt> program by Gerd Knorr <htmlurl
  1368. url="mailto:kraxel@cs.tu-berlin.de" name="kraxel@cs.tu-berlin.de"> can
  1369. convert PhotoCD images into Targa or Windows and OS/2 bitmap files.
  1370.  
  1371. The same author has written the program <tt>xpcd</tt>, an X11-based
  1372. program for handling PhotoCD images. You can select the images with a
  1373. mouse, preview the image in a small window, and load the image with
  1374. any of the five possible resolutions. You can also mark a part of the
  1375. Image and load only the selected part. Look for these packages at <url
  1376. url="ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/">.
  1377.  
  1378. The ImageMagick image file manipulation program also supports PhotoCD
  1379. files. It is available from <url
  1380. url="ftp://ftp.x.org/contrib/applications/ImageMagick/">.
  1381.  
  1382. <sect1>Mkisofs<p>
  1383.  
  1384. Eric Youngdale's <tt>mkisofs</tt> package allows creating an ISO-9660
  1385. file system on a hard disk partition. This can then be used to assist
  1386. in creating and testing CD-ROM file systems before mastering discs.
  1387.  
  1388. The tools for actually writing data to writable CD-ROM drives tend to
  1389. be vendor specific. They also require writing the data with no
  1390. interruptions, so a multitasking operating system like Linux is not
  1391. particularly well suited.
  1392.  
  1393. <sect1>ISO-9660 Utilities<p>
  1394.  
  1395. These are some utilities for verifying the format of ISO-9660
  1396. formatted discs; you may find them useful for testing suspect CDs. The
  1397. package can be found at <url url="ftp://ftp.cdrom.com/pub/cdrom/ptf/">.
  1398. They were written by Bill Siegmund and Rich Morin.
  1399.  
  1400. <sect>Answers to Frequently Asked Questions<p>
  1401.  
  1402. <sect1>How can a non-root user mount and unmount discs?<p>
  1403.  
  1404. Some <tt>mount</tt> commands support the <em>user</em> option. If you
  1405. make an entry such as the following in <tt>/etc/fstab</tt>:
  1406.  
  1407. <tscreen><verb>
  1408. /dev/sbpcd  /cdrom   iso9660     user,noauto,ro
  1409. </verb></tscreen>
  1410.  
  1411. then an ordinary user will be allowed to mount and unmount the drive
  1412. using these commands:
  1413.  
  1414. <tscreen><verb>
  1415. % mount /cdrom
  1416. % umount /cdrom
  1417. </verb></tscreen>
  1418.  
  1419. The disc will be mounted with some options that ensure security
  1420. (e.g. programs cannot executed, device files are ignored); in some
  1421. cases this may be too restrictive.
  1422.  
  1423. Another method is to get the <tt>usermount</tt> package which allows
  1424. non-root users to mount and unmount removable devices such as floppies
  1425. and CD-ROMs, but restricts access to other devices (such as hard disk
  1426. partitions). It is available on major archive sites.
  1427.  
  1428. The archive site <tt>ftp.cdrom.com</tt> has the source file
  1429. <tt>mount.c</tt> which allows mounting an unmounting of CD-ROMs (only)
  1430. by normal users. It runs as a setuid executable.
  1431.  
  1432. <sect1>Why do I get device is busy when unmounting a CD-ROM?<p>
  1433.  
  1434. The disc cannot be unmounted if any processes are accessing the drive,
  1435. including having their default directory set to the mounted
  1436. filesystem. If you cannot identify the processes using the disc, you
  1437. can use the <tt>fuser</tt> command, as shown in the following example.
  1438.  
  1439. <tscreen><verb>
  1440. % umount /cdrom
  1441. umount: /dev/sbpcd: device is busy
  1442. % fuser -v /cdrom
  1443. /cdrom:               USER       PID ACCESS COMMAND
  1444.                       tranter     50 ..c..  bash
  1445. </verb></tscreen>
  1446.  
  1447. <sect1>How do I export a CD-ROM to other hosts over NFS?<p>
  1448.  
  1449. You need to add an entry to the <tt>/etc/exports</tt> file; see the
  1450. <tt>exports(5)</tt> man page for details.
  1451.  
  1452. <sect1>Can I boot Linux from a CD-ROM?<p>
  1453.  
  1454. The easiest way to boot from CD-ROM is to use a boot floppy. Several
  1455. of the Linux CD-ROM distributions (e.g. Yggdrasil) include one, or you
  1456. can use the boot disk(s) from one of the Linux distributions
  1457. (e.g. Slackware) that includes the necessary CD-ROM drivers for your
  1458. system.
  1459.  
  1460. In the future it may be possible to boot from ATAPI CD-ROM drives
  1461. which have the appropriate ROM BIOS functions.
  1462.  
  1463. <sect1>How can I read digital data from audio CDs?<p>
  1464.  
  1465. Heiko Eissfeldt (<htmlurl url="mailto:heiko@colossus.escape.de"
  1466. name="heiko@colossus.escape.de">) and Olaf Kindel have written a
  1467. utility that reads audio data and saves it as <tt>.wav</tt> format
  1468. sound files. The package is called <tt>cdda2wav.tar.gz</tt> and can be
  1469. found on <tt>sunsite.unc.edu</tt>.
  1470.  
  1471. Because CD-ROM drives are changing very quickly, it is difficult to
  1472. list which models support reading digital data. You best bet is to get
  1473. the latest <tt>cdda2wav</tt> package and read the documentation.
  1474.  
  1475. For more information on this subject, also see the alt.cd-rom FAQ
  1476. listed in the references section.
  1477.  
  1478. <sect1>Why doesn't the find command work properly?<p>
  1479.  
  1480. On ISO-9660 formatted discs without the Rock Ridge Extensions, you
  1481. need to add the <tt>-noleaf</tt> option to the <tt>find</tt> command.
  1482.  
  1483. The reason for this is that the number of links for each directory
  1484. file is not easily obtainable, so it is set to 2. The default behavior
  1485. for the <tt>find</tt> program is to look for (i_links - 2)
  1486. subdirectories in each directory, and it then assumes that the rest
  1487. are regular files. The <tt>-noleaf</tt> switch disables this
  1488. optimization.
  1489.  
  1490. <sect1>Is the Reveal Multimedia Effects kit CD-ROM supported?<p>
  1491.  
  1492. (The following was provided by Steve Horne <htmlurl
  1493. url="mailto:Horne@cmod2.pfc.mit.edu" name="Horne@cmod2.pfc.mit.edu">.
  1494. This only applies to certain Reveal drives; apparently newer ones are
  1495. made by Panasonic and work fine with the sbpcd driver.)
  1496.  
  1497. About a year ago I bought a Reveal CD/soundcard kit, and managed to
  1498. get my particular configuration to work under Linux. I posted the
  1499. tricks I used to make the thing work; that note got into the CD-ROM
  1500. HOWTO. Recently I've been receiving a couple of requests a week for
  1501. help on making Reveal kits work under Linux.
  1502.  
  1503. I'm no expert. All I did was hammer away at Reveal Tech Support until
  1504. they gave me the address of the appropriate port, then added the two
  1505. SOUND-FX lines to the cdu31a driver.  I don't know how to help most of
  1506. the people who e-mail me.  This is the note I plan to send them. It
  1507. would be a good idea for you to condense it to the appropriate level
  1508. for the HOWTO. In particular, I don't want anyone to get the
  1509. impression that this is a good card to buy for a linux system.  It's
  1510. not.
  1511.  
  1512. REVEAL cards -  under Linux
  1513.  
  1514. Summary:
  1515.  
  1516. <itemize>
  1517. <item>Don't buy one.
  1518. <item>If you already have one, and have a Sony drive, you can make the
  1519. CD work.
  1520. <item>If you don't have a Sony drive, you can probably make the drive
  1521. work, but I'm not certain, since I don't have that hardware.
  1522. <item>Sound support is poor. If Aztech would release programming
  1523. information, there would be some hope.
  1524. </itemize>
  1525.  
  1526. Fine print:
  1527.  
  1528. If your kit has a Sony, the cdu31a driver will work for you.  You need
  1529. a kernel with cdu31a support compiled in. The following is from the
  1530. comments in the cdu31a source code:
  1531.  
  1532. <tscreen><verb>
  1533.  * WARNING -    All autoprobes have been removed from the driver.
  1534.  *              You MUST configure the CDU31A via a LILO config
  1535.  *              at boot time or in lilo.conf.  I have the
  1536.  *              following in my lilo.conf:
  1537.  *
  1538.  *                append="cdu31a=0x1f88,0,PAS"
  1539.  *
  1540.  *              The first number is the I/O base address of the
  1541.  *              card.  The second is the interrupt (0 means none).
  1542.  *              The third should be "PAS" if on a Pro-Audio
  1543.  *              spectrum, or nothing if on something else.
  1544. </verb></tscreen>
  1545.  
  1546. I expect the appropriate line for a Reveal card to be 
  1547.  
  1548. <tscreen><verb>
  1549. append="cdu31a=0x654,0"
  1550. </verb></tscreen>
  1551.  
  1552. Since I don't consistently use LILO, I have just put the autoprobing
  1553. back in by deleting the conditional stuff, and put my address first.
  1554. (The file is <url url="/usr/src/linux/drivers/cdrom/cdu31a.c">; search
  1555. for the string "cdu31a_addresses" to find the spot.)
  1556.  
  1557. THIS WILL NOT WORK IF YOUR KIT DOESN'T HAVE A SONY DRIVE!  (I don't
  1558. know that for sure, but I'd be very surprised if it did.)
  1559.  
  1560. By analogy to the Sony case, I expect that if you have a Panasonic or
  1561. Mitsumi drive, you need to obtain from Reveal Tech Support the base
  1562. register for your CD-ROM type, then use the appropriate driver. (I
  1563. don't know if the sbpcd driver will work; it might. No matter what,
  1564. you need those addresses.)  I don't know if the "append=..." will work
  1565. with the other drivers.
  1566.  
  1567. You can't patch the driver or lilo.conf until you have some sort of
  1568. system up.  If you are starting from scratch (DOS only, no Linux) here
  1569. are a few things to try --
  1570.  
  1571. <enum>
  1572. <item>
  1573. Copy the installation files to a DOS partition and install from there.
  1574. This is foolproof but will require up to 90 MB of space in your DOS
  1575. partition.  Once the system is up you can use the above tricks.  It's
  1576. possible to bootstrap yourself up by installing only the A, AP, and D
  1577. series (if you are using Slackware) plus a kernel source tree (Q ?).
  1578. This will give you the tools to patch and build a kernel.
  1579.  
  1580. <item>If you either have a Sony CD or are otherwise confident, have a
  1581. friend make you a patched kernel -- (autoprobes on, your address
  1582. first.)  Rdev it in the usual way:
  1583.  
  1584. <tscreen><verb>
  1585. rdev  /dev/fd0 /dev/fd0            ; root=floppy
  1586. rdev -r /dev/fd0 1440                   ; ramdisk
  1587. rdev -t /dev/fd0 -3                     ; prompt for screen mode
  1588. </verb></tscreen>
  1589.  
  1590. Then use it to boot the installation root-disk. Make a mount point
  1591. for the CD that won't interfere with the installation procedure:
  1592.  
  1593. <tscreen><verb>
  1594. # mkdir /cd
  1595. # mount -r -t iso9660 /dev/fd0 /cd
  1596. </verb></tscreen>
  1597.  
  1598. Then use the "install from mounted directory" option. Of course, the
  1599. kernels in the distribution won't work for you; copy your custom
  1600. kernel instead.
  1601.  
  1602. <item>It's just barely possible (I haven't checked) that the new
  1603. LOADLIN routine, which boots Linux from DOS, might save you. I
  1604. believe it's possible to use it like LILO to pass data to the kernel,
  1605. so it might work to boot DOS, then boot Linux, passing the hardware
  1606. addresses to the driver via LOADLIN. I've never tried this.
  1607.  
  1608. </enum>
  1609.  
  1610. Sound support:
  1611.  
  1612. This card (isc-400) isn't well supported by Linux, which is a shame
  1613. because it seems to be a nice piece of hardware. The card will
  1614. produce output in the 8-bit SB mode. I haven't made the mixer work,
  1615. so recording doesn't work properly either. The MSS mode doesn't have
  1616. an IRQ; I don't know how to tell the driver that, so that doesn't
  1617. work. I haven't seen the AdLib compatibility work.
  1618.  
  1619. I have tried, and at least one other person has tried, to obtain
  1620. programming information for the native mode(s) of the card. After many
  1621. hours on the phone I was referred to Singapore. I passed at that
  1622. point. When I get serious about sound again, I'll buy a genuine
  1623. SoundBlaster card.
  1624.  
  1625. <sect1>Does Linux support any recordable CD-ROM drives?<p>
  1626.  
  1627. According to Adam J. Richter, <htmlurl url="mailto:adam@yggdrasil.com"
  1628. name="adam@yggdrasil.com">:
  1629.  
  1630. The Yggdrasil distribution can drive a Philips CD writer with an
  1631. Adaptec 154x SCSI controller. I'm not sure which other SCSI
  1632. controllers, if any, will work. You can use <tt>mkisofs</tt> to make
  1633. an ISO-9660 filesystem and <tt>cdwrite</tt> to write it to the CD. If
  1634. you want us to help you set this up, you can call us on our 900
  1635. technical support number: 1-900-446-6075 extension 835
  1636. (US$2.95/minute, U.S. only).
  1637.  
  1638. George Moody, <htmlurl url="mailto:george@hstbme.mit.edu"
  1639. name="george@hstbme.mit.edu"> reports:
  1640.  
  1641. I use `mkisofs' (from tsx-11.mit.edu and other standard sources) and
  1642. `cdwrite' (from ftp.yggdrasil.com) to write CDs using the following
  1643. configuration:
  1644.  
  1645. <itemize>
  1646. <item> Philips CDD522 CD recorder
  1647. <item> Seagate ST15150N hard disk (4.1 GB `Barracuda' drive, not an AV drive)
  1648. <item> NCR B355 PCI SCSI controller (uses 53C810, praised as cheap and fast in the PCI-HOWTO)
  1649. </itemize>
  1650.  
  1651. The hard disk and the CD recorder are on the same SCSI bus.  My system
  1652. is a 100 MHz Pentium running Linux 1.2.12.  I'm using the standard NCR
  1653. PCI-SCSI driver, not one of the new alpha versions that are said to
  1654. support disconnect/reconnect.  I've been able to make CDs at 2x speed
  1655. from image files in both ext2fs and MSDOS file systems (I haven't
  1656. tried copying from a raw disk device, since I don't have a partition
  1657. to spare).  The only problem is that occasionally the system gets
  1658. wedged *after* `fixating' the CD; when this happens, I reboot the
  1659. system and everything's OK, including the CD I've just written.  I run
  1660. `cdwrite' as root, sometimes while running X11 and a few low-load X11
  1661. clients, but I try not to do anything else with the system while
  1662. writing a CD.
  1663.  
  1664. Also see the Linux CD-Writer mini-HOWTO document, found
  1665. at <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/CD-Writer">
  1666. or <url url="http://sunsite.unc.edu/mdw/HOWTO/CD-Writer.html">.
  1667.  
  1668. <sect1>Why do I get mount: Read-only file system when mounting a CD-ROM?<p>
  1669.  
  1670. CD-ROM is a read-only media. With older kernels you could mount a
  1671. CD-ROM for read/write; attempts to write data to the CD would not
  1672. generate any errors. As of kernel version 1.1.33 this was corrected so
  1673. that CD-ROMs must be mounted read only (e.g. using the -r option to
  1674. mount).
  1675.  
  1676. <sect1>Why does the disc tray open when I shut down the system?<p>
  1677.  
  1678. As of the 1.1.38 kernel, the sbpcd driver ejects the CD when it is
  1679. unmounted. If you shut down the system, a mounted CD will be
  1680. unmounted, causing it to eject.
  1681.  
  1682. This feature is for convenience when changing discs. If the tray is
  1683. open when you mount or read a CD, it will also automatically be
  1684. closed.
  1685.  
  1686. I found that this caused problems with a few programs (e.g. cdplay and
  1687. workbone). As of the 1.1.60 kernel you can control this feature under
  1688. software control. A sample program is included in the README.sbpcd
  1689. file (or use the <htmlurl
  1690. url="ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/eject-1.1.tar.gz"
  1691. name="eject"> program).
  1692.  
  1693. <sect1>I have a "special" CD that can't be mounted<p>
  1694.  
  1695. The "special" CD is likely an XA disc (like all Photo CDs or
  1696. "one-offs" created using CD-R drives). Most of the Linux kernel CD-ROM
  1697. drivers do not support XA discs, although you may be able to find a
  1698. patch to add support on one of the archive sites.
  1699.  
  1700. The sbpcd driver <em>does</em> support XA. If you are using this
  1701. driver you can determine if the disc is XA using the following
  1702. procedure: go into the file sbpcd.c and enable the display of the
  1703. "Table of Contents" (DBG_TOC). Build and install the new kernel and
  1704. boot from it. During each mount the TOC info will be written (either
  1705. to the console or to a log file). If the first displayed value in the
  1706. TOC header line is "20", then it is an XA disc. That byte is "00" with
  1707. normal disks. If the TOC display shows different tracks, that is also
  1708. a sign that it is an XA disc.
  1709.  
  1710. (thanks to Eberhard Moenkeberg for the above information)
  1711.  
  1712. Other possibilities for unreadable CDs are:
  1713.  
  1714. <enum>
  1715. <item>The disc doesn't use an ISO-9660 file system (e.g. some use SunOS)
  1716. <item>It is an audio CD
  1717. <item>The CD is damaged or defective
  1718. <item>You put it in the drive upside down :-)
  1719. </enum>
  1720.  
  1721. <sect1>Why does the drive light flash on my CDU-33 drive?<p>
  1722.  
  1723. This is normal and was added in a recent revision of the driver. It
  1724. flashes the drive light when a CD is mounted (it's not a bug, it's a
  1725. feature...).
  1726.  
  1727. <sect1>Do multi-platter CD-ROM drives work with Linux?<p>
  1728.  
  1729. Several users have reported success with SCSI multi-disc CD-ROM
  1730. changers.  You probably need to enable the "Probe all LUNs on each
  1731. SCSI device" kernel configuration option. At least one user also had
  1732. to increase a SCSI timeout value in the kernel driver. The Nakamichi
  1733. MBR-7 7 disc changer and Pioneer 12 disc changer have been reported to
  1734. work.
  1735.  
  1736. EIDE/ATAPI multi-disc changers are also available. The 2.0 kernel has
  1737. rudimentary support for some drives using the CDROMLOADFROMSLOT ioctl
  1738. function. The IDE-CD kernel driver documentation file includes source
  1739. code for a program to select changer slots.
  1740.  
  1741. <sect1>I get "/cdrom: Permission denied" errors<p>
  1742.  
  1743. Some CDs have file permissions that only allow user <tt>root</tt> to
  1744. read them. The March 1995 InfoMagic CD set is one example.
  1745.  
  1746. The following patch, courtesy of Christoph Lameter (<htmlurl
  1747. url="mailto:clameter@waterf.org" name="clameter@waterf.org">) patches
  1748. the kernel to get around this problem.
  1749.  
  1750. <verb>
  1751. From: clameter@waterf.org (Christoph Lameter)
  1752. Newsgroups: comp.os.linux.setup
  1753. Subject: Infomagic Developers Set: Fix for CD-Rom permissions
  1754. Date: 12 Apr 1995 20:32:03 -0700
  1755. Organization: The Water Fountain - Mining for streams of Living Water
  1756. NNTP-Posting-Host: waterf.org
  1757. X-Newsreader: TIN [version 1.2 PL2]
  1758.  
  1759. The March 1995 Edition of the Infomagic Developers CD-ROM Set has
  1760. problems because the information stored in the root directory
  1761. permissions is causing the following problems with using the CDs
  1762.  
  1763. 1. Disc1 will always have the owner/group of 5101/51 and has write
  1764. access allowed (?)
  1765.  
  1766. 2. Disc2 and 3 have rwx set for root and no rights at all for any
  1767. other group/user. These discs cannot be accessed from any user other
  1768. than root! I run a BBS and I need to make them accessible for download
  1769. by others.
  1770.  
  1771. I have seen several fixes to this problem already floating
  1772. around. Trouble is that these fixes usually change the rights for ALL
  1773. directories on the CD. This fix here changes ONLY the rights for the
  1774. root directory of the CD-Rom. If you want to run parts of Linux
  1775. directly off the CD you might run into trouble if all directories are
  1776. readable for everyone and if they are all owned by root.
  1777.  
  1778. This fix will set the rights for the root directory to r-xr-xr-x and
  1779. the owner/group to the values indicated in the uid and gid options to
  1780. the mount command.
  1781.  
  1782. To apply:
  1783.  cd /usr/src/linux/fs/isofs
  1784.  patch <**THIS MESSAGE**
  1785.  
  1786. and recompile kernel (you may have to fix up the patch by hand
  1787. depending on your kernel version).
  1788.  
  1789. This fix should probably be incorporated into the kernel. What business 
  1790. does data on a CD have to mess around with the permissions/owners of the 
  1791. mount-point anyways?
  1792.  
  1793. --- inode.c.ORIG    Wed Apr 12 17:24:36 1995
  1794. +++ inode.c    Wed Apr 12 17:59:12 1995
  1795. @@ -552,7 +552,15 @@
  1796.     these numbers in the inode structure. */
  1797.  
  1798.      if (!high_sierra)
  1799. -      parse_rock_ridge_inode(raw_inode, inode);
  1800. +    {  parse_rock_ridge_inode(raw_inode, inode);
  1801. +           /* check for access to the root directory rights/owner CL */
  1802. +       if((inode->i_sb->u.isofs_sb.s_firstdatazone) == inode->i_ino)
  1803. +           { /* Change owner/rights to the ones demanded by the mount command */
  1804. +             inode->i_uid = inode->i_sb->u.isofs_sb.s_uid;
  1805. +             inode->i_gid = inode->i_sb->u.isofs_sb.s_gid;
  1806. +         inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR;
  1807. +           }
  1808. +        }
  1809.      
  1810.  #ifdef DEBUG
  1811.      printk("Inode: %x extent: %x\n",inode->i_ino, inode->u.isofs_i.i_first_extent);
  1812. @@ -805,4 +813,3 @@
  1813.  }
  1814.  
  1815.  #endif
  1816. -
  1817. </verb>
  1818.  
  1819. <sect1>How do you pronounce "Matsushita" ?<p>
  1820.  
  1821. I'm told that the correct pronunciation it something like
  1822. MAT-SOOSH-TA.
  1823.  
  1824. <sect1>How do I interpret IDE CD kernel error messages?<p>
  1825.  
  1826. What does it mean when I get a kernel message from the IDE CD-ROM
  1827. driver like "hdxx: code: xx key: x asc: xx ascq: x"?
  1828.  
  1829. This is an status/error message from the IDE CD-ROM drive. By default
  1830. the IDECD driver prints out the raw information instead of wasting
  1831. kernel space with error messages.  You can change the default to
  1832. display the actual error messages by going into <url
  1833. url="/usr/src/linux/drivers/block/ide-cd.c"> and changing the value of
  1834. VERBOSE_IDE_CD_ERRORS to 1.
  1835.  
  1836. <sect1>Does Linux support Plug and Play devices?<p>
  1837.  
  1838. Linux does not yet fully support Plug and Play devices, but it is
  1839. being worked on. In the mean time some users have reported success by
  1840. either disabling the Plug and Play options in their BIOS, or by
  1841. initializing the devices under Windows 95 before soft booting Linux.
  1842.  
  1843. <sect1>How can I tell what speed CD-ROM I have?<p>
  1844.  
  1845. Here's one way. This command measures how long is takes to read 1500K
  1846. of data from CD:
  1847.  
  1848. <tscreen><verb>
  1849. % time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
  1850. 1500+0 records in
  1851. 1500+0 records out
  1852. real 5.24
  1853. user 0.03
  1854. sys 5.07
  1855. </verb></tscreen>
  1856.  
  1857. The transfer rate of single speed drives is 150 kilobytes per second,
  1858. which should take about 10 seconds. At double speed it would take five
  1859. seconds, quad speed would take 2.5, etc...
  1860.  
  1861. The "sys" time above is probably the best number to look at -- in this
  1862. case it indicates a double speed drive. You can increase the amount of
  1863. data transferred to get a more accurate value (in case you were
  1864. wondering, the data does not get cached).
  1865.  
  1866. <sect1>My CD-ROM stopped working after Linux was installed<p>
  1867.  
  1868. The usual symptom is that the boot disk used to initially install
  1869. Linux recognized your CD-ROM drive, but after Linux was installed on
  1870. the hard drive or floppy and rebooted it no longer recognizes the
  1871. CD-ROM.
  1872.  
  1873. The most common reason for this problem is that with most Linux
  1874. distributions the kernel that is installed on your hard drive (or
  1875. floppy) is not necessarily the same one that was on your boot
  1876. disk. You selected a boot disk that matched your CD-ROM hardware,
  1877. while the kernel you installed is a "generic" kernel that is lacking
  1878. CD-ROM support. You can verify this by following the troubleshooting
  1879. guidelines discussed previously in this document (e.g. start by
  1880. checking <tt>/proc/devices</tt>).
  1881.  
  1882. The solution is to recompile the kernel, ensuring that the drivers for
  1883. your CD-ROM drive and any others that are needed (e.g. SCSI
  1884. controller, ISO-9660 file system) are included. See the <url
  1885. url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html" name="Kernel
  1886. HOWTO"> if you don't know how to do this.
  1887.  
  1888. If you passed any command line options to the boot disk
  1889. (e.g. "hdc=cdrom") you need to add these to your boot program
  1890. configuration file (typically /etc/lilo.conf).
  1891.  
  1892. <sect>References<p>
  1893.  
  1894. I have already mentioned the README files, typically installed in <url
  1895. url="/usr/src/linux/Documentation/cdrom/">. These can be a gold mine
  1896. of useful information.
  1897.  
  1898. The following usenet FAQs are posted periodically to <htmlurl
  1899. url="news:news.answers" name="news.answers"> and archived at
  1900. internet FTP sites such as <url url="ftp://rtfm.mit.edu/">:
  1901.  
  1902. <itemize>
  1903. <item>alt.cd-rom FAQ
  1904. <item>comp.periphs.scsi FAQ
  1905. <item>Enhanced IDE/Fast-ATA/ATA-2 FAQ
  1906. </itemize>
  1907.  
  1908. Several other Linux HOWTOs have useful information relevant to CD-ROM:
  1909.  
  1910. <itemize>
  1911.  
  1912. <item><url url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html" name="SCSI
  1913. HOWTO">
  1914.  
  1915. <item><url url="http://sunsite.unc.edu/mdw/HOWTO/Hardware-HOWTO.html"
  1916. name="Hardware Compatibility HOWTO">
  1917.  
  1918. <item><url url="http://sunsite.unc.edu/mdw/HOWTO/Sound-HOWTO.html"
  1919. name="Sound HOWTO">
  1920.  
  1921. <item><url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
  1922. name="Kernel HOWTO">
  1923.  
  1924. <item><url url="http://sunsite.unc.edu/mdw/HOWTO/Distribution-HOWTO.html"
  1925. name="Distribution HOWTO">
  1926.  
  1927. </itemize>
  1928.  
  1929. At least a dozen companies sell Linux distributions on CD-ROM; most of
  1930. them are listed in the Distribution HOWTO.
  1931.  
  1932. The following Usenet news groups cover CD-ROM related topics:
  1933.  
  1934. <itemize>
  1935. <item><htmlurl url="news:comp.publish.cdrom.hardware"
  1936. name="comp.publish.cdrom.hardware">
  1937. <item><htmlurl url="news:comp.publish.cdrom.multimedia"
  1938. name="comp.publish.cdrom.multimedia">
  1939. <item><htmlurl url="news:comp.publish.cdrom.software"
  1940. name="comp.publish.cdrom.software">
  1941. <item><htmlurl url="news:comp.sys.ibmpc.hardware.cd-rom"
  1942. name="comp.sys.ibm.pc.hardware.cd-rom">
  1943. <item><htmlurl url="news:alt.cd-rom" name="alt.cd-rom">
  1944. <item><htmlurl url="news:alt.cd-rom.reviews" name="alt.cd-rom.reviews">
  1945. </itemize>
  1946.  
  1947. The <tt>comp.os.linux</tt> newsgroups are also good sources of Linux
  1948. specific information.
  1949.  
  1950. There is a large archive of CD-ROM information and software at <url
  1951. url="ftp://ftp.cdrom.com/pub/cdrom/">.
  1952.  
  1953. A FAQ document on IDE and ATA devices can be found at <url
  1954. url="ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-IDE/">
  1955. and at <url url="http://www.seagate.com/techsuppt/faq/faqlist.html">.
  1956.  
  1957. Western Digital, the company that started the IDE protocol, has
  1958. information available on the IDE protocol available on their FTP site
  1959. at <url url="ftp://fission.dt.wdc.com/pub/standards/atapi">.
  1960.  
  1961. A Web site dedicated to multimedia can be found at <url
  1962. url="http://viswiz.gmd.de/MultimediaInfo/">. Creative Labs has a Web
  1963. site at <url url="http://www.creaf.com/">.
  1964.  
  1965. The Linux Documentation Project has produced several books on Linux,
  1966. including <em>Linux Installation and Getting Started</em>. These are
  1967. freely available by anonymous FTP from major Linux archive sites or
  1968. can be purchased in hardcopy format.
  1969.  
  1970. The <em>Linux Software Map</em> (LSM) is an invaluable reference for
  1971. locating Linux software. The LSM can be found on various anonymous FTP
  1972. sites, including <url
  1973. url="ftp://sunsite.unc.edu/pub/Linux/docs/LSM.gz/">.
  1974.  
  1975. The Linux mailing list has a number of "channels" dedicated to
  1976. different topics. To find out how to join, send a mail message with
  1977. the word "help" as the message body to <htmlurl
  1978. url="mailto:majordomo@vger.rutgers.edu"
  1979. name="majordomo@vger.rutgers.edu"> (Note: at time of writing these
  1980. mailing lists were severely overloaded and a replacement was being
  1981. sought).
  1982.  
  1983. Finally, a shameless plug: If you want to learn a lot more about
  1984. multimedia under Linux (especially CD-ROM and sound card applications
  1985. and programming), check out new my book <em>Multimedia on Linux</em>
  1986. published by O'Reilly and Associates (<url
  1987. url="http://www.ora.com/">). It should be available in the September
  1988. 1996 time frame.
  1989.  
  1990. </article>
  1991.