Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
devfs and my ide cdrw
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
Jesse
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2002
Posts: 148

PostPosted: Wed Apr 24, 2002 2:12 am    Post subject: devfs and my ide cdrw Reply with quote

This is my first time using devfs so I dont know what, if anything, im doing wrong and the one faq that I've skimmed over doesnt seem to help.

Using the old/real /dev i had no problem getting my cdrw to play nicely as a scsi generic/emulated device. This time however i chose to use devfs AND compile the neccessary SCSI support into the kernel, they were modules before...

My question is should the /dev/scsi directory be filled out automatically as a result ?? If so, why isnt mine :)
Right now my cdrw is read as /dev/cdrom/cdrom1 which means, of course, that cdrecord -scanbus doesn't like me too much ...
Back to top
View user's profile Send private message
friedmud
Apprentice
Apprentice


Joined: 18 Apr 2002
Posts: 258
Location: Austin, TX USA

PostPosted: Wed Apr 24, 2002 4:16 am    Post subject: Are you sure.... Reply with quote

Are you sure you compiled all the right stuff into your kernel?

I too have an IDE CDRW and it works just like it did in slack (with no devfs).

cdrecord -scanbus gives:
0,0,0 0) 'ATAPI ' 'CD-R/RW 10X8X32 ' '8.FZ' Removable CD-ROM


Here are the kernel options I have found necessary for this to work:

#In ATA/IDE/MFM/RLL
< > Include IDE/ATAPI CDROM support
<*> SCSI emulation support

#In SCSI support
<*> SCSI disk support
<*> SCSI CD-ROM support
<*> SCSI generic support
[*] Enable extra checks in new queueing code
[*] Probe all LUNs on each SCSI device
[*] Verbose SCSI error reporting (kernel size +=12K)



Some of those might or might not be necessary - but it works for me. Also note that the IDE/ATAPI CDROM support is UNCHECKED - if you have this marked it will recognize your cdrom drive as an IDE device first and you wont get the scsi device.

Derek[/b]
Back to top
View user's profile Send private message
Jesse
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2002
Posts: 148

PostPosted: Wed Apr 24, 2002 5:52 am    Post subject: Reply with quote

My scsi section has the relevant ones compiled in as does yours, however, my Include IDE/ATAPI CDROM support is checked as I thought i needed this for my first cdrom which is not scsi at all.

I looked at my slack partition and the kernel there was also configured with these same options, only scsi as modules instead of builtin. (If i do a cat /proc/ksyms i can see scsi ;)) but no scsi in the /dev/scsi directory. But alas, I think my SCSI low-level drivers are wrong ... :-/ For slack I have all the Adaptec drivers checked while for gentoo i only have one of them checked. This still beats the heck outa me. My cdrom plugs right into the motherboard and bypasses my Promise ata66 adapter card all together. So do Adaptec drivers 'just happen to work' with emulated cdrws ?? or am I still missing an option somewhere
Back to top
View user's profile Send private message
kipper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 112

PostPosted: Wed Apr 24, 2002 5:15 pm    Post subject: Reply with quote

Did you append GRUB/LILLO with hdb=ide-scsi where hdb is your cdrw?
Back to top
View user's profile Send private message
snutte
Apprentice
Apprentice


Joined: 24 Apr 2002
Posts: 181
Location: Sweden, Malmö

PostPosted: Wed Apr 24, 2002 6:41 pm    Post subject: Reply with quote

This is how i made my ide burner work.
Enable all things in the kernel to get ide-scsi to work.
DISABLE IDE/ATAPI cdrom support

then insert append="hd*=ide-scsi" in your grub.lst this is how mine looks:

kernel /boot/bzImage root=/dev/hda3 append="hdc=ide-scsi"

This little trick made it work for me. :)
Back to top
View user's profile Send private message
Guest






PostPosted: Thu May 02, 2002 6:15 am    Post subject: Reply with quote

Hey I had the *exact* same problem as you (moving from slackware and everything).
Sorry if the following seems an incoherent rant, but I'm pretty sure it will help you :)

