CD burning for dummies (SCSI Emulation - Standard Method)
After it took me a day and reading 4 separate posts on cd burning, I finally
got my ATAPI CD Writer working nicely by using scsi emulation. I thought I
would post the steps I took to help out other CD burning dummies (like me).
cdrecord (and I presume other cdr tools for linux) want to use SCSI
drivers. Why? I don't know. Most of us probably have ATAPI CD Writers, so we
need to be able to emulate a SCSI CD Writer with our ATAPI CD
Writer. Forunately, the kernel has modules that can do this for
us. Unfortunately, the kernel isn't set up properly by default.
-
I used cdrecord to test and see if my CD writer could be detected. (emerge
cdrtools)
-
I am running on i686 compatible architecture with the
gentoo-sources-2.4.20-r5 kernel. EDIT: If you are using a 2.6.x kernel or
newer, there is probably a better way than scsi emulation.
-
I have an ATAPI CD writer whose cables and jumpers are properly connected.
-
Check if cdrecord —scanbus shows your ATAPI CD writer. If it does, then
you are all set. Skip to the last step. (You might need to emerge
cdrtools to get cdrecord)
If your CD writer doesn't show up, do lsmod and see if both ide-scsi and
ide-cd show up.
EDIT: 2a. Also, make sure to add a kernel option hdX=ide-scsi for every CD
drive you want to use, where X is the letter of your drive. You can find out
what letter corresponds to your drives by examining the output of
dmesg | grep hd
Here's my kernel section (hdc is my writer and hdd is my reader):
title Gentoo Linux CD Burning
root (hd0,1)
kernel (hd0,1)/bzImage.cd_record ro root=/dev/hda5 vga=795 hdc=ide-scsi hdd=scsi-hdd
-
If the modules from part 2 do show up (or if you can modprobe them) and
you have booted with the kernel options from part 2a, but cdrecord
—scanbus still doesn't show your drives, use rmmod (module name) and
modprobe (module name) to get the ide-scsi module loaded below the ide-cd
module (below meaning it shows up below the other when doing lsmod).
If they don't show up and you can't modprobe the modules in, then you
need to recompile your kernel (see x86 installation guide if you don't
know how) using (at least) the following options:
ATA/IDE/MFM/RLL support -> IDE, ATA, and ATAPI Block Devices -> <M> SCSI Emulation Support
SCSI support -> <M> SCSI support
SCSI support -> <M> SCSI CDROM support
SCSI support -> <M> SCSI generic support
-
It is important that all these options are selected as modules, because
they probably won't be loaded in the right order by default regardless of
whether they are 'compiled in' or 'compiled as modules.' Compiling them
as modules makes it so you can have some level of control over how and
when they are loaded. With these all selected as modules, you should be
able to use most Linux CD recording tools that rely on SCSI drivers or
SCSI emulation drivers. In other words, now you will be able tell linux
to pretend that your ATAPI CD writer is a SCSI CD writer.
-
Recompile the kernel (see the x86 installation guide or somewhere else
for more info on kernel stuff): make dep && make clean bzImage modules
modules_install
-
Make sure that your boot partition is mounted, then cp
/usr/src/linux/arch/i386/boot/bzImage /boot/(pick a name for your kernel)
-
edit /boot/grub/grub.conf (or whatever boot loader you use) to reflect
the changes. (you remembered the kernel options from part 2a, right?)
-
reboot
-
Go repeat steps 1, 2 and 3 until the CD writer shows up.
-
To get it to work automatically on boot up, I added ide-scsi to
/etc/modules.autoload, which makes it appear below ide-cd automatically
on boot up.
-
Once it shows up, you can use cdrecord from the command line (you are on
your own there), or, if you like nice GUI programs I highly recommend
using k3b (emerge k3b), for KDE. It is very similar to CD Recording
programs that you would find on Windoze from companies with funny names
like Roxio or Nero.
Happy Burning!
Last edited by peaceful on Tue Nov 04, 2003
I had the same problems as everyone else it seems.. Here are some snippits
from my config files that finally made it work.. One note though be sure to
run k3bsetup as root to apply the correct permissions to the devices and
binaries… This worked for me when nothing else did, now I can burn CD's as
a "normal" user.
From /etc/lilo.conf
image = /boot/kernel-2.4.22-ac1
label = Gentoo
read-only
initrd=/boot/initrd-2.4.22-ac1
append="root=/dev/hde5 init=/linuxrc hda=scsi hdb=scsi"
## Where hda and hdb are my ATAPI CD devices(replace with yours), I happen to have a IDE Raid controller so my hard drives are actually hde and hdf
From /etc/modules.conf
### modules-update: start processing /etc/modules.d/cdr
options ide-cd ignore='hda hdb'
### Ignores ATAPI devices hda and hdb
### modules-update: end processing /etc/modules.d/cdr
From /etc/modules.autoload.d/kernel-2.4
probeall scsi_hostadapter ide-scsi ataraid
With kernel 2.6 coming, this info will become (eventually) obselete…
With only ATAPI CDROM compiled into the kernel, you just:
cdrecord dev="/dev/hda" -scanbus
Also, shouldn't this go into documentation/tips&tricks?