|Meet the Gang 1 2 3 4 5 6 7|
From Simeon Nevel
Answered By Mike Martin, Neil Youngman, Heather Stern
With our kind thanks for publication permission. -- Heather
Dear Answer Gang,
I'm trying to get my cd and cdrw working in RH7.3. I've read through both articles on CD Writing in issue 57 and looked at the CD-Rom HOWTO as well.
I've got to proper invocation in grub:
title Red Hat Linux (2.4.18-3) root (hd1,0) kernel /vmlinuz-2.4.18-3 ro root=/dev/hdb7 hdc=ide-scsi hdd=ide-scsi initrd /initrd-2.4.18-3.img
lsmod shows that the various ide-scsi modules are loaded:
Module Size Used by Not tainted [other modules snipped for brevity] sr_mod 16920 0 (autoclean) (unused) autofs 12164 0 (autoclean) (unused) ide-scsi 9664 0 scsi_mod 108608 2 [sr_mod ide-scsi] ide-cd 30272 1 cdrom 32192 0 [sr_mod ide-cd]
[Mike M.] not sure whether ide-cd should be getting loaded you may want to experiment by unloading the scsi modules and reloading in turn (sg and sd may be an idea)
[Neil Youngman] Is this bit from the CD-Writing HOWTO relevant?
- Example configuration for /etc/modules.conf from
make sure you include the options-line from the next listing. The last three lines of that listing are generally suggested to further automate the loading of the required modules.
options ide-cd ignore=hdb # tell the ide-cd module to ignore hdb alias scd0 sr_mod # load sr_mod upon access of scd0 #pre-install ide-scsi modprobe imm # uncomment for some ZIP drives only pre-install sg modprobe ide-scsi # load ide-scsi before sg pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsi Listing:
If that doesn't help then have a look at the output from dmesg and see if it offers any clues.
[Heather] autofs is unrelated. Unless you also have another ATAPI CD which is not supposed to be handled by scsi, you definitely have too many modules loaded.
The kernel support notes (very easy to read in "make menuconfig", a little plainer in /usr/src/linux/Documentation/Configure.help) make it clear that:
If both ATAPI and generic scsi support is provided, the native services will be used.
For my IDE/ATAPI cd-recorder, I don't have any of these loaded automatically. I do have the append line (in my case, 'hdd=ide-scsi'). When I:
then I run:
it says (sorry if hascii, Joerg has his name spelled properly here):
Cdrecord 1.11a05 (i686-suse-linux) Copyright (C) 1995-2001 Jörg Schilling Linux sg driver version: 3.1.22 Using libscg version 'schily-0.5' scsibus0: 0,0,0 0) 'SAF ' 'CD-RW2224 ' '2.06' Removable CD-ROM 0,1,0 1) * 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) *
And the drive becomes addressable as scd0, recordable in theory as sr0 but in practice I give the dev by host and lun number:
cdrecord dev=0,0 speed=4 some-random.iso
At least I hope speed 4 works, because it takes ages to make them at lesser speeds. I do have to wonder if something in my setup is slowing it all down horribly, but hey, I'm not a big CD pressing house, I just wanna burn a CD once in a while ... and that's what I get for having had a cd writer for so long, the newer ones are faster.
Looking at that list again, maybe I've got too many modules involved. Maybe I've got some sort of conflict?
I've changed the links in /dev:
lrwxrwxrwx 1 root root 9 May 29 21:39 /dev/cdrom0 -> /dev/scd0 lrwxrwxrwx 1 root root 9 May 29 21:44 /dev/cdrom1 -> /dev/scd1 brw-rw---- 1 root disk 11, 0 Apr 11 07:25 /dev/scd0 brw-rw---- 1 root disk 11, 1 Apr 11 07:25 /dev/scd1
I've got the mount points defined in /mnt:
drwxr-xr-x 2 root root 4096 May 12 04:39 cdrom drwxr-xr-x 2 root root 4096 May 29 21:47 cdrom0 dr-xr-xr-x 1 root root 2048 Nov 20 1999 cdrom1
but whenever I try to mount either of the cd-rom devices like so:
mount -t iso9660 /dev/scd0 /mnt/cdrom0
mount -t iso9660 /dev/cdrom0 /mnt/cdrom0
mount: /dev/scd0 is not a valid block device
also, "cdrecord -scanbus" doesn't seem to find anything.
[Heather] Then it's right, ide-scsi did not turn them into SCSI hosts. ATAPI cdrom support is being favored, and the IDE stuff doesn't directly lead to writing under Linux. (cdrecord doesn't speak ATAPI. It only speaks SCSI.)
Although in theory if your CD writer is really DVD capable too, you may be able to write UDF filesystems to the disc (as hdc and hdd). I've never tried that, and only UDF support on another machine would let them read the disc. So it probably wouldn't be useful unless all your friends have DVD bays.
What am I doing wrong? I'm sure it's probably something really stupid, but I just can't see it.
A clue would be vastly appreciated.
[Mike M.] this is seriously from memeory but try
first cat /proc/devices (I think)
[Heather] It may be interesting to see this, but a fresh boot where you didn't try to load the ide cdrom support would be more useful. Approximately -
- You need the IDE interface itself, because that handles the IDE controller.
- You -probably- need IDE standard hard disk support for your main drives so you can boot. Unrelated to the cd bays, except for being on the IDE controllers too.
- You -do not- want IDE cdrom services.
- IDE floppy services (those would be for LS-120 bays) or IDE tape services have no effect either way on ATAPI CD-RW's.
- You -do- need ide-scsi, and from the scsi subsection you need sg (scsi generic) support. sg gets autoloaded when ide-scsi behaves correctly and cdrecord is asked to scan the bus. At least from my setup it doesn't appear that SCSI-cdrom is used at all either.
-=: gemini :=- ~ # mount /dev/scd0 /mnt/cd mount: block device /dev/scd0 is write-protected, mounting read-only -=: gemini :=- ~ # lsmod Module Size Used by sg 28352 0 (autoclean) ide-scsi 7312 1
(and a whole bunch of sound card modules. working, as far as my dings and talking-computer noises can tell )
[Mike M.] mount /dev/sd0 /mnt/cdrom0
[Heather] sd0 would be a scsi hard drive; compact discs would be scd0 so after his symlink the request is correct. He just needs to untangle that mess of modules.
For the record the system this is on is SuSE 7.3, but I'm using a locally built kernel - this answer is totally distro independent.
[Mike M.] I remember I had to do a bit of fiddling around when I did it a while ago
[sig block] If you're not outraged, you're not paying attention
[Heather] Hmm, well tell your congressmen and representatives that supporting the overly extended copyrights of MPAA and numerous corporations is against the principle that the entire country is supposed to eventually benefit from all of these works... great or otherwise... and a heavy infringement on the right of individuals to make (and copy, and change, and redistribute) works of our own invention.
(But, this isn't a politics thread. Don't get me started. If this bothers you too go help the EFF, http://www.eff.org.)
From Simeon ben Nevel
Answered By Mike Martin
> > options ide-cd ignore=hdb # tell the ide-cd module to ignore hdb
I thought the Grub/lilo incantation of hdc=ide-scsi & hdd=ide-scsi would take care of this?
> > alias scd0 sr_mod # load sr_mod upon access of scd0
Would I also have to to "alias scd1 sr_mod" ?
I've read on several occasions that if you have 2 cd-rom devices on the same ide interface, you really have to set them both up with the ide-scsi modules.
> > pre-install sg modprobe ide-scsi # load ide-scsi before sg > > pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod > > pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsi
I did, indeed forget the modules.conf magic but I want to let you know that my problem vanished when I rebooted my machine even without having made the suggested changes.
[Mike M.] Out of curiousity - could you post the output of lsmod
I have a strong suspicion that on reboot the module loading was corrected.
Just that if anyone searches for the same problem you had it is nice to see the solution as well as the problem
As much as I enjoy learning more about my linux system, it often seems that the solution to various problems involves magical spells of one sort or another.
Anyway, thanks again for taking the time to lend me a hand.
Simeon ben Nevel
|Meet the Gang 1 2 3 4 5 6 7|