274 lines
11 KiB
HTML
274 lines
11 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>CD-Writing with an ATAPI CDR Mini-HOWTO LG #57</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<CENTER>
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.jpg"
|
|
WIDTH="600" HEIGHT="124" border="0"></H1></A>
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="skjoldebrand.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue57/stoddard.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="tindale.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
|
<!-- *** END navbar *** -->
|
|
<P>
|
|
</CENTER>
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4 ALIGN="center">
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">CD-Writing with an ATAPI CDR Mini-HOWTO</font></H1>
|
|
<H4>By <a href="mailto:cstod@vvm.com">Chris Stoddard</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
<P> This document provides the least amount of information
|
|
needed to get an ATAPI CDR running under Linux.
|
|
|
|
<H2>Table of Contents</H2>
|
|
|
|
<UL TYPE="">
|
|
<LI> 1. Introduction
|
|
|
|
<LI> 2. Installing the Hardware
|
|
|
|
<LI> 3. Loading the Drivers
|
|
|
|
<LI> 4. Quick and Dirty Burn
|
|
|
|
<LI> 5. Final Note
|
|
</UL>
|
|
|
|
|
|
<H2>1. Introduction</H2>
|
|
|
|
<P> The documentation for getting a CDR up and running under
|
|
Linux is an excellent piece of work, however, if all you
|
|
want to do is burn a few MP3's the documentation can be
|
|
overwhelming. I'm going to attempt to boil installing
|
|
and configuring a CDR down to as few steps as necessary
|
|
to get the job done. I will be focusing only on ATAPI
|
|
drives as SCSI drives work well with out too many problems.
|
|
The information here was culled from 4 hours of trial and
|
|
error as well as the <A HREF="http://www.ssc.com/mirrors/LDP/HOWTO/CD-Writing-HOWTO.html">CD-Writing-HOWTO</A>.
|
|
|
|
|
|
<H2>2. Installing the Hardware</H2>
|
|
|
|
<P> The first thing to do, even before you buy the drive is
|
|
to check the hardware compatibility list. Things will go
|
|
easier for you if your drive is listed. If it is not,
|
|
don't despair, my Iomega ZIPCD is not on the list, but
|
|
still works fine. Any ATAPI CDR "should" work, should
|
|
being the key word here.
|
|
|
|
<P> I'm not going into much detail about installing the
|
|
hardware, if you don't know how to install your drive or
|
|
you don't understand what I'm talking about, please get
|
|
some one to help you. I have found I get the best results
|
|
by jumpering the drive to slave and connecting it to the
|
|
same IDE cable as your CDROM. Make sure your BIOS
|
|
recognizes the new drive and when the system boots make
|
|
sure it is recognized as an ATAPI drive, if it is not,
|
|
this will never work. After the system boots up, check
|
|
your kernel messages to see if the drive is properly
|
|
recognized by typing "dmesg | grep ATAPI" at the command
|
|
line, you should see something like this;
|
|
|
|
<PRE>
|
|
hdc: FX162N, ATAPI CDROM drive
|
|
hdd: ZIPCD 4x650, ATAPI CDROM drive
|
|
hdc: ATAPI 16X CD-ROM drive, 128kB Cache
|
|
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
|
|
</PRE>
|
|
|
|
<P> Make note of the device name Linux gives your drive,
|
|
my ZIPCD is recognized as hdd by the kernel, this becomes
|
|
important later.
|
|
|
|
|
|
<H2>3. Loading the drivers</H2>
|
|
|
|
<P> Before getting started, you must be able to log into the
|
|
system as root to preform these steps. Make sure cdrecord
|
|
and mkisofs are installed on the system, to do this type
|
|
"rpm -q cdrecord mkisofs", this will tell you if the
|
|
packages are installed or not, if they are not, you will
|
|
need to install them. Also make sure the ide-scsi module
|
|
is present, to verify this, type "ls -lR /lib | grep ide-scsi".
|
|
If the module is not present you will need to recompile
|
|
the kernel, which is beyond the scope of this document.
|
|
We now need to get the proper drivers installed and
|
|
loading at boot time. Open /etc/rc.d/rc.local and add
|
|
the following line, to the end of the file, then save
|
|
and exit the file.
|
|
|
|
<PRE>
|
|
/sbin/insmod ide-scsi
|
|
</PRE>
|
|
|
|
<P> Next we need to configure the drivers so they work
|
|
properly Open /etc/conf.modules and add the following
|
|
lines at the bottom;
|
|
|
|
<PRE>
|
|
alias scd0 srmod
|
|
alias scsi_hostadapter ide-scsi
|
|
options ide-cd ignore=hdd
|
|
</PRE>
|
|
|
|
<P> On the final line, notice I placed the device name of
|
|
my ZIPCD, replace hdd with the device name of your CDR.
|
|
Save the file and exit. To associate the driver with the
|
|
proper drive, open /etc/lilo.conf, add the following line,
|
|
right before or right after the "root=" line;
|
|
|
|
<PRE>
|
|
append="hdd=ide-scsi"
|
|
</PRE>
|
|
|
|
<P> Save the file and exit, rerun lilo by typing "/sbin/lilo"
|
|
at the command line. Now reboot the system. Once it has
|
|
come back up type "dmesg" at the command line, if all went
|
|
well the last few lines should look similar to this;
|
|
|
|
<PRE>
|
|
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
|
|
scsi : 1 host.
|
|
Vendor: IOMEGA Model: ZIPCD 4x650 Rev: 1.04
|
|
Type: CD-ROM ANSI SCSI revision: 02
|
|
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
|
|
sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
|
|
VFS: Disk change detected on device ide1(22,0)
|
|
</PRE>
|
|
|
|
<P> You should now be able to use cdrecord, to test this, type
|
|
"cdrecord -scanbus" at the command line, output should look
|
|
something like this;
|
|
|
|
<PRE>
|
|
Cdrecord release 1.8a29 Copyright (C) 1995-1999 Jorg Schilling
|
|
scsibus0:
|
|
0,0,0 0) 'IOMEGA ' 'ZIPCD 4x650 ' '1.04' Removable CD-ROM
|
|
0,1,0 1) *
|
|
0,2,0 2) *
|
|
0,3,0 3) *
|
|
0,4,0 4) *
|
|
0,5,0 5) *
|
|
0,6,0 6) *
|
|
0,7,0 7) *
|
|
</PRE>
|
|
|
|
<P> Please note the three numbers separated by commas to
|
|
the left of where your drive is listed. These numbers
|
|
will be used in cdrecord's command line. If you get an
|
|
error message, try going over the steps again and make
|
|
sure you have the correct device name for the CDR. Read
|
|
the CD-Writing-HOWTO, there are a
|
|
few tricks to try listed in this file. If it still does
|
|
not work it is possible your drive is incompatible.
|
|
|
|
|
|
<H2>4. Quick and dirty Burn</H2>
|
|
|
|
<P> To burn a CD you will need to log in as root, if you want
|
|
any user to be able to burn CD's type the following command,
|
|
"chmod +s /usr/bin/cdrecord". Burning a CD in Linux is a
|
|
two step process, first you must make the image, this is
|
|
done with mkisofs. The syntax for mkisofs is;
|
|
|
|
<PRE>
|
|
mkisofs -r -o image.img /folder/to/burn/
|
|
</PRE>
|
|
|
|
<P> Make a new directory and copy all the files you want to
|
|
burn into this directory. As an example I make a directory
|
|
in my home directory called mp3, I then copied about 600MB
|
|
worth of MP3's into the folder. To make my image I typed
|
|
the following;
|
|
|
|
<PRE>
|
|
mkisofs -r -o mp3_cd.img /home/chris/mp3/
|
|
</PRE>
|
|
|
|
<P> After a few moments I have a 600MB CD image named
|
|
mp3_cd.img. The second step is burning the image to the
|
|
CD. This is done with cdrecord To burn my image I type
|
|
the following;
|
|
|
|
<PRE>
|
|
cdrecord -v speed=4 dev=0,0,0 -data mp3_cd.img
|
|
</PRE>
|
|
|
|
<P> The speed option should be set to the highest speed
|
|
your drive will take, mine is a 4x burner, older drives
|
|
may only be 1x or 2x, newer drives can be up to 8x or even
|
|
12x. The dev option can be had from "cdrecord -scanbus",
|
|
which we ran earlier, my drive appeared next to 0,0,0 you
|
|
should use whatever your drive appears next to. Again
|
|
several minutes later I had a newly burned CD. For further
|
|
information on mkisofs and cdrecord and their many options,
|
|
please read the documentation.
|
|
|
|
|
|
<H2>5. Final Note</H2>
|
|
|
|
<P> To use the drive as a normal cdrom, you must keep in mind
|
|
the system now thinks your drive is a SCSI device, the device
|
|
name is no longer hdd, it is now scd0. Go into the /dev
|
|
directory and make a link, type "ln -s scd0 cdr", then go to
|
|
/mnt and type "mkdir cdr". Move to the /etc directory and
|
|
open fstab and add the following line right under the entry
|
|
for the cdrom;
|
|
|
|
<PRE>
|
|
/dev/cdr /mnt/cdr iso9660 noauto,owner,ro 0 0
|
|
</PRE>
|
|
|
|
<P> Now you can mount the drive the same way you mount the
|
|
cdrom, something like "mount -t iso9660 /dev/cdr /mnt/cdr".
|
|
|
|
<BLOCKQUOTE><EM>
|
|
[There is <A HREF="feenberg.html">another article</A> about CD
|
|
recording in this issue. -Mike.]
|
|
</EM></BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <!-- P -->
|
|
<H5 ALIGN=center>
|
|
|
|
Copyright © 2000, Chris Stoddard<BR>
|
|
Published in Issue 57 of <i>Linux Gazette</i>, September 2000</H5>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<!--startcut ==========================================================-->
|
|
<HR><P>
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="skjoldebrand.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue57/stoddard.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="tindale.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|