CD-ROM and Linux
CD-ROM stands for Compact Disc Read-Only Memory, a storage medium utilizing an optical laser to read microscopic pits on the aluminized layer of a polycarbonate disc. The same format is used for audio compact discs.
The storage capacity of a CD-ROM is approximately 650MB, equivalent to over 500 high density 3.5" floppy disks or roughly 250,000 typed pages.
First-generation drives (known as single speed), provide a transfer rate of approximately 150KB (kilobytes) per second. Double-speed drives are commonly available, and triple- and quad-speed drives have recently been introduced.
Most CD-ROM drives use either the Small Computer Systems Interface (SCSI) or a vendor-proprietary interface (which is often provided on a sound card). They also typically support playing audio CDs via an external headphone jack, line-level output, or speakers. A third type of CD-ROM interface, based on an extension of the IDE hard disk interface, has also recently become available.
CD-ROMs are usually formatted with an ISO-9660 (formerly called High Sierra) file system. This format restricts filenames to the MS-DOS style (8+3 characters). The Rock Ridge Extensions use undefined fields in the ISO-9660 standard to support longer filenames and additional Unix-style information (e.g., file ownership, device files, symbolic links, etc.).
Photo-CD is a standard developed by Kodak for storing photographic images as digital data on a CD-ROM. Photographic film can be transferred to a Photo-CD and, with appropriate software, you can view the images on a computer, perform further image processing, or send them to a printer. Up to 100 photographs can be stored on a CD with an image quality that is typically much higher than can be obtained using other methods, such as scanners.
CD recorders have recently become available. They use a different media and specialized equipment for recording, but the resulting disc can be read by any CD-ROM drive. (This is the same “write once” technology used for Photo-CD.)
The primary advantages of CD-ROM over other mass- storage media are its high storage capacity, high reliability, and low cost.
The drawbacks are that it is read-only, slower-than-hard-disk media, and the discs can be damaged if mishandled.
Linux provides good support for CD-ROM. The dynamic buffer cache used for the hard disk subsystem is also used for CD-ROM access, improving performance. Depending on the type, multiple drives can be supported. (The Panasonic driver, for example, supports up to 16 drives.)
Linux fully supports the Rock Ridge Extensions to the ISO-9660 file system, making all of the features of the hard disk file systems available, including long filenames, file permissions, links, and device files. PhotoCD is also supported by some of the CD-ROM drivers.
Many vendors (I know of at least ten) are now offering CDs of Linux source code, binaries, and documentation at reasonable prices. Many of these feature easy to use menu-driven installation programs. A single CD-ROM can hold a full Linux distribution, as well as all of the files from the two major Internet archive sites, with room to spare. By comparison, a recent Linux distribution can fill as many as 50-3.5 inch floppies.
Finally, most CD-ROM drives support playing audio CDs, so you can listen to music while waiting for the latest Linux kernel to compile.
Linux supports virtually all SCSI CD-ROM drives, provided that a supported SCSI host adaptor is used.
Many of the popular proprietary drives are supported, including models produced by Sony, Mitsumi, and Panasonic/Matsushita.
CD-ROMs based on the enhanced IDE standard are not yet officially supported by Linux, although at the time of this writing, at least one driver is in alpha testing.
By the time you read this, more devices will likely be supported, either as part of the standard Linux kernel or as patches. See the CD-ROM HOWTO document for a detailed list of the latest supported hardware.
Setting up Linux to use a CD-ROM involves four steps:
Installing the hardware
Configuring the Linux kernel
Creating the necessary device files
Mounting the media
I will cover them briefly here; see the Linux CD-ROM HOWTO for more details.
The first step, installation, is dependent on the type of drive. Follow the instructions provided by the manufacturer or have the installation performed by your dealer. There are no special installation requirements for Linux.
Next, the Linux kernel must be configured. In some cases, you may be able to use a pre-compiled kernel that has the necessary drivers, but I recommend compiling it yourself; it will do you good! For SCSI drives you need to configure in SCSI CD-ROM support and the driver for the SCSI host adaptor being used.
For the proprietary CD-ROM interfaces, select the appropriate driver (e.g., Sony CDU31A).
In order to mount CD-ROMs, you must also configure in support for the ISO-9660 file system. If you have a sound card, now would be a good time to configure the kernel sound driver as well.
The third step is to create the appropriate device files. If you are running a standard Linux distribution you may have already done this during system installation. It's a good idea to verify these; the CD-ROM HOWTO lists the device file types, which are drive dependent.
You should now be ready to compile and boot the newly configured kernel. Verify that the CD-ROM was detected by looking at the kernel boot messages; here is the output on my system:
SBPCD version 2.5 Eberhard Moenkeberg <firstname.lastname@example.org> SBPCD: Looking for a SoundBlaster/Matsushita CD-ROM drive SBPCD: Trying to detect a SoundBlaster CD-ROM drive at 0x230. SBPCD: - Drive 0: CR-562-x (0.76) SBPCD: 1 SoundBlaster CD-ROM drive(s) at 0x0230. SBPCD: init done.
1 hour 59 min ago
- Thanks for clearing that up.
7 hours 22 min ago
- Nice coding on the cake. I
18 hours 54 min ago
- Baker's identity
23 hours 43 min ago
- Uber jealous
1 day 4 hours ago
- Reality is disapointing
1 day 15 hours ago
- Máy sấy quần áo
1 day 17 hours ago
- Services on GlusterFS
1 day 18 hours ago
- Reply to comment | Linux Journal
1 day 19 hours ago
- Definitely cool stuff here
1 day 20 hours ago