|
-Mrinal Kalakrishnan
Have
you ever booted into Windows from Linux just to write a CD because you didn’t
know how to do that in Linux? You no longer need to do that. This article
will walk you through CD writing under Linux.
If you own a SCSI CD-Writer,
you don’t need to recompile the kernel, and you can skip this section. If
you have an IDE/ATAPI CD-writer (which is most probable), you’ll have to
make it appear like a SCSI device to the CD-writing applications. The Linux
kernel has a "SCSI host adapter emulation" module, which does
this. But if you don’t want to mess around with kernel configuration, you’re
in luck. PC Quest has provided a kernel RPM in this month’s CD,
which has the IDE-SCSI module (which is used for SCSI emulation) in it, so
all you have to do is install the RPM.
Before you begin, please note
that you have to be root before you can perform any of these tasks. It’s
still a good idea to work as a user though, and then use the command "su"
to become root.
Mount the CD (mount /mnt/cdrom)
and then install the RPM with the command:
# rpm -ivh —force /pcq/goodies/kernel/kernel-2.2.14-12-cdwriting.i686.rpm
Now, you have to run LILO to
update the boot record. You can do that by typing "lilo –v".
Note carefully if there were any errors, then just reboot, and you’ll be
running off the new kernel with the IDE-SCSI module. The module is not in
memory by default. To load the module, type "modprobe ide-scsi".
If you have two CD-ROM drives, the first one will become /dev/scd0, and the
second one /dev/scd1. To get back the normal IDE behavior (/dev/hd?), remove
the ide-scsi module with the command "rmmod ide-scsi", and
load the IDE-CD module with "modprobe ide-cd". By default,
if you mount a CD with "mount/mnt/cdrom", it will autoload
the IDE-CD module. So, in order to use the SCSI emulation, you’ll have to
remove the IDE-CD module first and then load the IDE-SCSI module with "rmmod
ide-cd; modprobe ide-scsi".
If you want the normal IDE
behavior for your CD-ROM drive and SCSI emulation only for your CD-Writer,
then add the following line in /etc/conf.modules:
options
ide-cd ignore=hdd
This makes the IDE-CD module
ignore your CD-writer (assuming that it is /dev/hdd). Load the IDE-CD module
first, followed by the IDE-SCSI module. You can also load the modules at
boot time by adding the following two commands in /etc/rc.d/rc.sysinit:
action
"Loading ide-cd module" modprobe ide-cd
action
"Loading ide-scsi module" modprobe ide-scsi
The program you’ll use to
write CDs is called cdrecord, a command-line program. To test if the kernel
module is working fine, and if cdrecord can actually find your CD-Writer,
type "cdrecord-scanbus". You should get an output that
contains the name of your CD-writer, something like this:
Cdrecord
release 1.8a29 Copyright (C) 1995-1999 Jörg Schilling
Using
libscg version "schily-0.1"
scsibus0:
0,0,0 0)
‘PHILIPS ‘ ‘CDD3610 CD-R/RW ‘ ‘3.01’ 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) *
Make a note of the three
numbers next to the name of the CD-Writer (in this case - 0,0,0). These are
the SCSI host, id and lun. You have to give these as parameters to cdrecord
while writing the CD.
Interacting wit
|