Fri 20 May 2005 08:02:13 AM UTC, comment #2:
It still doesn't work, unfortunately. From the debug output it seems that graveman is actually using proper device names instead of "(null)" now, but it executes external programs with the wrong devices and/or the wrong device notation.
This is from trying to erase a CD-RW. It calls cdrdao with "--device 1,0,0", which cdrdao doesn't seem to like (I'm running a 2.4 kernel if that matters, BTW), and dvd+rw-mediainfo with "/dev/sg5", which it doesn't seem to like either:
[zlatko@disclosure]:~$ graveman
- Message: une conf [/home/zlatko/.config/graveman/graveman.conf] valide trouve !
[...]
- (graveman:16613): DEBUG: le premier avant le dvd [0]
- (graveman:16613): DEBUG: execution de [/usr/local/bin/dvd+rw-mediainfo /dev/sg5]
- (graveman:16613): DEBUG: oui une erreur [256]
- (graveman:16613): DEBUG: Lu => []
- (graveman:16613): DEBUG: le deuxieme avant le cd [0]
- (graveman:16613): DEBUG: execution de [/usr/local/bin/cdrdao disk-info --device 1,0,0]
- (graveman:16613): DEBUG: oui une erreur [256]
- (graveman:16613): DEBUG: [0] la troisieme apres tout [0]
- (graveman:16613): DEBUG: le premier avant le dvd [0]
- (graveman:16613): DEBUG: execution de [/usr/local/bin/dvd+rw-mediainfo /dev/sg5]
- (graveman:16613): DEBUG: oui une erreur [256]
- (graveman:16613): DEBUG: Lu => []
- (graveman:16613): DEBUG: le deuxieme avant le cd [0]
- (graveman:16613): DEBUG: execution de [/usr/local/bin/cdrdao disk-info --device 1,0,0]
- (graveman:16613): DEBUG: oui une erreur [256]
[...]
This goes on until I hit the "Cancel" button. When running the external programs from the command line, it turns out that cdrdao prefers the /dev/sg notation, while dvd+rw-mediainfo wants a block device:
[zlatko@disclosure]:~$ cdrdao disk-info --device 1,0,0
Cdrdao version 1.2.0 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty
Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.
ERROR: Cannot open SCSI device '1,0,0': Cannot open '/dev/scd1'
Supported SCSI transports for this platform:
Transport name: sg
Transport descr.: Generic transport independent SCSI
Transp. layer ind.:
Target specifier: bus,target,lun
Target example: 1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported
[...]
ERROR: Please use option '--device [proto:]bus,id,lun', e.g. --device 0,6,0 or --device ATA:0,0,0
ERROR: Cannot setup device 1,0,0.
Although cdrdao itself says it wants the "bus,id,lun" notation, it actually doesn't work. This might be a bug in cdrdao - it does work fine when specifying the sg device directly, though:
[zlatko@disclosure]:~$ cdrdao disk-info --device /dev/sg1
Cdrdao version 1.2.0 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty
Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.
Using libscg version 'schily-0.8'
/dev/sg1: _NEC DVD_RW ND-3520A Rev: 1.04
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)
That data below may not reflect the real status of the inserted medium
if a simulation run was performed before. Reload the medium in this case.
CD-RW : yes
Total Capacity : n/a
CD-R medium : Mitsubishi Chemical Corporation
Long Strategy Type, e.g. Cyanine
Recording Speed : 0X - 4X
CD-R empty : no
Toc Type : CD-DA or CD-ROM
Sessions : 1
Last Track : 1
Appendable : no
And here's the same thing for dvd+rw-mediainfo:
[zlatko@disclosure]:~$ /usr/local/bin/dvd+rw-mediainfo /dev/sg5
/dev/sg5: unable to open: Block device required
[zlatko@disclosure]:~$ /usr/local/bin/dvd+rw-mediainfo /dev/sr0
INQUIRY: [_NEC ][DVD_RW ND-3520A ][1.04]
GET [CURRENT] CONFIGURATION:
Mounted Media: 14h, DVD-RW Sequential
Media ID: MCC 01RW11n9
Current Write Speed: 1.0x1385=1411KB/s
Write Speed #0: 6.1x1385=8467KB/s
Write Speed #1: 5.1x1385=7056KB/s
Write Speed #2: 4.1x1385=5645KB/s
Write Speed #3: 3.1x1385=4234KB/s
Write Speed #4: 2.0x1385=2822KB/s
Write Speed #5: 1.0x1385=1411KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 2.0x1385=2770KB/s@[0 -> 1992589]
Speed Descriptor#0: 00/1992589 R@5.0x1385=6925KB/s W@2.0x1385=2770KB/s
Speed Descriptor#1: 03/1992589 R@1.0x1385=1385KB/s W@1.0x1385=1385KB/s
READ DVD STRUCTURE[#10h]:
Media Book Type: 32h, DVD-RW book [revision 2]
Legacy lead-out at: 2298496*2KB=4707319808
READ DVD STRUCTURE[#0h]:
Media Book Type: 32h, DVD-RW book [revision 2]
Last border-out at: 1992589*2KB=4080822272
READ DISC INFORMATION:
Disc status: complete
Number of Sessions: 1
State of Last Session: complete
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: complete
Track Start Address: 0*2KB
Free Blocks: 0*2KB
Track Size: 1992589*2KB
Last Recorded Address: 1992588*2KB
FABRICATED TOC:
Track#1 : 14@0
Track#AA : 14@1992589
Multi-session Info: #1@0
READ CAPACITY: 1992589*2048=4080822272
There are two things worth of notice here. First, although both my DVD-RW and DVD-ROM drives are IDE drives, I use them as SCSI devices with the ide-scsi module - thus they are /dev/sr0 (/dev/scd0) and /dev/sr1 (/dev/scd1) instead of /dev/hdc and /dev/hdd. Second, graveman obviously gets the sg device mapping wrong. The /dev/sg5 that it is trying to feed to dvd+rw-mediainfo is actually my USB flash card reader. :-)
Here's the output of sg_map from the sg3_utils package (see http://sg.torque.net/sg/u_index.html), the contents of /proc/scsi/scsi and, as requested, the contents of /proc/sys/dev/cdrom/info:
[root@disclosure]:~# sg_map
/dev/sg0 /dev/sda
/dev/sg1 /dev/scd0
/dev/sg2 /dev/scd1
/dev/sg3 /dev/sdb
/dev/sg4 /dev/sdc
/dev/sg5 /dev/sdd
/dev/sg6 /dev/sde
[root@disclosure]:~# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: OLYMPUS Model: u-miniD,Stylus V Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: _NEC Model: DVD_RW ND-3520A Rev: 1.04
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: TOSHIBA Model: ODD-DVD SD-M1802 Rev: J031
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: SMSC Model: 223 U HS-CF Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: SMSC Model: 223 U HS-MS Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 02
Vendor: SMSC Model: 223 U HS-SM Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 03
Vendor: SMSC Model: 223 U HS-SD/MMC Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
[root@disclosure]:~# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.12 2000/10/18
drive name: sr1 sr0
drive speed: 48 32
drive # of slots: 1 1
Can close tray: 1 1
Can open tray: 1 1
Can lock tray: 1 1
Can change speed: 1 1
Can select disk: 0 0
Can read multisession: 1 1
Can read MCN: 1 1
Reports media changed: 1 1
Can play audio: 1 1
Can write CD-R: 0 1
Can write CD-RW: 0 1
Can read DVD: 1 1
Can write DVD-R: 0 1
Can write DVD-RAM: 0 0
I'll try to compile graveman with "--disable-linux-ide" on the weekend, and see if this fixes the IDE <-> SCSI and/or sg mapping problem.
|