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 <email@example.com> 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.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- Designing Electronics with Linux
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Using Salt Stack and Vagrant for Drupal Development
- Validate an E-Mail Address with PHP, the Right Way
- Build a Skype Server for Your Home Phone System
- A Topic for Discussion - Open Source Feature-Richness?
- Why Python?
- Tech Tip: Really Simple HTTP Server with Python
- Not free anymore
1 hour 26 min ago
5 hours 13 min ago
- Reply to comment | Linux Journal
5 hours 21 min ago
- Understanding the Linux Kernel
7 hours 36 min ago
10 hours 6 min ago
- Kernel Problem
20 hours 9 min ago
- BASH script to log IPs on public web server
1 day 36 min ago
1 day 4 hours ago
- Reply to comment | Linux Journal
1 day 4 hours ago
- All the articles you talked
1 day 7 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?