293 lines
12 KiB
HTML
293 lines
12 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>Easy Addition of an IDE CD-Writer to a Linux/Redhat PC 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="eyler2.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/feenberg.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="ferrari.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">Easy Addition of an IDE CD-Writer to a Linux/Redhat PC</font></H1>
|
|
<H4>By <a href="mailto:feenberg@nber.org">Daniel Feenberg</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
The CD-Writing HOWTO at <a
|
|
href="http://www.guug.de/~winni/linux/">http://www.guug.de/~winni/linux/</a>and the official
|
|
cdrecord site at <a
|
|
href="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html">
|
|
www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html</a> offer
|
|
a great deal of information about installing and using CD-ROM writers. Certainly much
|
|
more than you need to know for an ordinary Linux installation. If you don't want to support
|
|
an obsolete drive, or an older kernel, or VAX VMS, then you probably don't need to recompile
|
|
the kernel or make any devices. This short document should be sufficient to get you started
|
|
burning disks. Once you are started, the official documents will guide you to such esoterica
|
|
as audio, bootable, multisession and hybrid disks.
|
|
|
|
After determining that RedHat 6.1 was so easy, I tried setting up several other distributions,
|
|
including RedHat 6.0, SUSE 6.1, Debian 2.1, and Storm 2000. All of those were slightly harder
|
|
because they didn't include a recent version of cdrecord but none required a kernel rebuild, I
|
|
have noted the differences along the way. You will need to have:
|
|
|
|
<p><UL>
|
|
|
|
<li>a supported IDE drive,
|
|
|
|
<li>a Linux kernel that supports loadable device drivers,
|
|
|
|
<li>use LILO to boot. (Default for most distributions).
|
|
|
|
<li>cdrecord 1.8 or better (included with RedHat 6.1).
|
|
|
|
</ul>
|
|
|
|
<p>I believe any drives you bought in a store recently will qualify. The
|
|
cdrecord docs say that all 1999 or later ATAPI drives support MMC, which
|
|
is sufficient. Many earlier drives are suppoted also. A look on the
|
|
shelves at the local computer superstore did not turn up any that
|
|
mentioned MMC or Linux on the box. My first installation used an older
|
|
Richoh MP6200A cd recorder. I did more installations with the MagicWriter
|
|
4X4X24. This is a very cheap drive, but the manual had a 1999 copyright
|
|
date and it did work as I expected.
|
|
|
|
<p><h3>Physical Installation</h3><p>
|
|
|
|
<p> Perform the physical installation of the new drive just as you would
|
|
any ide drive. It can replace your original read-only drive or be added
|
|
on. Make sure the drive jumper is set for master or slave as required, the
|
|
power cable is connected and the data cable has the correct orientation.
|
|
You shouldn't have to do any CMOS setup. I am told that keeping the
|
|
cd-writer on a different cable from the hard drive speeds data transfers,
|
|
but this is probably not significant with Pentium class machines.
|
|
|
|
<p>At this point stop to check if the BIOS mentions the drive during BIOS
|
|
initialization. Not all BIOS do that, but especially if it doesn't, you
|
|
might want to check the cables and the Master/slave jumpers on both the
|
|
CD-writer and any other drive on the same cable. The /var/log/messages
|
|
file should have a line about the new "ATAPI" drive.
|
|
|
|
<p><h3> SCSI Emulation Setup </h3>
|
|
|
|
<p><ol>
|
|
|
|
<li>Find out the name of physical CD-ROM device. This is probably /dev/hdc
|
|
(the master device on the second IDE cable) but could be /dev/hdb (slave
|
|
device on the primary IDE cable or /dev/hdd (slave device on the secondary
|
|
cable).
|
|
|
|
<p>
|
|
<li> Become root.
|
|
|
|
<p><li> Add the following line to the end of your /etc/rc.local:
|
|
|
|
<xmp>
|
|
insmod ide-scsi
|
|
</xmp>
|
|
|
|
<p>RedHat seemed to be the only distribution with an rc.local file. for
|
|
the others, you have to find some other mechanism for running this command
|
|
before burning disks and after each reboot.
|
|
|
|
<p><li> Add the following line to your /etc/lilo.conf file:
|
|
|
|
<xmp>
|
|
append="hdc=ide-scsi"
|
|
</xmp>
|
|
|
|
where "hdc" might be "hdb" or "hdd" depending on where your drive is installed. This line
|
|
should be inserted just after the image statement that boots Linux on your computer. This
|
|
instructs the kernel to access the cd-writer via the scsi emulation driver.
|
|
|
|
<p><li> Reconfigure LILO by running the following command at the Unix
|
|
shell prompt:
|
|
|
|
<xmp>
|
|
lilo
|
|
</xmp>
|
|
|
|
<li> You need to ``install'' cdrecord and mkisofs. Version 1.8.1 of
|
|
cdrecord is on the RedHat disk in an rpm file. Here are the commands for
|
|
the software installation with RedHat.
|
|
|
|
<xmp>
|
|
cd /cdrom/RedHat/RPMS
|
|
rpm --install cdrecord*
|
|
rpm --install mkisofs*
|
|
</xmp>
|
|
|
|
The other distributions either included an older version of cdrecord (1.6)
|
|
which did not support my recorders, or did not include cdrecord at all. If
|
|
don't have RedHat and need to compile these yourself, the most recent
|
|
version of cdrecord can easily be found at www.freshmeat.org. I noted that
|
|
the very extensive cdrecord instructions cover many operating systems, not
|
|
just Linux (or even Unix). For the distributions considered here, all you
|
|
need to do is:
|
|
|
|
<xmp>
|
|
tar -xvf cdrecord*tar
|
|
cd cdrecord-1.8
|
|
make
|
|
make install
|
|
</xmp>
|
|
|
|
The cdrecord tarball includes mkisofs. Both packages get installed to
|
|
/opt/shilly/bin so you will need to make links from a directory in the
|
|
root path, such as /usr/bin. A very nice feature of cdrecord is that it
|
|
auto-detects the drive characteristics at run time so there isn't any
|
|
configuration and you can replace or upgrade the drive without getting
|
|
into trouble.
|
|
|
|
<p><li>If you want to read with the recorder, you will need to add or
|
|
modify the appropriate line in /etc/fstab so that the drive is addressed
|
|
through the ide-scsi interface. The following worked for me, but the
|
|
device name may not be correct for all distributions (/dev/sg0 is an
|
|
alternative), and in any case <i>reading</i> is beyond the scope of this
|
|
document.
|
|
|
|
<xmp>
|
|
/dev/scd0 /cdrom auto defaults,ro,noauto,user,exec 0 0
|
|
</xmp>
|
|
|
|
|
|
|
|
<p><li> Reboot the machine. The installation is complete. My impression is
|
|
that if you did anything wrong, there won't be any error messages, so go
|
|
back and check the spelling of the changes listed above before proceeding
|
|
to actually testing your work.
|
|
|
|
<p><li> Now you get to check if the installation was successfull:
|
|
|
|
<xmp>
|
|
cdrecord -scanbus
|
|
</xmp>
|
|
|
|
One of the output lines should mention a Removable CD-ROM, and maybe even
|
|
indicate ``-R'' or ``RW'' to indicate that it is a recorder. Something
|
|
like this:
|
|
|
|
<xmp>
|
|
0,0,0 0) 'Richoh' 'MP602A' '2.03' Removeable CD-ROM Drive
|
|
</xmp>
|
|
|
|
Only the digit triple at the start is significant. It indicates
|
|
controller, SCSI ID, and LUN, and is likely to be all zeroes, as shown
|
|
with SCSI emulation. The only error message I saw in my experiments
|
|
combined the cases of (1) scsi emulation not correctly installed and (2)
|
|
drive not found or supported. At that point you might try getting reading
|
|
to work as an IDE drive in Windows, then in Linux as IDE, then in Linux
|
|
with SCSI emulation, before concluding that the drive was not supported or
|
|
broken. I often find this systematic approach to hardware debugging slow
|
|
but sure.
|
|
|
|
</ol>
|
|
<p>
|
|
<h3>Writing Disks</h3>
|
|
<ol>
|
|
|
|
<li>Writing disks is a two step process. First the ISO filesystem is
|
|
created on your hard disk:
|
|
|
|
<xmp>
|
|
mkisofs -v -o file.iso file...
|
|
</xmp>
|
|
|
|
where <i> file.iso </i> is your output file and <i>file...</i> is the list
|
|
of files and directories you want on the cd-rom. If you just list a single
|
|
directory, the structure is maintained on the CD. Otherwise all the files
|
|
and subdirectory files are dropped into the root directory with no
|
|
subdirectory structure. There are a lot of options described in the man
|
|
page. If you keep your filenames to 8.3 lower case, you won't need to be
|
|
bothered with most of them. The "-J" option (for Joliet) will allow longer
|
|
Windows style filenames, but if you actually use longer or case sensitive
|
|
names your file names will look funny or not work in a minimal ISO9660
|
|
system.
|
|
|
|
<p>
|
|
<li> Then you actually burn the cd-rom:
|
|
|
|
<xmp>
|
|
cdrecord -v dev=0,0,0 file.iso
|
|
</xmp>
|
|
|
|
<p>The ``dev=0,0,0'' specifies the output device, and might be possibly be
|
|
different on your system, check the cdrecord -scanbus output if in doubt.
|
|
Because cdrecord wants to lock pages in memory, it has to be run as root.
|
|
Making cdrecord setuserid root is endorsed by the Shilly's documentation.
|
|
|
|
<p>On my 1997 vintage 233mHz AMD with a 5400 rpm hard disk, and a quad
|
|
speed CD-ROM writer, the system had no trouble maintaining speed and the
|
|
512K buffer was never less than 97% full. After initial success you might
|
|
try combining the mkisofs and cdrecord steps:
|
|
|
|
<xmp>
|
|
mkisofs file... | cdrecord -v dev=0,0,0 -
|
|
</xmp>
|
|
|
|
where the hyphen indicates to cdrecord that it should take its input from
|
|
the standard input. This worked on my system, even when the files were NFS
|
|
mounted (on a 100BaseTX connection).
|
|
|
|
</OL>
|
|
|
|
<p>Any corrections or suggestions should be sent to me. I am particularly
|
|
interested in hearing which distributions will work with these minimal
|
|
instructions and any variations. I don't want to encroach on existing
|
|
documentation by covering enhanced capabilities - that is well handled
|
|
already by the existing documentation.
|
|
|
|
<P> This page is kept at <A HREF="http://www.nber.org/cdrecord.html">http://www.nber.org/cdrecord.html</A>
|
|
|
|
|
|
<BLOCKQUOTE><EM>
|
|
[There is <A HREF="stoddard.html">another article</A> about CD
|
|
recording in this issue. -Mike.]
|
|
</EM></BLOCKQUOTE>
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <!-- P -->
|
|
<H5 ALIGN=center>
|
|
|
|
Copyright © 2000, Daniel Feenberg<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="eyler2.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/feenberg.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="ferrari.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 ============================================================-->
|