# Problem with setting up my cd writer!

## superuser

Hello!

I've read a guide that told me how to set up a single cd rom writer in gentoo. This is all fine. But since I own a different system from that one described there I don't know what changes are required for me.

I have a DVD drive on hdb and the cd writer on hdc. cdrecord dev=ATAPI --scanbus says (I don't have yet the SCSI stuff enabled, though I think it may be neccessary.)

```
Cdrecord-Clone 2.01a25 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling

scsidev: 'ATAPI'

devname: 'ATAPI'

scsibus: -2 target: -2 lun: -2

Warning: Using ATA Packet interface.

Warning: The related libscg interface code is in pre alpha.

Warning: There may be fatal problems.

Using libscg version 'schily-0.8'.

scsibus0:

        0,0,0     0) *

        0,1,0     1) 'LITEON  ' 'DVD-ROM LTD122  ' 'IL4L' 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) *

scsibus1:

        1,0,0   100) 'IDE-CD  ' 'R/RW 4x4x32     ' '1.4B' Removable CD-ROM

        1,1,0   101) *

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) * 
```

Would be great if someone could tell me what things have to be done to burn my first cd on linux (probably via SCSI emulation).

Thanks in advance

Moritz

----------

## NeddySeagoon

superuser,

It depends on your kerenl version. Under 2.4 you must use SCSI emulation. Under 2.6 both ATAPI and SCSI Emulation work.

Do 

```
uname -a 
```

 and post your kernel version

----------

## discowombat

well, i've never actually burned from the command line before, but K3b, the kde app that is a front end to cdrecord gives me the following line in its debugging output:

```

/usr/bin/cdrecord -v gracetime=2 dev=/dev/ide/host0/bus1/target0/lun0/cd speed=16 -dao driveropts=burnfree -data /home/jonny/distccKNOPPIX-0.0.8.iso 

```

You could probably play with this line a little to figure out how to make it work on your system.

My cd-roms sit on a different scsibus location than yours:

```

scsibus0:

        0,0,0     0) 'TOSHIBA ' 'DVD-ROM SD-R5002' '1S32' Removable CD-ROM

        0,1,0     1) 'SAMSUNG ' 'CD-ROM SC-140C  ' 'A101' Removable CD-ROM

```

but if you go to /dev/ide/ and start looking around for "cd" you can probably find the path to your cd-rom as in my cdrecord command.

And of course, change speed=16 to whatever your drive/media can handle.

Oh, and I've got nothing scsi enabled in my kernel (2.6.5).

----------

## superuser

I have the Gentoo kernel sources.

```
Linux augustus 2.4.22-gentoo-r7 #9 Fri Apr 16 13:47:37 CEST 2004 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux
```

I think burning from the command line via sudo cdrecord --dummy dev=ATAPI:1,0,0 speed=4 image.iso works, but it's probably not the best solution, is it? However, sudo cdrecord dev=ATAPI:1,0,0 eject won't work?! 

```
Device seems to be: Generic mmc CD-RW.

Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).

Driver flags   : MMC SWABAUDIO

Supported modes: TAO PACKET RAW/R16

cdrecord: No such file or directory. Cannot open 'eject'.
```

And, I prefer using Gnome instead of KDE. Any good programms for this one?

Anyway, thanks for the help, so far  :Smile: 

Moritz

----------

## NeddySeagoon

superuser,

You need SCSI Emulation, ATAPI writing is patchy in 2.4 kernels.

Edit /boot/grub/grub.conf to add hdX=ide-scsi to your kernel command line where X is the letter for your CD. I have two CDs so I have  *Quote:*   

> kernel (hd0,0)/boot/linux-2.6.3 root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi

 .

From your next reboot your CD will either be a SCSI device or will not work at all.

Now configure and make the following modules for your kernel:-

Under

```
ATA/IDE/MFM/Rll support

 -> IDE, ATA and ATAPI Block devices
```

Choose SCSI emulation support as a module

Under SCSI support

Choose SCSI Support as a module,

Choose SCSI disk support as a module

Choose SCSI CD-ROM support as a module

Choose SCSI generic support as a module

Set Probe al LUNs on eacg SCSI device to N

If the above are already configured and built (even included in the kernel) you are OK. If not, do

```
make modules 

make modules_install. 
```

Add *Quote:*   

> ide-scsi

  to your /etc/modules.autoload

Now reboot.

At the end of dmesg, you should see your fake SCSI device detected. Your /etc/fstab will be wrong if you have used /dev/hdX to point to the cd. If you used /dev/cdrom, devfsd will have fixed the symlink so it still works.

Now emerge xcdroast and burn a CD.

----------

## superuser

Thanks for this rather extensive introduction. Question: Will my dvd rom IDE device as hdb affect these steps? Since I'm using LILO, would append= "hdc=ide-scsi" be the equivalent to hdc=ide-scsi under GRUB?

 *Quote:*   

> Set Probe al LUNs on eacg SCSI device to N 

  I can't do anything with it. Could you please describe it in detail? I'm quite new to cd rom support under linux and never ever heared of LUNs. Thanks.

Moritz   :Very Happy: 

----------

## NeddySeagoon

superuser,

Your append is correct - don't forget to mount /boot and rerun lilo.

Its OK to have an IDE and a fake SCSI device on the same system at the same time.

Your append hdc=ide-scsi stops the kernel IDE subsystem from attaching /dev/hdc and managing your writer so the SCSI subsystem can get it later.

Each real SCSI device has a Logical Unit Number. Devices like SCSI CD Jukeboxes have several, one for each CD they can hold. When you attach an ATAPI device as SCSI, it knows nothing of LUNs. In the SCSI section of the kernel config there is an Option called  *Quote:*   

> Probe all LUNs on each SCSI device

  The options are Y or N. If you set it to no, the SCSI drivers, will only ask your ATAPI writer for its LUN once. If you set it to Y it will be asked 7 times. As it not really a SCSI device, it will respond every time, but only the first respose is valid. It saves you confusion later.

----------

## superuser

I followd your instruction but left out scsi disk support. If I understand the "what's going on" in the correct manner, it works just as well   :Very Happy: 

```
Apr 17 17:25:54 augustus Kernel command line: BOOT_IMAGE=gentoo ro root=304 hdc=ide-scsi

Apr 17 17:25:54 augustus ide_setup: hdc=ide-scsi

(...)

Apr 17 17:25:54 augustus SCSI subsystem driver Revision: 1.00

Apr 17 17:25:54 augustus hdc: attached ide-scsi driver.

Apr 17 17:25:54 augustus scsi0 : SCSI host adapter emulation for IDE ATAPI devices

Apr 17 17:25:54 augustus Vendor: IDE-CD    Model: R/RW 4x4x32       Rev: 1.4B

Apr 17 17:25:54 augustus Type:   CD-ROM                             ANSI SCSI revision: 02

```

And scsibus0: 

```
0,0,0     0) 'IDE-CD  ' 'R/RW 4x4x32     ' '1.4B' Removable CD-ROM

        0,1,0     1) *

        0,2,0     2) *

.

.

.
```

I'll now emerge xcdroast as everything appears to be correct   :Mr. Green:   :Wink: 

----------

## NeddySeagoon

superuser,

That looks good. I think you are OK without SCSI disk support. I have it mainly for a USB memory stick.

----------

## superuser

Yeah! It works!  :Smile:  Thanks a lot! 

Xcdroast warns me to select IDE-SCSI for my dvd reader for quicker access to it. Is there any noticable effect if I'll do so?

----------

## NeddySeagoon

superuser,

I don't know what read speed differences are in xcdroast between ide-scsi and ide. Under the 2.4 kernel, ATAPI *writing* is either slow or broken so it may just be a genral heath warning from xcdroast.

If you want to put it to the test, its end edit to your lilo.cinfig, rerun lilo and reboot. I'm on 2.6.5 so I can't test it.

If you do go into lilo.conf again, you may as well create a new block so you can choose between one drive ide-scsi and both drives ide-scsi at boot time.

----------

## Bigun

*bookmarked*

----------

## superuser

Hey, thanks! I was even able to read the contents of the cd burned at my gentoo computer with some foulish windows system at my favourite library in town! Some information on the ATAPI problem with xcdroast: It'll check whether or not you have inserted a disc at startup. If you haven't and the device that gets checked is not on SCSI mode, it'll take some time (the word lame is even a flattery here). In all other cases it's fairly quick.

Do you know any good GUI cd burn applications for gnome (xcdroast doesn't support the creation of drag'n drop data cds, does it?).

Please forgive my long answering time (it's usually not my style, but work was calling).

su

----------

## NeddySeagoon

superuser,

It sound like what you want is the packet writing patch. This is the equivelnet to DirectCD on windows. This gives you drag and drop access to UDF formatted CD RWs. It will not do CD R yet.

This page tells you all about it http://packet-cd.sourceforge.net/index.php3 but do get the latest  patch for your kernel.

There is a mailing list here packet-writing@suse.com

----------

## superuser

Ahm...I was a bit vague in my last post. I think a tool to create an ISO image would be sufficient, since I'd be able to burn it with Xcdroast afterwards. mkisofs foldername did it as well, but this is not very comfortable for the daily usage.

----------

## NeddySeagoon

superuser,

Xcdroast lets you build and iso image by dragging and dropping files and folders from the right hand window to the left hand window, well almost.

You don't actually need to create the iso image on disk, since it will make the image 'on the fly'. 

Click the 'Master Tracks' button.

----------

## superuser

Super   :Very Happy:   :Exclamation:   Thanks a million!

Does one need a cd?  :Smile: 

----------

## NeddySeagoon

superuser,

The CD is only required for the burn. Xcdroast is just a pretty front end for makeisofs and the command line burning tool, whos name I forget.

----------

## superuser

 *NeddySeagoon wrote:*   

> The CD is only required for the burn.

  Maybe you misunderstood me here. I wanted to offer a self-burned CD to tell the World (not "hello" but) "Yeah! I _can_ burn CDs!"  :Wink: .

 *NeddySeagoon wrote:*   

> the command line burning tool, whos name I forget.

  May I help your commemoration? It's cdrecord. Usage: 

```
cdrecord -v speed=12 dev=0,0,0 -data Image_File
```

----------

## NeddySeagoon

superuser,

Do you mean a bootable CD, like the Gentoo install CD?

Xcdroast can burn CDs like that but you have to make the boot image seperately.

----------

## superuser

NeddySeagoon,

Again, thanks so far. Yeah, I know I can burn a bootable CD with Xcdroat by clicking 'Master Tracks', 'Boot options' and selecting 'el Torito (Standard PC)'. 

I didn't know that it's something like an office suite for cds when I asked about the iso image. I thought it would follow Linux' grass-root philosophy: One tool for one task, but, in fact, and which I think is better in this case, it provides all the facilites I need to create data CD-Rs, audio CD-Rs and even to duplicate cds. It's got a nice interface as well. Though CD-RW support is missing I tend to call it the 'all in one' solution. It's Linux' answer to Nero or WinOnCD, and some might even find it a counterpart to those.

su

----------

## NeddySeagoon

superuser,

Xcdroast will do anything you want with CD-R and CD-RW as long as its iso related. It does audio as well although thats not really iso.

If you appy the packet writing kernel patch, you dont need Xcdroast to write CD-RWs. They become just like any other drive.

----------

## superuser

Got the idea   :Very Happy: 

Once more: Thanks  :Smile: 

su

----------

