Click to See Complete Forum and Search --> : can't mount cdrom after compiling kernel


vasah20
08-29-2001, 12:11 PM
I'm a newbie at compiling the kernel (see my rant post regarding this), but at least I've got it to the point where I can compile it. Anyways - here's the question.

I just compiled the 2.4.9 kernel on my box, and I can't get Linux to read my CDRom. I know it was working before, and it even shows up in the KDE System information applet. This is my main concern with the kernel, since there are other problems that I will post about later (sound card not recognized, but KDE startup sound plays, USB Visor isn't working)... I figure take it one step at a time.

Anyways - I can mount /mnt/floppy just fine, and /proc/filesystem shows iso9660, but if I try
> mount -t iso9660 -r /dev/cdrom /mnt/cdrom
it spits out an error similar to
/dev/cdrom not a valid block device. (/dev/cdrom -> /dev/hdb)

Please help me on this one...

here are some file snippets that I thought might be helpful. Again, I'm a newbie, so forgive me if I don't post more relevant information.

System specs:
Distro: Mandrake 8.0
MoBo: Via KZ133 Chipset (enabled in make menuconfig)
CPU: athlon 1Ghz
RAM: 512 MB PC133
HD: Maxtor 5T040H 4 Diamond Plus60 40GB (master on primary IDE)
CDRW: Yamaha CRW8824E (slave on primary IDE)
IDE Interface: Ultra DMA 33/66

(lilo.conf)
...
#I did
#> mkinitrd -v /boot/initrd.img-2.4.9 2.4.9
#> ln -s /boot/initrd.img-2.4.9 /boot/initrd.img
#recompiled kernel
image=/boot/vmlinuz
label=linux
root=/dev/hda5
initrd=/boot/initrd.img
append=" hdb=ide-scsi quiet"
vga=788
read-only

image=/boot/vmlinuz-2.4.3-20mdk
label=linux_old
root=/dev/hda5
initrd=/boot/initrd-2.4.3-20mdk.img
append=" hdb=ide-scsi quiet"
vga=788
read-only
...

(messages - only places where I see hdb, my CDRW drive, and one other message that bothers me)
Aug 29 08:20:15 localhost kernel: Kernel command line: BOOT_IMAGE=linux ro root=305 hdb=ide-scsi quiet
Aug 29 08:20:15 localhost kernel: ide_setup: hdb=ide-scsi
...
Aug 29 08:20:15 localhost kernel: VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci00:07.1
Aug 29 08:20:15 localhost kernel: ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:DMA
Aug 29 08:20:15 localhost kernel: ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:pio, hdd:pio
Aug 29 08:20:15 localhost kernel: hda: Maxtor 5T040H4, ATA DISK drive
Aug 29 08:20:15 localhost kernel: hdb: YAMAHA CRW8824E, ATAPI CD/DVD-ROM drive
...
#COULD THIS BE THE PROBLEM?
#I compiled the SCSI drivers into the kernel,
#instead of making them modules
Aug 29 08:20:15 localhost kernel: SCSI subsystem driver Revision: 1.00
Aug 29 08:20:15 localhost kernel: request_module[scsi_hostadapter]: Root fs not mounted
Aug 29 08:20:15 localhost last message repeated 2 times
...
(I'm assuming this is after i try to mount)
Aug 29 08:36:02 localhost kernel: hdb: status error: status=0x10 { SeekComplete }
Aug 29 08:36:02 localhost kernel: hdb: drive not ready for command
Aug 29 08:36:02 localhost kernel: hdb: status error: status=0x10 { SeekComplete }
Aug 29 08:36:02 localhost kernel: hdb: drive not ready for command
Aug 29 08:37:19 localhost modprobe: modprobe: Can't locate module block-major-11
Aug 29 08:38:36 localhost kernel: ide-floppy driver 0.97
Aug 29 08:38:36 localhost modprobe: modprobe: Can't locate module ide-cd
Aug 29 08:38:36 localhost kernel: hdb: driver not present
Aug 29 08:38:57 localhost kernel: ide-floppy driver 0.97
Aug 29 08:38:57 localhost modprobe: modprobe: Can't locate module ide-cd
Aug 29 08:38:57 localhost kernel: hdb: driver not present

Sorry this is so long, I tried to give you as much information as possible. If you need to know more, I'll tell you what I can.

TIA
leo

The Ghost Of Ille Pugil
08-29-2001, 12:14 PM
try mount -t is9660 /dev/hdd /mnt/cdrom

u2mike
08-29-2001, 12:16 PM
When compiling the kernel did you include support for your cdrom?

Im not an expert :)

