Get Firefox! Viewable with any browser! Valid HTML 4.01! Valid CSS! OpenOffice.org
Text size: 

CD Writing Howto

4) LOCATING YOUR (RE)WRITER

A SCSI target device is identified with 3 values.

  1. The adapter: Nothing's to stop you having more than one SCSI host adapter inside your box. Or you might have one physical SCSI adapter and an emulated adapter, or just an emulated adapter. In order to identify a device we have to know which adapter it's connected to.

  2. The device ID: More than one device can be attached to each host. We obviously need to know which one we're addressing.

  3. LUN: Some devices can have more than one target. An example of such a device is a CD jukebox.

Now let's take a close look at the output I get from "cdrecord -scanbus".

# cdrecord -scanbus
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jörg Schilling
Linux sg driver version: 3.1.20
Using libscg version 'schily-0.5'
scsibus0:
	0,0,0	  0) 'IDE-CD  ' 'R/RW 12x8x32    ' ' 3.0' 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) *
scsibus1:
	1,0,0	100) 'SanDisk ' 'ImageMate III   ' '2.31' Removable Disk
	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) *

To start with, 2 SCSI buses show up. The first one, scsibus0, is a result of the IDE-SCSI emulation at work. My Traxata 12x8x32 CD-RW gets listed on this bus. The other bus, scsibus1, shows up thanks to usb-storage, and my SanDisk CompactFlash USB card reader gets listed on it.

Since a card reader isn't much good for burning CDs, we'll be concentrating more on the ReWriter :) This is device "0,0,0" (as it says in the first column, directly under "scsibus0:"), meaning that it is on host (SCSI bus) 0, device ID 0, LUN 0.

The more lazy ones among us will be pleased to know that we can omit the adapter and supply just the device ID and the LUN if the device we're addressing is on scsibus0. Thus, the CD Rewriter can be referred to as 0,0 instead of 0,0,0 but the card reader (on scsibus1) still has to be referred to as 1,0,0.

If you're using version 2.0 or later of cdrecord without IDE-SCSI emulation then your CD writer won't have been found. You have to use a new variant of cdrecord's syntax which forces it to use the IDE buses in your machine:

# cdrecord dev=ATAPI -scanbus
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 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.7'
scsibus0:
	0,0,0	  0) 'IDE-CD  ' 'R/RW 12x8x32    ' ' 3.0' 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) *

In this case, the CD writer must be referred to as ATAPI:0,0,0

Despite the dire warnings of the code being pre-alpha and there maybe being fatal problems (in computer circles, fatal usually refers to the processes running on the computer, not to the user, yet...) I've never had a problem with cdrecord using the ATAPI interface.

Now that we've located the device, we can start assembling the data which is to be written to a blank CD.

 

<< 3) Linux kernel configuration 5) Preparing a data CD >>

Back to the howto title page
Back to howto-pages.org