cd burning, capabilities and available modes
Hi...
Following my little oddisey to let cd-burning easy for my users, I think I have found another problem.
It looks like the formats available to cdrecord depend on being root (cdrecord is not suid, if it is it complains it cant reserve some buffers).
As root:
werewolf:/store/tmp# cdrecord -dummy dev=ATAPI:1,0,0 *.iso ... Device seems to be: Generic mmc2 DVD-R/DVD-RW. Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr). Driver flags : MMC-3 SWABAUDIO BURNFREE Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
As user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: 'ATAPI:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow. WARNING ! Cannot gain SYS_RAWIO capability !
: Operation not permitted
Using libscg version 'schily-0.8'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :Vendor_info : 'HL-DT-ST'
Identifikation : 'DVDRAM GSA-4120B'
Revision : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes:
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.
Uh ?
Some suggestions ?
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1
Hi,
Quoted 3 lines · J.A. Magallon
As user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
Try with the real device name, e.g. dev=/dev/hdc
Daniel
Quoted 9 lines · Daniel Drake
Hi,
Quoted 3 lines · J.A. Magallon
As user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...Try with the real device name, e.g. dev=/dev/hdc
The recommended mode is ATAPI, but anyways:
werewolf:/store/tmp> cdrecord -dummy dev=/dev/hdc *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported. Linux sg driver version: 3.5.27
WARNING ! Cannot gain SYS_RAWIO capability !
: Operation not permitted
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (warly-Mandrakelinux-scsi-linux-sg '@(#)scsi-linux-sg.c 1.83 04/05/20 Copyright 1997 J. Schilling').
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :Vendor_info : 'HL-DT-ST'
Identifikation : 'DVDRAM GSA-4120B'
Revision : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes:
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1
Quoted 8 lines · J.A. Magallon
As user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority usingsetpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
You can use the realtime LSM (see list archives) to let specific groups of users use mlockall and run RT tasks. Just load it like:
modprobe realtime gid=29
and make gid 29 your "cdrecord" group.
This should make CD burning as joeuser reliable as root. Most people use this for low latency audio but I think cd burning is a wider and completely unexplored application.
Lee
Quoted 44 lines · J.A. Magallon
Hi...
Following my little oddisey to let cd-burning easy for my users, I think I have found another problem.
It looks like the formats available to cdrecord depend on being root (cdrecord is not suid, if it is it complains it cant reserve some buffers).
As root:
werewolf:/store/tmp# cdrecord -dummy dev=ATAPI:1,0,0 *.iso ... Device seems to be: Generic mmc2 DVD-R/DVD-RW. Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr). Driver flags : MMC-3 SWABAUDIO BURNFREE Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96RAs user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority usingsetpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: 'ATAPI:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow. WARNING ! Cannot gainSYS_RAWIOcapability ! : Operation not permitted Using libscg version 'schily-0.8'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :Vendor_info: 'HL-DT-ST'
Identifikation : 'DVDRAM GSA-4120B'
Revision : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE Supported modes: cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.
Quoted 3 lines
Uh ?
Some suggestions ?
I get that all the time, because one of my drives doesn't support TAO burning. I suspect your firmware sucks, and you will have to use session at a time rather than track at a time, option "-sao" works for me. Are you running standard cdrecord or one of the hacks?
Signature · 3 lines
-bill davidsen ([email protected]) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Quoted 11 lines · Bill Davidsen
Quoted 10 lines · J.A. Magallon
Hi...
Following my little oddisey to let cd-burning easy for my users, I think I have found another problem.
It looks like the formats available to cdrecord depend on being root (cdrecord is not suid, if it is it complains it cant reserve some buffers).
As root:
...
Quoted 6 lines
Quoted 6 lines
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96RAs user:
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes:
...
Quoted 6 lines
I get that all the time, because one of my drives doesn't support TAO burning. I suspect your firmware sucks, and you will have to use session at a time rather than track at a time, option "-sao" works for me. Are you running standard cdrecord or one of the hacks?
Look at what I quoted above. It is the same box, just running cdrecord as root or as user. The 'Supported modes:' line is empty. What has the firmware to do with that ?
A guess: perhaps the problem is:
WARNING ! Cannot gain SYS_RAWIO capability !
: Operation not permitted
as user, so system does not allow the user to query the drive at low level via some ioctl() or the liketo get the supported modes.
BTW, using the LSM realtime module for group cdwriter (80 in my box) killed this messages:
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
so at least this is good (TM).
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #2
J.A. Magallon wrote
Quoted 1 line
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
Why not use "dev=ATAPI:/dev/hdd" or whatever device in /dev/ is your burner...?
Quoted 5 lines
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority usingsetpriority().
Quoted 8 lines
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: 'ATAPI:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained..
Warning: There is absolutely NO DMA, operations thus are slow. WARNING ! Cannot gainSYS_RAWIOcapability ! : Operation not permitted
Sth. seems to be wrong here. When I do this as user I get
...
Use of ATA is preferred over ATAPI.
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'.
...
so it seems that your kernel is still blocking some command in the userland. This might cause your problems, because I get the same write modes as user that I get as root. I use 2.6.9 but have allowed some more commands for users. You can add this in linux/drivers/block/scsi_ioctl.c to see if some commands are blocked as user:
drivers/block/scsi_ioctl.c 2004-08-18 16:11:55.000000000 +0200 renamed from drivers/block/scsi_ioctl.c.orig 2004-08-18 16:11:01.000000000 +0200 +6 -0
@@ -172,6 +228,12 @@ /* And root can do any command.. */ if (capable(CAP_SYS_RAWIO)) return 0; + /* Added for debugging*/ + + if(file->f_mode & FMODE_WRITE) + printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with write-mode\n",cmd[0]); + else + printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with read-mode\n",cmd[0]); /* Otherwise fail it with an "Operation not permitted" */ return -EPERM;
cu,
Frank
Signature · 5 lines
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *