[ Table of Contents ] [ Front Page ] [ Prev ] [ Linux Gazette FAQ ] [ Next ]

"Linux Gazette...making Linux just a little more fun!"

Creating Installation CDs from various Linux Distributions

By Mark Nielsen and Krassimir Petrov

If this document changes, it will be available here: http://www.tcu-inc.com/mark/articles/cdburn.html


  1. References
  2. Introduction to CD-ROM burning
  3. Installing an IDE CD-ROM writer
  4. Cdrecord and Xcdroast
  5. Download your favorite distributions.
  6. Write the CD-ROM
  7. Conclusions and future articles


  1. CD-Writing HOWTO by Winfried Trümper
  2. Lilo mini-Howto
  3. Xcdroast

Introduction to CD-ROM burning

The purpose of this article is to explain how to create an installation CD-ROM from one of the Linux distributions. We will limit ourselves to IDE CD-ROM writers, any ftp program, the program cdrecord, and the pre-made ISO images from various Linux distributions. We will also be touching the /etc/lilo.conf file.

This document may be modified and distributed with or without the permission of its authors. The authors disclaim any warranties with regard to this document: use it at your own risk.

Installing an IDE CD-ROM writer

Using SCSI CD-ROM writers is usually easy, but most people have IDE CD-ROM writers and it is what we are using. Thus, we will talk only about IDE CD-ROM writers.

First, there are two types of CD-ROM writers, CD-ROM recorders and CD-ROM re-writers. Either will work fine. CD-ROM recorders only write once to the cheap ($2 or cheaper) write-once CD-ROMs. The CD-ROM re-writers can also delete and re-write the more expensive rewriting CD-ROMs. CD-ROM rewriters also can behave as CD-ROM recorders.

Second, in order to use an IDE CD-ROM writer, you must fool the computer into believeing that it is a SCSI CD-ROM writer. You do this by attaching a Linux kernel module called "ide-scsi" to your IDE CD-ROM wrtier and then by loading the ide-scsi module. There are two ways of attaching the ide-scsi module, by the lilo prompt or inside the /etc/lilo.conf file. We will assume your CD-ROM writer is at /dev/hdd. Here is a list that explains what /dev/hdd is.

  1. If your CD-ROM writer is the master drive on the primary controller, it uses /dev/hda.
  2. If your CD-ROM writer is the slave drive on the primary controller, it uses /dev/hdb.
  3. If your CD-ROM writer is the master drive on the secondary controller, it uses /dev/hdc.
  4. If your CD-ROM writer is the slave drive on the secondary controller, it uses /dev/hdd.
Now here are the two ways of attaching the ide-scsi module to your CD-ROM writer.
  1. At the lilo prompt when your Linux boots up, hit the tab key. This will give you a list of kernels you can use. For example, we will use the word "linux" to represent a kernel on our system. If your kernel is called "linux" also, then type in
    linux hdd=ide-scsi
    and the CD-ROM writer located at /dev/hdd will become a scsi CD-ROM writer located at /dev/scd0.
  2. If you want to use lilo to configure your CD-ROM writer, you need to put the following line in /etc/lilo.conf file:
    and a sample file is here
    and then after you are done editing this file, type the command "lilo" to install lilo. Then reboot.

In order to load the ide-scsi module, type "insmod ide-scsi" at the prompt. You can also put this command at the bottom of /etc/rc.d/rc.local (for RedHat people) to have it load at boot time.

Remember! After you can properly configured the IDE CD-ROM writer, your CD-ROM writer will be located at "/dev/scd0". If you want to keep it this way, do this:

rm -f /dev/CD-ROM
ln -s /dev/scd0 /dev/CD-ROM
Certain programs expect your CD-ROM to be at /dev/CD-ROM, and thus, this links (or creates an alias) your CD-ROM to /dev/CD-ROM.

Cdrecord and Xcdroast

There are two programs to make CD-ROMs in Linux. The first is cdrecord and the second is a GUI program called Xcdroast. We will limit ourselves to the program cdrecord. However, here is a link for Xcdroast if you want further information. One note about Xcdroast, you will need a spare primary partition (about 1 gig) to normally use Xcdroast.

After you have attached your CD-ROM writer to the ide-scsi module and you have loaded the ide-scsi module, you want to see if your CD-ROM writer is recognized by cdrecord. The command cdrecord has a special option that will attempt to recognize your device. To recognize the device, the format of the command is: # cdrecord -scanbus.

If you have not installed the IDE CD-ROM writer properly, you will probably get this response:

# cdrecord -scanbus
cdrecord: No such file or directory. Cannot open SCSI driver.
If you properly installed your IDE CD-ROM writer, issuing the command "cdrecord -scanbus" should produce something like this:
# cdrecord -scanbus
Using libscg version 'schily-0.1'
         0,0,0    0) 'ATAPI  " 'CD-R/RW CRW6206A'  '1.2A' Removable CD-ROM
         0,1,0    1) *
         0,2,0    2) *
         0,3,0    3) *
         0,7,0    7) *
