Skip Navigation
Site HomeSearch

On-Line Reference:
RedHat Linux Unleashed

Did this help?
... or
Donate at PayPal®...

 
Tux the Pengin

OK, here's a freebie: A simulation of the old text-based Star Trek game we used to play on HP 2100's using a Teletype ASR-33 as a console: StarTrek Game

Add A CDR To Your Linux Box

References:

Contents:

  1. Prerequisites
  2. Installation
  3. Enable the SCSI Emulator
  4. Install the SCSI Kernel Module
  5. CD Writing Software

Prerequisites

Your kernel must have SCSI emulation support, either built-in or as a module. I was using a PII/266 system, RedHat Linux 6.2, with kernel 2.2.14-5.0 and the ide-scsi module at the time of this writing.

Installation

I bought a CenDyne unit. There was no model number on the box. Inside, the sticker said it was a LITE-ON LTR-12101B.

I installed it in the same bus as the existing CD, re-jumpering the existing CD to slave and making the new CD-R/RW the bus master.When I re-booted the first time, I watched the boot messages for a sign that it was found; of course the messages scrolled by so fast, I missed it. I did a

tail -100 /var/log/dmesg

and saw that it was "hdc", and that my old drive had been re-detected as "hdd".

I rebooted a second time and when the lilo "boot:" prompt appeared, I immediately entered linux hdc=ide-scsi, and logged in as root to make the following preparations.

Enable the SCSI-emulator

I edited /etc/lilo.conf to add "append= 'hdc=ide-scsi'" at the end of the file:
{my lilo.conf:}

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
linear
default=linux
	
image=/boot/vmlinuz-2.2.14-5.0
    label=linux
    read-only
    root=/dev/hda5
		
append='hdc=ide-scsi'

Save the file and run lilo from the commandline to make the change permanent.

Enable the "ide-scsi" kernel module

I loaded the ide-scsi kernel module and then tested the "cdrecord" command's ability to see the drive:

insmod ide-scsi
cd record -scanbus

which resulted in:

Cdrecord 1.9 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jorg Schilling
Linux sg driver version: 2.1.36
Using libscg version 'schily-0.1'
scsibus0:
	0,0,0	  0) 'IOMEGA  ' 'ZIP 100         ' '24.D?ā?ĄĘ Removable Disk
	0,1,0	  1) 'LITE-ON ' 'LTR-12101B      ' 'LS38?ā?ĄĘ Removable CD-ROM
	0,2,0	  2) *
	0,3,0	  3) *
	0,4,0	  4) *
	0,5,0	  5) *
	0,6,0	  6) *
	0,7,0	  7) *

I added the following lines to the bottom of "/etc/rc.d/rc.local" to invoke the module at boot time:

# enable cd-r/rw drive to use in scsi-emulation mode
insmod ide-scsi

(confirm rc.local is executed at run level 5 by doing ls -l /etc/rc.d/rc5.d and seeing if there is a link to rc.local)

Now I created a new mount-point for the CD-R/RW drive, and adjusted the device links to reflect the changes in bus locations:

# mkdir /mnt/cdr
# rm -f /dev/cdrom
# ln -s /dev/hdd /dev/cdrom      <-- moves old CD drive
# ln -s /dev/hdc /dev/cdrom2     <-- links new CD-R drive

Now I added a new entry to my "/etc/fstab" file:

/dev/cdrom2  /mnt/cdr  auto noauto,owner,rw 0 0

... which permits mounting CDs normally for various purposes.

CD Writing Software:

Initially I chose to use X-CD-Roast which I downloaded from xcdroast.org along with their recommended version of cdrecord. For RedHat 6.2, there were four RPMs to be installed in this sequence:

cdrecord-cdda2wav-1.9-1.i386.rpm (128kb) 
cdrecord-mkisofs-1.9-1.i386.rpm (198kb)
cdrecord-1.9-1.i386.rpm (294kb)
xcdroast-0.98alpha8-1.i386.rpm (564kb) 

Using X-CD-Roast: Run the application and click the setup tab. Here are my settings:

Devices:
	just check that your CD-R appears in the list
CD Settings
	- change nothing -
HD Settings
	I added /tmp just for grins
Miscellaneous:
	- change nothing -
Options:
	- change nothing -
Users:
	added "rik", and checked "all in list"
	checked "none" under HOSTS

...and saved configuration.

Now I clicked the "Create CD" button and clicked "Master Tracks". I selected a large directory in the right window and clicked "Add" to move the selection into the left list. I selected the tabs above and pretty much used all the defaults for testing the first time. Finally, in the last tab on the right I clicked "Master and write on-the-fly" to write the CD. It worked.

Later, I poked around and acquired gtoaster from Gnometoaster.rulez.org - I like it a lot better for several reasons, not least of which it will do multisession archives.

Credits: Thanks to my gurus, Loran, who had done it all before and is SO patient with me, and Robin, who is not quite so patient but really wanted to see the $129 expense justified so she didn't have to return it!.

Print plain