7. CDROM problems

It seems that many people are having problems with their CDROM drives, so at the risk of repeating information from elsewhere, here is a section that may help.

7.1 Wrong Type of CDROM disk
7.2 Wrong Type of Device Interface
7.3 Different drive manufacturers
7.4 Wrong Kernel
7.5 EIDE on sound card
7.6 Matsushita interface on sound card (Panasonic).
7.7 hdd=cdrom
7.8 hdc=cdrom
7.9 /usr/src/linux/Documentation/ide.txt
7.10 /usr/src/linux/Documentation/cdrom/ide-cd
7.11 Kernel Detection (dmesg)
7.12 mknod /dev/hdc b 22 0
7.13 chgrp cdrom /dev/cdrom
7.14 /dev/cdrom
7.15 Slackware detection
7.16 Testing

7.1

Wrong Type of CDROM disk

There are audio CD's and data CD's. There are mixed media CDROM's with both! and there are multi-session CD's where the tracks were recorded in different weeks (by a CD-Recorder). It's very difficult to get audio data down the data interface, and data CD's don't play music.

There are also different data formats of CD's. Fortunately modern productions follow the latest spec's, but older ones might not.

7.2

Wrong Type of Device Interface

A CDROM drive can have one of several different interface cables (and cards) that connect it to the computer. The one you have depends on what you bought.

If you have a SCSI cdrom, it won't plug into an EIDE interface, you will need a SCSI interface card, and set the SCSI address of the device. You will also need a kernel that can drive the SCSI card (there are several different types).

If you have a Matsushita CDROM interface, you will need a special interface card to drive it, and have the correct kernel driver to drive that card (HINT: sbpcd).

If you have a sound-card, it might have additional circuitry to drive a CDROM, but which interface type ? Depends on what you bought. The sound card might allow you to completely diable that interface circuitry, so that you can plug it into different machines, without hardware conflicts. That disabling might be a physical jumper setting or controlled by software.

If you don't have an EIDE interface, don't blindly follow all of this, think about it, and try to figure-out how/if this applies to you.

7.3

Different drive manufacturers

If it is a SCSI CDROM, it doesn't matter who made it (as long as they got it right).

If it is an EIDE CDROM, is doesn't matter who made it - as long as it follows the correct ATAPI standards.

If the EIDE drive is made by Mitsumi, you still use the EIDE drivers, you don't use the mcd driver.

If the drive has a special interface card you will need a special driver for the card.

7.4

Wrong Kernel

The kernel has to have the relevent driver compiled in, or loaded as a module. You also need the iso9660 file-system driver.

If you have Linux running, simply download, configure and build a new kernel that suits you. However if you don't have Linux running, (and it's grinning at you from the CDROM), you have to find a pre-built kernel to install it.

The newer Linux 2.0 kernels know more about different hardware.

7.5

EIDE on sound card

If your second EIDE channel interface circuitry is on the CDROM, you might have to make sure that it is switched on. There might be a DOS program that enables it, see ide.txt You will run the program from DOS (or maybe DOSEMU), and then warm-boot the machine. i.e. if you switch off, the card resets itself. Similarly the Reset button should do so, but CTRL-ALT-DEL might allow the card to retain it's enabled settings (maybe not).

Read the kernel bootup messages to see what is detected, and at what address.

7.6

Matsushita interface on sound card (Panasonic).

You need a kernel with the sbpcd driver (sound-blaster-panasonic-cd).

When you boot, the kernel driver will probe a list of IO port addresses, looking for an intelligent response from the drive.

This takes a few moments for each attempt to timeout, but when the device is found the driver tells you the options that worked. The next time you boot, you can supply those numbers on the LILO boot line, and save a bit of time. For example, I use

sbpcd=0x320,LaserMate
	-or-
sbpcd=0

The sbpcd=0 version is for when my CDROM (external) isn't plugged in. It tells the driver not to probe at all, and saves ages.

7.7

hdd=cdrom

hdd corresponds to /dev/hdd, ie the fourth EIDE device. I don't need the option, because the newer Linux 2.0 EIDE driver is better than the 1.2.13 version, and detects it properly. However with the older 1.2.13 kernels (used on many boot disks), the EIDE driver has problems deciding that the device is a CDROM and not a hard disk.