My ide-cdrw would be detected as /dev/scsi/host0/bus0/target0/lun0/cd but all the help I could find on google told me that that device was a block device (for mounting) and that cdrecord wanted a character device (for burning to)-- which wuold be /dev/scsi/host0/bus0/target0/lun0/generic. Unfortunately devfs didn't make/find /dev/scsi/host0/bus0/target0/lun0/generic and making it with the /dev/MAKEDEV script didn't work.

I always used to check "use low level scsi drivers" out of habit because that's what the "Maximum Linux" article said to do (first reference I followed that ever got my burner working for me).

I recompiled my kernel without that option and it worked, whereas before it would say "can't open /dev/pg*" when I'd do a "cdrecord -scanbus"

I tried it many different ways, one change at a time, so that I could narrow it down. Changing ide-scsi and scsi generic support from being compiled in to just being compiled as modules did nothing.

The one thing that I changed that made cdrecord work for me under devfs was to uncheck the use low level scsi drivers option. My scsi related options for my kernel config look like this:
CONFIG_CHR_DEV_SG=m
CONFIG_BLK_DEV_IDESCSI=y
CONFIG_SCSI=y

This is on a box without any scsi devices, just my cdrom and my cdrw.

Also, you don't need append= in grub. My menu.lst kernel line looks like this:
kernel /boot/bzImage root=/dev/hda5 hdc=ide-scsi
Back to top
jay
l33t
l33t


Joined: 08 May 2002
Posts: 980

PostPosted: Tue May 28, 2002 1:52 pm    Post subject: Reply with quote

I post this here just for completeness, if someone stumbles by with similiar problems:

For compiling the kernel with support for an CD-Recorder on the IDE bus it is enough to check the SCSI emulation support. There is noo need to uncheck the IDE-ATAPI-cdrom support, because this will just disable any other IDE devices (DVD-ROM etc..) on your system.

First I crated the dir /mnt/burner as a mountpoint.

I compiled with these options:
Code:

#In ATA/IDE/MFM/RLL
<*> Include IDE/ATAPI CDROM support
<*> SCSI emulation support

#In SCSI support
< > SCSI disk support
< > SCSI CD-ROM support
<*> SCSI generic support
[ ] Enable extra checks in new queueing code
[ ] Probe all LUNs on each SCSI device
[ ] Verbose SCSI error reporting (kernel size +=12K)


And I set up my etc/fstab this way:
Code:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdb1               /boot           ext2            noauto,noatime         1 1
/dev/hdb3               /               ext3            noatime                0 0
/dev/hdb2               none            swap            sw                     0 0
/dev/cdrom              /mnt/cdrom      iso9660         users,noauto,ro        0 0
/dev/cdrw               /mnt/burner     iso9660         users,noauto,ro                0 0
proc                    /proc           proc            defaults               0 0



And my etc/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        ^sg0$       PERMISSIONS root.cdrw 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/cdrom0 cdrom
REGISTER    ^cdroms/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER  ^cdroms/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    ^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 sg0 cdrw
REGISTER    ^sg0$           CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER  ^sg0$           CFUNCTION GLOBAL unlink cdrw



As you can see from above, I creaded two symlinks to the same device /dev/cdrom and /dev/dvd point to the same device (it's actually a DVD-ROM) - this will make your life much easier when you use mplayer or xmms.
_________________
Do you want your posessions identified? [ynq] (n)
Back to top
View user's profile Send private message
Jean
n00b
n00b


Joined: 02 May 2002
Posts: 8

PostPosted: Wed May 29, 2002 2:49 am    Post subject: cd writing & xcdroast Reply with quote

I finally got xcdroast to recognise my cd rw after following jay's instructions. However in xcdroast there is primary and secondary read devices. If I wanted to copy a cd I would put it in the DVD-rom, but it isn't being recognized. Would I have to add that as a scsi device in order for it to be able to choose it as secondary ?
_________________
Jean C.
Back to top
View user's profile Send private message
Curious
Bodhisattva
Bodhisattva


Joined: 13 May 2002
Posts: 395
Location: Sydney, Australia

PostPosted: Wed May 29, 2002 2:56 am    Post subject: Re: cd writing & xcdroast Reply with quote

Jean wrote:
Would I have to add that as a scsi device in order for it to be able to choose it as secondary ?


Yup, Roast will only talk to SCSI devices.

Bryn.
_________________
Are you down with the Hawk?
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