chikn
08-29-2001, 12:27 PM
Did you go through every option and read its description carefully. If not you might want to recompile and do so, if you went with the default kernel config it can screw up just about everthing.

vasah20
08-29-2001, 12:34 PM
Originally posted by chikn:
<STRONG>Did you go through every option and read its description carefully. If not you might want to recompile and do so, if you went with the default kernel config it can screw up just about everthing.</STRONG>

Yeah - it took me close to 2 hours to make sure I got what I wanted... the only thing is that I didn't know which specification my Yamaha CDRW8824 fit into, so I didn't know what low-level driver to select. I think that this might be where my problem is, but I don't know how to fix it (ie what driver to select).

bdg1983
08-29-2001, 04:43 PM
According to append=" hdb=ide-scsi", you've enabled scsi emulation for hdb and so the device will now be known as (depends on the distro) scd(0 or 1) or sr(0or 1).

Check the devices in /dev

ls -al /dev/cdrom
ls -al /dev/hdb

to see if there is a symlink to scd? or sr? and also check /etc/fstab to see the exact device that is being referenced.

vasah20
08-29-2001, 06:39 PM
Originally posted by mdwatts the 3rd:
<STRONG>According to append=" hdb=ide-scsi", you've enabled scsi emulation for hdb and so the device will now be known as (depends on the distro) scd(0 or 1) or sr(0or 1).

Check the devices in /dev

ls -al /dev/cdrom
ls -al /dev/hdb

to see if there is a symlink to scd? or sr? and also check /etc/fstab to see the exact device that is being referenced.</STRONG>

originally
/dev/cdrom -&gt; /dev/hdb

then I:
&gt; rm -f cdrom
&gt; ln -s /dev/scd0 cdrom

so now /dev/cdrom -&gt; /dev/scd0

/etc/fstab is referencing /dev/cdrom.

but I still can't mount my cdrom. Whenever I try to, still get the error: /dev/cdrom is not a valid block device. If I try to use mount -t iso9660 -f /dev/scd0 /mnt/cdrom I get the same error as well.

Is there anything else I can do?

[ 29 August 2001: Message edited by: vasah20 ]

bdg1983
08-29-2001, 07:10 PM
Not sure if this will make a difference.

'ln -s /dev/scd0 cdrom'

Should it be

cd /dev
ln -s scd0 cdrom

or from another directory entirely

ln -s /dev/scd0 /dev/cdrom

Seems to me you may have created the symlink to cdrom in whatever directory you happened to be in when creating the link.

Anyone else?

vasah20
08-30-2001, 12:34 AM
the cdrom link is at /dev/cdrom

I honestly don't know what else it could be...

oh yeah - i tried mount -t iso9660 /dev/hdd /mnt/cdrom
nothing happened.

[ 30 August 2001: Message edited by: vasah20 ]

Malakin
08-30-2001, 05:11 AM
It's probably your kernel config choices.

Cd Writers are always run through some sort of scsi emulation layer. In Linux it's simply called "scsi emulation" in windows it's called an "aspi layer" or just aspi.

This is why a cd burner will usually show up as /dev/scd0 which is used for scsi cd drives. This is often symlinked to /dev/cdrom

Kernel options you need are "scsi support", "scsi disk support", "scsi generic "(I think), "scsi emulation" (under ata/ide...), I think you might need "netlink device emulation" (I know that doesn't seem to make sense from the name), other kernel options you need are more obvious.

You only need "append=" hdb=ide-scsi"" in your lilo.conf if you have atapi cd support available, apparently this tells the kernel to skip over the atapi disk support and use scsi instead. This has nothing to do with your problem but I thought I'd mention it since it doesn't seem to be common knowledge.

To troubleshoot your problem a little more:
"cat /proc/scsi/scsi" should spit out something like this showing your scsi devices which should include your cd drive:

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: CREATIVE Model: CD5233E Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: Sony Model: Sony DSC Rev: 2.10
Type: Direct-Access ANSI SCSI revision: 02

Hope this helps :)