7.8

hdc=cdrom

If the second EIDE cable only has one device, that device should be jumpered to be the master not the slave. Normally with two devices, the CDROM would be the slave device (I don't know why - maybe it's a question of timings and priorities).

If you put the CDROM on the first EIDE cable, it would be hdb=cdrom.

7.9

/usr/src/linux/Documentation/ide.txt

This tells you about the EIDE interface, and helps a lot.

7.10

/usr/src/linux/Documentation/cdrom/ide-cd

This is an excellent troubleshooting tutorial. READ IT.

7.11

Kernel Detection (dmesg)

Watch the boot up messages and see what they say. If they flew past too quickly, get a slower machine, or use SHIFT-PageUp.

NOTE: SHIFT-PageUp doesn't work after ALT-F2, because the kernel limits itself to remember a finite amount of information, so run the dmesg command or look in /var/adm/messages.

hda: ST31220A, 1033MB w/256kB Cache, LBA, CHS=2099/16/63
hdb: DSAA-3540, 504MB w/96kB Cache, LBA, CHS=1024/16/63
hdc: QUANTUM MAVERICK 540A, 516MB w/98kB Cache, LBA, CHS=1049/16/63
hdd: FX001DE, ATAPI CDROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15

7.12

mknod /dev/hdc b 22 0

For some reason, device nodes like /dev/hdc /dev/hdd and hd1, hd2, hd3 ... aren't always created for you. You have to create them.

## output from ls -l ##

brw-rw----   1 root     disk      22,   0 May  8  1995 /dev/hdc
brw-rw----   1 root     disk      22,   1 May  8  1995 /dev/hdc1
brw-rw----   1 root     disk      22,   2 May  8  1995 /dev/hdc2
brw-rw----   1 root     disk      22,   3 May  8  1995 /dev/hdc3
brw-rw----   1 root     disk      22,   4 May  8  1995 /dev/hdc4
... etc upto 16 ...

brw-rw----   1 root     disk      22,  64 Feb 13  1996 /dev/hdd
brw-rw----   1 root     disk      22,  65 May  8  1995 /dev/hdd1
brw-rw----   1 root     disk      22,  66 May  8  1995 /dev/hdd2
brw-rw----   1 root     disk      22,  67 May  8  1995 /dev/hdd3
brw-rw----   1 root     disk      22,  68 May  8  1995 /dev/hdd4
... etc upto 16 ...

If you have to create them there is a script to help you, see /usr/src/linux/scripts/MAKEDEV.ide. Note you only need one device node for a cdrom, you need several for a disk with several partitions, so you can create it with

mknod /dev/hdc b 22 0
mknod /dev/hdd b 22 64

7.13

chgrp cdrom /dev/cdrom

To allow plain users, to use the audio CD, you might want to add those users to the cdrom group, or chmod 666 /dev/cdrom

7.14

/dev/cdrom

Check that the symb-link is setup correctly, ls -l /dev/cdrom

lrwxrwxrwx   1 root     root            8 Feb 18  1996 /dev/cdrom -> /dev/hdd
If wrong you can set a new link using
cd /dev/
rm cdrom
ln -s hdd cdrom
From now on you will use /dev/cdrom, so that you don't have to know that it is really /dev/hdd or /dev/sbpcd or whatever.

7.15

Slackware detection

With Slackware 3.0 (pre Aug-96), there is a script that checks lots of devices, incase one of them is a CDROM, and attempts to mount the disk. This is very helpful, as you want the CDROM to work, but when you have configured the system, it is a pain, so delete it (I did, and I've forgotten what the file is, /etc/rc.d/cdrom maybe).

More importantly, if it doesn't work, it will generate an error message, However this message may be a red-herring, simply saying "it didn't work", not giving you a REAL error message. Look deeper, and try to find a previous message that makes more sense to someone on USENET.

7.16

Testing

The light flashes, you installed Linux, mount /cdrom works and workbone (or in X11 workman) plays audio CD's for you. It works.

Also compile and test eject.c, and if you are lucky, see if you can read audio as data (ie a digitised signal without noise). Also check that the analogue audio wires reach the sound-card mixer channel.