# Cdrecord not working properly after kernel upgrade

## winterknight

Hey Guys.

I've finally got round to upgrading to a 2.6 kernel (gentoo-dev-sources-2.6-10-r6) and while most things seem to be working fine I have one minor issue which I'd like to resolve before rebuilding against NPTL.

I left ide-scsi out of the kernel like the migration guide says, and now cdrecord no longer seems to want to work in non-root mode.

Here's what I got:

```
dave@rigel dave $ cdrecord dev=ATAPI: -scanbus

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

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6build1

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

scsidev: 'ATAPI:'

devname: 'ATAPI'

scsibus: -1 target: -1 lun: -1

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.

Using libscg version 'schily-0.8'.

scsibus0:

        0,0,0     0) 'LG      ' 'DVD-ROM DRD8160B' '1.01' Removable CD-ROM

        0,1,0     1) 'DVDRW   ' 'IDE 16X         ' 'A076' 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) *

dave@rigel dave $ cdrecord -v dev=ATAPI:0,1,0 /tmp/home.iso

cdrecord: No write mode specified.

cdrecord: Asuming -tao mode.

cdrecord: Future versions of cdrecord may have different drive dependent defaults.

cdrecord: Continuing in 5 seconds...

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

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6build1

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

TOC Type: 1 = CD-ROM

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:0,1,0'

devname: 'ATAPI'

scsibus: 0 target: 1 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.

Using libscg version 'schily-0.8'.

SCSI buffer size: 64512

atapi: 1

Device type    : Removable CD-ROM

Version        : 0

Response Format: 2

Capabilities   :

Vendor_info    : 'DVDRW   '

Identifikation : 'IDE 16X         '

Revision       : 'A076'

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Current: 0x0009

Profile: 0x002B

Profile: 0x001B

Profile: 0x001A

Profile: 0x0014

Profile: 0x0013

Profile: 0x0011

Profile: 0x0010

Profile: 0x000A

Profile: 0x0009 (current)

Profile: 0x0008

cdrecord: This version of cdrecord does not include DVD-R/DVD-RW support code.

cdrecord: If you need DVD-R/DVD-RW support, ask the Author for cdrecord-ProDVD.

cdrecord: Free test versions and free keys for personal use are at ftp://ftp.berlios.de/pub/cdrecord/ProDVD/

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

Driver flags   : MMC-3 SWABAUDIO BURNFREE

Supported modes:

Drive buf size : 1974016 = 1927 KB

FIFO size      : 4194304 = 4096 KB

cdrecord: Drive does not support TAO recording.

cdrecord: Illegal write mode for this drive.

```

I noted from this thread that cdrecord may need to be setuid root in order to work under 2.6. So I checked, and when I saw that it wasn't I 'chmod 4755"'d it. Now I get  a different set of errors:

```

dave@rigel dave $ cdrecord -v dev=ATAPI:0,1,0 /tmp/home.iso

cdrecord: No write mode specified.

cdrecord: Asuming -tao mode.

cdrecord: Future versions of cdrecord may have different drive dependent defaults.

cdrecord: Continuing in 5 seconds...

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

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6build1

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

TOC Type: 1 = CD-ROM

scsidev: 'ATAPI:0,1,0'

devname: 'ATAPI'

scsibus: 0 target: 1 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.

Using libscg version 'schily-0.8'.

SCSI buffer size: 64512

cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.

```

The drive works fine when run as root, and it works fine under kernel-2.4/ide-scsi.

Any thoughts?

----------

## bollucks

Don't use any of the older methods to burn with 2.6; use:

cdrecord dev=/dev/hdc

or equivalent device name 

is what you use now. cdrecord will spit out something about unsupported mode but that's just because the author of cdrecord is unhappy with the way linux kernel developers chose to burn cds.

----------

## winterknight

Nope, doesn't work.

Without setuid:

```
dave@rigel dave $ cdrecord dev=/dev/hdb -v /tmp/home.iso

cdrecord: No write mode specified.

cdrecord: Asuming -tao mode.

cdrecord: Future versions of cdrecord may have different drive dependent defaults.

cdrecord: Continuing in 5 seconds...

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

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6build1

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

TOC Type: 1 = CD-ROM

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/hdb'

devname: '/dev/hdb'

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

Warning: Open by 'devname' is unintentional and not supported.

cdrecord: Permission denied. Cannot open '/dev/hdb'. Cannot open SCSI driver.

cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.

cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

```

With setuid:

```

dave@rigel dave $ cdrecord dev=/dev/hdb -v /tmp/home.iso

cdrecord: No write mode specified.

cdrecord: Asuming -tao mode.

cdrecord: Future versions of cdrecord may have different drive dependent defaults.

cdrecord: Continuing in 5 seconds...

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

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6build1

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

TOC Type: 1 = CD-ROM

scsidev: '/dev/hdb'

devname: '/dev/hdb'

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

Warning: Open by 'devname' is unintentional and not supported.

cdrecord: Invalid argument. Cannot set SG_SET_TIMEOUT.

```

I've also tried doing a fresh emerge of cdrtools, but that didn't work either.

----------

## bollucks

Make sure you do not have "hdb=ide-scsi" in your boot parameters. This should be disabled. Also you can only burn as root now unless you use -ck's patch that allows non root users to burn cds.

----------

## piewie

Create a group called burning for Example. Put the user in the group, look that cdrw and dvd and all burning related groups are in the burning group. chown root:burning for readcd and cdrecord. Logout and log in again. Burning should work as user again.

For DMA support use:

cdrecord dev=ATA:0,1,0 for hdb

----------

## winterknight

Okay, I've chown'd all related programs and devices to root:cdrw, and put myself in that group as well. Still no joy either with a setuid/setgid cdrecord or without.

Do these patches you mention come with gentoo-dev-sources, or do I have to add them?

----------

## piewie

chmod 660 /usr/bin/cdrecord

chmod 660 /usr/bin/readcd

there is a patch around called scsi_command_drop patch or something like that. If you use love-sources or nitro-sources, then the patch will be implemented.

User has to be in groups: burning, cdrom, cdrw. You cpuld also use k3b, which makes some necessary changes for you (Settings --> k3bsetup). Don't forget to logout and login.

----------

## winterknight

Okay, I've installed k3b and set up everything the way it wants them set up, and added myself to the newly created "burning" group.

As before, everything works fine when I'm root, but not as a normal user. Like I said in the first post, this isn't really a major problem, it's just annoying having to become root every time I want to burn a CD. But as it's getting late here now and I've been trying to resolve this all day, I'll call it a day for now. I'm not going to have much time to maintain the PC for the next two or three weeks, and hopefully by that time there'll be a new stable kernel that fixes the problem. If not then I'll try building love-sources and see if that works.

Thanks for the help, guys, but I'm calling this one lost for now.

----------

## Gentree

 *piewie wrote:*   

> chmod 660 /usr/bin/cdrecord
> 
> chmod 660 /usr/bin/readcd
> 
> there is a patch around called scsi_command_drop patch or something like that. If you use love-sources or nitro-sources, then the patch will be implemented.
> ...

 

shouldn't that perm be 755 ?? It's bit one that adds execute permission.

the other way to add execute for group memebers:

```
chmod g+x /usr/bin/cdrecord
```

HTH  :Cool: 

----------

## bollucks

The command drop patch will only work if cdrecord is not suid root. Without this patch you can only burn as root. No reasonable compromise has yet been reached with userspace by the kernel devs responsible.

----------

## piewie

 *Gentree wrote:*   

> shouldn't that perm be 755 ?? It's bit one that adds execute permission.

 

Of cause you are right. I looked too fast in the wrong window. 660 is for hda, hdb,... if that are cd-drives.

750 is for cdrecord/readcd.

Thinking is sometimes better than looking  :Embarassed: 

----------

## Gentree

I am unable to burn using 2.6.10 and 2.6.11 nitro kernels but 2.6.9-nitro works fine.

hwvr now k3b has devided it cant see my devices anymore. Other cd burners are fine but dont have dvd burn caps.

Anyone know a dvd burner apart from k3b?

TIA  :Cool: 

----------

