View previous topic :: View next topic |
Author |
Message |
peaceful Apprentice
Joined: 06 Jun 2003 Posts: 287 Location: Utah
|
Posted: Fri Jul 18, 2003 5:14 pm Post subject: CD burning for dummies (SCSI Emulation - Standard Method) |
|
|
MOD EDIT: Changed Title as was generating some confusion
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).
THE UNDERLYING PROBLEM
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.
PREREQUISITES/SETUP
- 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.
GETTING IT WORKING
1. 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)
2. 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):
Code: | 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 |
3. 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).
4. 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:
Code: |
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
|
5. 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.
6. 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
7. Make sure that your boot partition is mounted, then cp /usr/src/linux/arch/i386/boot/bzImage /boot/(pick a name for your kernel)
8. edit /boot/grub/grub.conf (or whatever boot loader you use) to reflect the changes. (you remembered the kernel options from part 2a, right?)
9. reboot
10. Go repeat steps 1, 2 and 3 until the CD writer shows up.
11. 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.
12. 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 Wed Nov 05, 2003 3:17 am; edited 2 times in total |
|
Back to top |
|
|
GentooBox Veteran
Joined: 22 Jun 2003 Posts: 1168 Location: Denmark
|
Posted: Fri Jul 18, 2003 8:31 pm Post subject: |
|
|
Thanks, nice to have. _________________ Encrypt, lock up everything and duct tape the rest |
|
Back to top |
|
|
Anime_Fan Guru
Joined: 01 Jul 2003 Posts: 366 Location: Linköping, Sweden
|
Posted: Fri Jul 18, 2003 8:38 pm Post subject: |
|
|
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? |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Jul 18, 2003 10:26 pm Post subject: |
|
|
Anime_Fan wrote: | Also, shouldn't this go into documentation/tips&tricks? |
Indeed it should as it looks nice and simple.
Moving to Docs, Tips & Tricks. Cheers. Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
choco n00b
Joined: 10 Jun 2003 Posts: 49 Location: Jackson, MI
|
Posted: Sat Jul 19, 2003 12:58 am Post subject: |
|
|
It's a good guide, for the information that's there, and I followed it to the letter.
But it was only after looking at the x86 Installation doc (which this guide points to) that I found out I had to add a boot parameter:
hd? = ide-scsi
Worked great after that. Thanks. _________________ Who would win in a fight between Sandman and Clayface? |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Sat Jul 19, 2003 1:00 am Post subject: |
|
|
choco wrote: | It's a good guide, for the information that's there, and I followed it to the letter.
But it was only after looking at the x86 Installation doc (which this guide points to) that I found out I had to add a boot parameter:
hd? = ide-scsi
Worked great after that. Thanks. |
Your not using ATAPI burning at all if you added that. Your using SCSI-emulation, which is fine, but not what this thead is about....
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
bsolar Bodhisattva
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Wed Jul 30, 2003 4:36 pm Post subject: |
|
|
puggy wrote: | Your not using ATAPI burning at all if you added that. Your using SCSI-emulation, which is fine, but not what this thead is about.... |
Actually the thread is not about ATAPI burning but about using an IDE writer with SCSI emulation.
IMHO the tiltle should be modified I think it's misleading now. _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
|
Back to top |
|
|
vibidoo Guru
Joined: 27 Nov 2002 Posts: 409
|
Posted: Fri Aug 15, 2003 7:49 am Post subject: |
|
|
Dear ALL
I had following this how to and applied in the kernel the right module according to this How-to .
But when I check the CDR W
Code: |
#cdrecord --scanbus
cdrecord: No such file or directory, Cannot open 'dev/pg*'' . Cannot open SCSI driver
|
I had modify my devfsd.conf too !!! |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Aug 15, 2003 10:22 am Post subject: |
|
|
vibidoo wrote: | Dear ALL
I had following this how to and applied in the kernel the right module according to this How-to .
But when I check the CDR W
Code: |
#cdrecord --scanbus
cdrecord: No such file or directory, Cannot open 'dev/pg*'' . Cannot open SCSI driver
|
I had modify my devfsd.conf too !!! |
Editing your devfsd.conf should not be necesary. Have you got hdaX=ide-scsi in your boot line in grub/lilo? Where X is the cd writer device, e.g. hda2.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
vibidoo Guru
Joined: 27 Nov 2002 Posts: 409
|
Posted: Fri Aug 15, 2003 10:41 am Post subject: |
|
|
Thanks
it's works
|
|
Back to top |
|
|
NorthGoingZax Apprentice
Joined: 03 Dec 2002 Posts: 189
|
Posted: Fri Aug 15, 2003 10:16 pm Post subject: |
|
|
Puggy Quote: |
Editing your devfsd.conf should not be necesary. Have you got hdaX=ide-scsi in your boot line in grub/lilo? Where X is the cd writer device, e.g. hda2.
Puggy |
can you give an example of the syntax for lilo ? Where do I put that line ? |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Fri Aug 15, 2003 10:28 pm Post subject: |
|
|
NorthGoingZax wrote: | Puggy Quote: |
Editing your devfsd.conf should not be necesary. Have you got hdaX=ide-scsi in your boot line in grub/lilo? Where X is the cd writer device, e.g. hda2.
Puggy |
can you give an example of the syntax for lilo ? Where do I put that line ? |
You need to add an append line. My config looked like this (I've moved to grub now).
Code: | # Linux bootable partition config begins
image = /boot/bzImage
append= "hda=ide-scsi"
root = /dev/hdi3
label = Gentoo
read-only # read-only for checking |
For completeness in grub
Code: | title Gentoo 2.6
root (hd0,0)
kernel (hd0,0)/bzImage root=/dev/hdi3 hda=ide-scsi |
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
peaceful Apprentice
Joined: 06 Jun 2003 Posts: 287 Location: Utah
|
Posted: Wed Nov 05, 2003 3:19 am Post subject: Added kernel option stuff |
|
|
Thanks puggy and all for the kernel option stuff. Weird enough, the first computer I figured all this stuff out on worked fine without the kernel options.
However, the second computer I did this on wouldn't work until I added them. Odd, eh?
Anyway, I added the kernel option stuff as step 2a. |
|
Back to top |
|
|
SubAtomic Apprentice
Joined: 20 Dec 2003 Posts: 255 Location: Hobart, TAS, Australia
|
Posted: Wed Dec 24, 2003 11:58 am Post subject: Re: CD burning for dummies (SCSI Emulation - Standard Method |
|
|
Always had hdd=ide-scsi on my kernel line for my gentoo o/s in grub.conf and could never figure out why burning never worked (cdrdao doesnt support atapi blah blah blah) .... then I came across this little gem of a piece of info from peaceful
peaceful wrote: |
11. 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.
Happy Burning! |
Thank you so very much. |
|
Back to top |
|
|
peaceful Apprentice
Joined: 06 Jun 2003 Posts: 287 Location: Utah
|
Posted: Fri Dec 26, 2003 2:10 am Post subject: Re: CD burning for dummies (SCSI Emulation - Standard Method |
|
|
SubAtomic wrote: | Always had hdd=ide-scsi on my kernel line for my gentoo o/s in grub.conf and could never figure out why burning never worked (cdrdao doesnt support atapi blah blah blah) .... then I came across this little gem of a piece of info from peaceful
...
Thank you so very much. |
You're welcome!
It's always nice to get things working. |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Feb 06, 2004 8:40 pm Post subject: |
|
|
Thanks for the tutorial. I have been trying to get Nautilus cd-burner to work for months. I followed your directions and finally have my cdrw as an option in the cd-burner drop down menu. Hooray.
Unfortunately, I don't seem to have the permissions set correctly on something - presumably /dev/sg0. Am I right about the problem? If so, to what should I set the permissions? Should I give permission only to the cdrom group?
Here's the error message:
Code: | cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver.
scsibus: 0 target: 0 lun: 0
scsidev: '0,0,0'
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot do mlockall(2). |
|
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Feb 06, 2004 9:36 pm Post subject: |
|
|
Oops should have done a better search. I needed to change the name of the cdrom group listed in my /etc/devfsd.conf |
|
Back to top |
|
|
bonedaddyhimself Tux's lil' helper
Joined: 24 Jan 2004 Posts: 101
|
Posted: Mon Mar 01, 2004 2:52 am Post subject: |
|
|
I read the scsi emulation guide but still no go. I can execute cdrecord -- scanbus and my burner shows up on scsibus 1. I added hdc = ide-scsi to grub (which is my cd burner, i checked). I also added ide-scsi to /etc/modules.autoload. I creeated this file because I only had /etc/modules.autoload.d and still no go. My kernel options seem to be correct because scanbus works.
But when I load k3b it still prompts me to enable scsi for my burner.
I changed my fstab so that sr0 is used instead of hdc.
Note: I do have a scsi cd-rom which is sr0 so I added sr1 to fstab as well.
What am I missing?
bd |
|
Back to top |
|
|
blazer34i n00b
Joined: 18 Nov 2003 Posts: 4
|
Posted: Thu Mar 04, 2004 5:01 am Post subject: |
|
|
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... Also be sure to mount /boot and rerun /sbin/lilo after modifying the lilo.conf, and reboot... 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 |
|
Back to top |
|
|
Bastux Guru
Joined: 15 Dec 2002 Posts: 369 Location: France - Paris
|
Posted: Fri Mar 05, 2004 8:44 am Post subject: |
|
|
Just to say :
If you tried the 2.6 and burning is not working anymore, juste recompile cdrtools with the last version :
Code: |
ACCEPT_KEYWORDS="~x86" emerge cdrtools
|
|
|
Back to top |
|
|
blight01 n00b
Joined: 26 Sep 2003 Posts: 24 Location: Belgium
|
Posted: Wed Mar 10, 2004 8:59 pm Post subject: |
|
|
Hello,
I would like to add something new to this useful posts...I encountered some problems during compiling my kernel with gcc version gcc (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) running on my gentoo, version 2.4.20-gentoo-r6.
A error appeared at line 440 of the /usr/src/linux-2.4.20-gentoo-r6/drivers/ide/ide-cd.h file:
__u8 short slot_tabelen
In fact, this slot_tabelen can be found at another place, in the /usr/src/linux-2.4.20-gentoo-r6//include/linux/cdrom.h file but this is defined differently:
__u16 slot_tablelen
You can either modified the first file either the second in order to have the same definition in both files. Once the same definition in both files, the compilation should work.
(link: http://lists.debian.org/debian-hppa/2003/debian-hppa-200301/msg00035.html/ )
@+,
Blight. |
|
Back to top |
|
|
KenTI n00b
Joined: 28 Jan 2004 Posts: 53 Location: Italy
|
Posted: Fri Mar 19, 2004 8:43 pm Post subject: |
|
|
really useful
just one thing, is there a way to burn .nrg image files or .ccd files? |
|
Back to top |
|
|
erickfq n00b
Joined: 07 Jun 2004 Posts: 2
|
Posted: Wed Jun 16, 2004 12:16 am Post subject: cdrecord |
|
|
I see here that the last cdrtools have atapi suport and i downloaded and probe it, with xcdroast,
and all works fine, i can burn without scsi emulation, so try it
|
|
Back to top |
|
|
|