Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
request for working cdrw config files/command outputs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
carboxylman
n00b
n00b


Joined: 28 Jun 2002
Posts: 34
Location: minneapolis, mn

PostPosted: Sun Jun 30, 2002 12:57 am    Post subject: request for working cdrw config files/command outputs Reply with quote

I've been having strange problems with my ide cd burner. I've searched the forums and tried many different peoples' advice, and permutations of options. It doesn't work.

SO, can those who have gotten their ide burners working do the following:

1. post the relevant portions of your /etc/devfsd.conf
2. post the output of 'cdrecord -scanbus'
3. post the output of 'lsmod'
4. whatever I missed

Thanks very much to all those who post. This seems to be a common question, and maybe others can benefit from seeing a full working configuration.

david
Back to top
View user's profile Send private message
carboxylman
n00b
n00b


Joined: 28 Jun 2002
Posts: 34
Location: minneapolis, mn

PostPosted: Sun Jun 30, 2002 1:33 am    Post subject: Reply with quote

Well, as soon as I posted, I played with insmod some more, and somehow got it working.

Let me finalize my settings, and I'll post in some detail how I got this to work.[/i]
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Sun Jun 30, 2002 2:28 am    Post subject: Reply with quote

try recompiling your kernel with scsi emulation scsi cdrom and hard disk and general scsi support all compiled into the kernel...not as modules...as for devfs all i did was uncomment the section that pertained to cdrw and added /dev/sr0 /mnt/cdrw iso9660 noauto,user,exec,async 0 0 to fstab.....of corse you must create the /cdrw in the /mnt directory....add hdx=scsi to the kernel line in grub....i have done this four times on 4 different machines this week...it works everytime...so i hardly thinkits mysterious...not if i can do it..lol
Back to top
View user's profile Send private message
carboxylman
n00b
n00b


Joined: 28 Jun 2002
Posts: 34
Location: minneapolis, mn

PostPosted: Sun Jun 30, 2002 3:35 am    Post subject: Reply with quote

Well, what I did first was recompile the kernel with the following:

ATA/IDE/MFM/RLL support Y
ATA/IDE/ATAPI Block Devices (submenu)
-> IDE/ATAPI CDROM support M
-> SCSI Emulation Support M
SCSI support M
SCSI disk support M
SCSI CD-ROM support M
SCSI generic support M

Hopefully I didn't miss any.

Then I edited the relevant parts of /etc/devfsd.conf:

#Give the cdrw group write permissions to /dev/sg0
#This is done to have non root user use the burner (scan the scsi bus)
REGISTER ^sg0$ PERMISSIONS root.cdrw 660

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sg0 cdrw
REGISTER ^sg0$ CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER ^sg0$ CFUNCTION GLOBAL unlink cdrw

Then I added my user to the cdrw group in /etc/group.

Reboot.

Then I had to do some weird stuff:

> rmmod ide-scsi
> rmmod sg

> insmod sg
> insmod ide-scsi

But then cdrecord -scanbus worked, and so did gtoaster.

Hope this helps somebody.

david
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Sun Jun 30, 2002 4:08 am    Post subject: Reply with quote

Very well done, carboxylman!! You solved your problem and came back to share the info with others! This is an example to follow! :wink:
_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
Mr. Pointy
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2002
Posts: 77

PostPosted: Sun Jun 30, 2002 6:39 am    Post subject: Reply with quote

I was working on the same thing today. I was trying to get my links to appear as I thought they should. I didn't have a cdrw link until I did a: killall -HUP devfsd. Also, the permissions for the cdrw were root only(root and cdrw, but i was a bit slow to catch on). I also have a dvd drive.

What worked, from devfsd.conf:
Code:

# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)
REGISTER        ^cdrw$       PERMISSIONS root.users 660


# General note for the following auto creation of symlinks:
#
#    If you change the device that the symlink points to,
#    you should also remove the symlink before restarting
#    devfsd

