Previous Section  < Day Day Up >  Next Section

Recipe 11.2. Finding the SCSI Address for CD and DVD Writers

11.2.1 Problem

You're using a 2.4 kernel and want to write a CD or DVD. You need to know the SCSI bus address, or dev= number, for your CD/DVD writer.

11.2.2 Solution

cdrecord -scanbus will find it for you. This is what a CD/DVD-ROM and a CD writer on a single system look like:

$ cdrecord -scanbus

Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jrg Schilling

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.5'


0,0,0 0) 'TOSHIBA ' 'DVD-ROM SD-M1202' '1020' Removable CD-ROM

0,1,0 1) 'LITE-ON ' 'LTR-24102B ' '5S54' 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) *

DVD writers look like this:

1,2,0 2) 'PIONEER ' 'DVD-ROM DVD-303 ' '1.09' Removable CD-ROM

The first three numbers for each item refer to the SCSI bus, device ID, and LUN (Logical Unit Number), respectively. The fourth number is the device ID again. cdrecord wants the first three numbers, like this:


11.2.3 Discussion

cdrecord requires root privileges. The most common convention for giving users permissions to use cdrecord is to create a cdrecord group.

Sometimes you'll see documentation where it looks like this:


It's a common convention to leave off the leading 0 for devices on SCSI bus 0. However, it's not much trouble to type an extra digit and leave no room for doubt.

The 2.6 kernel needs no special steps to determine the device ID. Simply use the /dev name:

$ cdrecord dev=/dev/hdc <commands>

11.2.4 See Also

  • cdrecord(1)

    Previous Section  < Day Day Up >  Next Section