This basically means that the system recognized the Acer 6206A CD-RW as a SCSI device and is ready to record. There is something important to notice here: the triplet <0,0,0> which identifies the CD-R device. This triplet will be necessary for the proper use of cdrecord.

Download your favorite Linux distribution

At this step, we download a distribution. In order to write a CD, we need a CD-image, better known as an ISO-image. Getting a distribution's ISO-image is fairly easy if you have used Netscape or any ftp program.

The easiest way to search around for distributions is by browsing the Internet. You can use for that Netscape. You can go to a Linux metasite containing most of the distributions or you can go to the website of a specific distribution and download it either from there or from one of their mirrors. In our case, we went to Redhat's website but we preferred to download from one of the mirrors since they may be not as overloaded as Redhat's website. Our choice was ftp://sunsite.utk.edu and here is the image for RedHat 6.1 on an Intel platform. One note, for you Linux users, if you use Netscape to download an ISO image from an ftp site, press the "shift" key while you are pressing on the link for the ISO image, otherwise it will print the ISO image inside your browser and you will just see garbage.

If you want to use another program besides Netscape to download files from an ftp site, use "ncftp" or "gftp". Remember, if your ftp program doesn't automatically detect binary or ascii mode, tell it to choose "binary" mode. Typing in "bin" at the prompt of your ftp program usually takes care of this.

Here is a small list of ISO images. We didn't test the suse, caldera, or Slackware images. We are not sure if the Slackware images are the latest versions.

  1. ftp://sunsite.utk.edu/pub/linux/redhat/redhat/redhat-6.1/iso/6.1-i386.iso
  2. ftp://sunsite.utk.edu/pub/linux/Mandrake/iso/mandrake70.iso
  3. ftp://ftp.suse.com/pub/suse/i386/evaluation-6.3.iso
  4. ftp://ftp.caldera.com/pub/openlinux/2.3/iso-images/
  5. ftp://ftp.CD-ROM.com/pub/linux/slackware/iso/

We like ftp://sunsite.utk.edu/pub/linux/redhat/redhat/redhat-6.1/iso because downloads are sometimes very fast. At 7am ET, we can achieve on average 380 KB/sec, which means that the download of almost 650 MB can be done in about 1/2 hour. We like it also for another reason: once you get into pub/Linux directory, you will notice there other Linux distributions: Mandarke and Debian.

We downloaded the file 6.1-i386.iso in the folder /tmp

Now, that we have the CD-R setup and the file downloaded, we can proceed with writing the CD.

Write the CD-ROM

You can use Xcdroast to install the image, but we will use cdrecord for this example.

We put a blank CD-ROM writer in the CD-ROM writer drive, navigated with cd to /tmp directory, and issued the cdrecord command:

cd /tmp
cdrecord -v speed=2 dev=0,0,0 6.1-i386.iso
We now explain what the command means. First, cdrecord is the command itself. Second, -v is the option for verbose operation: this means that we will receive message from the kernel as the command executes. Third, speed=2 indicates the speed with which the recorder writes. Naturally, you should not use a speed higher than that of your own recorder. Our Acer has speed rating of 2x2x6 which means that our maximum write speed is 2. Fourth, you must designate in the command explicitly the CD-R device. We used dev=0,0,0. This is the "triplet" that we wrote about earlier. You use the output from your "cdrecord -scanbus" command to get this information. Finally, 6.1-i386.iso is the ISO image file that is to be written on the CD.

Conclusions and future articles

One note, professionals tend to use SCSI CD-ROM writers. SCSI systems are much better than standard IDE systems.

In order to use some advanced CD-ROM writing capabilities, like re-writing and multi-session writing, you will need to use cdrecord and NOT Xcdroast (unless Xcdroast has changed in the meantime).

This article was really just a simple article to pave the way for the next few articles we are going to do. For our future articles, we will talk about how to make a bootable CD-ROM (instead of booting off of the hard drive or floppy drive), how to make a live filesystem on a bootable CD-ROM (some Linux distributions have examples), and how to make diskless Linux workstations.

Dr. Krassimir Petrov recently graduated from OSU. Mark Nielsen works for The Computer Underground as a clerk and as a book binder at ZING. In his spare time, he does volunteer stuff, like writing articles for The Linux Gazette and developing ZING's website.

Copyright © 2000, Mark Nielsen and Krassimir Petrov
Published in Issue 50 of Linux Gazette, February 2000

[ Table of Contents ] [ Front Page ] [ Prev ] [ Linux Gazette FAQ ] [ Next ]