# Create /dev/cdrom for the first cdrom drive
LOOKUP      ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom1 cdrom
REGISTER    ^cdroms/cdrom1$   CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER  ^cdroms/cdrom1$   CFUNCTION GLOBAL unlink cdrom


# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
LOOKUP      ^dvd$           CFUNCTION GLOBAL mksymlink cdroms/cdrom0 dvd
REGISTER    ^cdroms/cdrom0$  CFUNCTION GLOBAL mksymlink $devname dvd
UNREGISTER  ^cdroms/cdrom0$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP      ^cdrw$           CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER    ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER  ^sr0$           CFUNCTION GLOBAL unlink cdrw

I still had to build the various scsi modules into the kernel to get the cdrw link. When they were modules I could load them and a second cdrom would appear in /dev/cdroms (which still worked for burning) but no cdrw link.
Strangely, I had to change the lines ^cdrom/cdrom0$ and ^cdrom/cdrom1$. I had to add an s (^cdroms/cdrom... ).
Also, carboxylman, It looks like you chose sg0 over sr0. I just noticed I have both. Are they the same?
Finally, I was wondering if instead of using the cdrw group, just giving group users permissiong to the cdrw, as I have, is a bad idea.

Now the links cdrw and cdrom point to the cdrw. I can burn and play VCDs as a normal user. The link dvd points to the dvd (just checked, i can't play dvd as a normal user. oops) Otherwise everything works.

Added:
Code:
# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)
REGISTER        ^cdrw$       PERMISSIONS root.users 660
REGISTER        ^dvd$       PERMISSIONS root.users 660

Hopefully that's ok too. DVD now works as normal user

ok, i changed it again. I couldn't really burn as a normal user. now it works I ,uh, think.


Last edited by Mr. Pointy on Sat Jul 06, 2002 8:06 am; edited 1 time in total
Back to top
View user's profile Send private message
carboxylman
n00b
n00b


Joined: 28 Jun 2002
Posts: 34
Location: minneapolis, mn

PostPosted: Sun Jun 30, 2002 5:09 pm    Post subject: Reply with quote

Mr. Pointy:

You had to change /dev/cdrom/cdrom0 to /dev/cdroms/cdrom0 because that seems to be how gentoo (or devfs, not sure) sets up the cdrom devices.

sg0 is the first generic scsi device, and sr0 is the first scsi cdrom.

I tried sg0 in /etc/devfsd.conf because cdrecord/gtoaster were complaining about not being able to find /dev/sg0; they didn't mention /dev/sr0.

Thanks for posting.

david
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Sun Jun 30, 2002 9:04 pm    Post subject: Reply with quote

i uncommented the dvd section and changed it to point to cdrom0 so taht the dvd acts as the cdrom and the dvd

# Create /dev/cdrom for the first cdrom drive
LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
REGISTER ^cdrom/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER ^cdrom/cdrom0$ CFUNCTION GLOBAL unlink cdrom


# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 dvd
REGISTER ^cdrom/cdrom0$ CFUNCTION GLOBAL mksymlink $devname dvd
UNREGISTER ^cdrom/cdrom0$ CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER ^sr0$ CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER ^sr0$ CFUNCTION GLOBAL unlink cdrw

and i just uncommented adn did what i posted above to get the cdrw to work....i use kde in gentoo and xcdroast as the gui for burning....it has an option now to setup non root automatically
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 7:01 am    Post subject: This is what worked for me. Reply with quote

Here's what I have that currently works (burning a cd as I type this.) Thanks to rac for helping me get this up and running (see the rest of the thread.)

Kernel:
Code:
ATA/IDE/MFM/RLL support Y
ATA/IDE/ATAPI Block Devices (submenu)
-> IDE/ATAPI CDROM support <N>  (that's NO)
-> SCSI Emulation Support <*>
SCSI support <*>
SCSI disk support <*>
SCSI CD-ROM support <*>
SCSI generic support <*>


file: menu.lst
Code:
default 0
timeout 30
splashimage=(hd2,0)/boot/grub/spash.xpm.gz

title=GenToo
root(hd2,0)
kernel /boot/bzImage root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"

title=Windows XP Professional
root=(hd0,0)
chainloader +1


file: /etc/devfsd.conf
Code:
# Create /dev/cdrom for the first cdrom drive
# NOTE: Uncommented so DVD Drive will also function as regular CD-ROM
LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom1 cdrom
REGISTER        ^cdroms/cdrom1$   CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER      ^cdroms/cdrom1$   CFUNCTION GLOBAL unlink cdrom

# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
# NOTE: We add the fully qualified path here, else some apps
#       have problems to resolve the true device (drip comes to mind)
LOOKUP          ^dvd$           CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
REGISTER        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink ${devpath} dvd
UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP          ^cdrw$          CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER        ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER      ^sr0$           CFUNCTION GLOBAL unlink cdrw


file: /etc/fstab
Code:

/dev/hdf1       /boot           ext2            noauto,noatime          1 1
/dev/hdf3       /               xfs             noatime                 0 0
/dev/hdf2       none            swap            sw                      0 0
/dev/hdf4       /mnt/storage    vfat            noatime,umask=0         0 0
# NOTE: I have no reference to the DVD/CDRW in fstab
proc            /proc           proc            defaults                0 0


dmesg | grep hdc finds:
Code:

Kernel command line: root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:DMA
hdc: QPS CRD-BP1700P, ATAPI CD/DVD-ROM drive
hdc: ATAPI 40X CD-ROM CD-R/RW drive, 4096kB Cache, UDMA(33)


dmesg | grep hdd finds:
Code:
Kernel command line: root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:DMA
hdd: Pioneer DVD-ROM ATAPIModel DVD-113 0108, ATAPI CD/DVD-ROM drive
hdd: ATAPI DVD-ROM drive, 512kB Cache, UDMA(33)


Thanks for any advice, comments, suggestion.
~thorne
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718


Last edited by thorne on Wed Oct 09, 2002 6:21 pm; edited 4 times in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 7:06 am    Post subject: Reply with quote

Does turning off ATAPI CD support improve matters?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 7:11 am    Post subject: Reply with quote

I have not tried that yet. I was under the impression that I needed that in order for my ATAPI DVD drive to work. <edit>I will try recompiling without the support now. Will let you know in 20 minutes or so if it makes a difference.</edit>
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718


Last edited by thorne on Wed Oct 09, 2002 7:21 am; edited 2 times in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 7:18 am    Post subject: Reply with quote

thorne wrote:
I have not tried that yet. I was under the impression that I needed that in order for my ATAPI DVD drive to work. Am I wrong?

I can't say for sure, because I don't have one, but I have heard lots of reports that having IDE CD support compiled in can conflict with SCSI emulation. cdrom and cdrw problems is one such thread that comes up in a search for "ide and scsi and emulation". Could you give it a try? Maybe there's a way to access your DVD via the SCSI emulation interface as well.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 7:45 am    Post subject: Reply with quote

OK, removed ATAPI CD/DVD from the kernel, and still not working. =(

No more weird errors though... I also added hdd=ide-scsi in hopes that maybe the dvd drive will work.

Code:
dmesg | grep hdc
Kernel command line: root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:DMA
hdc: QPS CRD-BP1700P, ATAPI CD/DVD-ROM drive
hdc: ATAPI 40X CD-ROM CD-R/RW drive, 4096kB Cache, UDMA(33)

dmesg | grep hdd
Kernel command line: root=/dev/hdf3 append="hdc=ide-scsi hdd=ide-scsi"
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:DMA
hdd: Pioneer DVD-ROM ATAPIModel DVD-113 0108, ATAPI CD/DVD-ROM drive
hdd: ATAPI DVD-ROM drive, 512kB Cache, UDMA(33)


cdrecord -scanbus:
Code:
cdrecord -scanbus
Cdrecord 1.11a30 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.


Yes, ran as su.

<edit> Note that although I removed support for ATAPI CD/DVD drives in the kernel, I am still able to watch DVDs. </edit>
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718


Last edited by thorne on Wed Oct 09, 2002 8:03 am; edited 1 time in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 7:49 am    Post subject: Reply with quote

Rats. Do you have a "hdd=ide-scsi" line in your kernel command line?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 7:51 am    Post subject: Reply with quote

<edit> I edited my original post in this thread to reflect my current setup. See above.</edit>

The prior attempt involved having ATAPI CD/DVD support compiled into the kernel. Also, my fstab file pointed /dev/sr0 to /mnt/cdrw, instead of /dev/cdroms/cdrom0 to /mnt/cdrw.
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 8:02 am    Post subject: Reply with quote

Code:
$ ls -l /dev/sg*

:?:
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 8:06 am    Post subject: Reply with quote

Code:
ls -l /dev/sg*
ls: /dev/sg*: No such file or directory


:(
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 8:16 am    Post subject: Reply with quote

thorne wrote:
Code:
ls -l /dev/sg*
ls: /dev/sg*: No such file or directory


:(

Not really :(, because I would be :cry: if they did exist. I'm assuming you draw a blank with
Code:
$ find /dev/scsi/ -name 'generic'
...also? I know you said you enabled SCSI generic support in the kernel, but is it possible that it somehow didn't take?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 8:29 am    Post subject: Reply with quote

Code:
find /dev/scsi -name 'generic'
returned nothing.

I also checked again, and generic scsi support is <*>'d. How can I make sure it "took?"
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Oct 09, 2002 8:35 am    Post subject: Reply with quote

thorne wrote:
How can I make sure it "took?"

Almost ashamed to bring it up, but failing to mount /boot when copying the kernel over, that sort of thing. Can you try
Code:
$ cat /proc/scsi/sg/version
...I have:
Code:
30124   Version: 3.1.24 (20020505)

_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 8:58 am    Post subject: Reply with quote

:blush:

well, it is close to 2am here... forgot that one step! updated, rebooted, and now, I have sg0 (cdrw), and sg1 (dvd), and X-CD-ROAST properly displays the drives. Also, I tried running rtoaster as root to make sure it was working, and it is. Next, I will make the changes so that any user can use the cdrw.

cdrecord -scanbus now properly returns:
Code:
cdrecord -scanbus
Cdrecord 1.11a30 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.23
Using libscg version 'schily-0.6'
scsibus0:
        0,0,0     0) 'QPS     ' 'CRD-BP1700P     ' '1.00' Removable CD-ROM
cdrecord: Warning: controller returns wrong size for CD capabilities page.
        0,1,0     1) 'PIONEER ' 'DVD-ROM DVD-113 ' '1.08' 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) *


oh, and cat /proc/scsi/sg/version now returns:
Code:
30123   Version: 3.1.23 (20020318)


Thanks a bunch rac!
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
thorne
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 177

PostPosted: Wed Oct 09, 2002 6:30 pm    Post subject: Reply with quote

I noticed that there is one "error" at boot time, right before KDE starts up.

Code:
* Starting Local.....

/dev/hdf:
setting using_dma to 1 (on)
using_dma = 1

/dev/dvd not supported by hdparm
* Failed to start local                           [!!]


Any thoughts?
_________________
Stupid bug, you go squish now!
-Homer Simpson

Registered linux user #287718
Back to top
View user's profile Send private message
corrs_fan
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2002
Posts: 78
Location: Giffnock, East Renfrewshire

PostPosted: Thu Oct 10, 2002 1:56 am    Post subject: Reply with quote

thorne wrote:
I noticed that there is one "error" at boot time, right before KDE starts up.

Code:
* Starting Local.....

/dev/hdf:
setting using_dma to 1 (on)
using_dma = 1

/dev/dvd not supported by hdparm
* Failed to start local                           [!!]


Any thoughts?


im getting this too, but i have other cd related problems such as the cdrom dev missing/not there, but i havent done any of the above & this is a fresh install of the 1.4rc1 cd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum