I asked my questions because last year I had similar messages though my PC
doesn't have scsi CD and it was my typing error. Now I just repeated your
situation on my kernel-2.0.30 to be sure that it still has the same
situation.

Short examination of linux source code (sorry, I don't have enough time
now) shows that most probable source of such message is in the function
'get_fops" in ./linix/fs/devices.c

Whole sequence of calls is as follows:

1)
/sbin/mount invokes the 'mount' system call (in 'mount.c'):

static int
mount5 (char *special, char *dir, char *type, int flags, void *data) {
     int ret = mount (special, dir, type, 0xC0ED0000 | (flags), data);
     if (ret == 0)      mountcount++;
     return ret;
}

2)
The 'mount' system call in ./linux/fs/super.c - asmlinkage int sys_mount -
has such :
                fops = get_blkfops(MAJOR(dev));
                if (!fops) {
                        iput(inode);
                        return -ENOTBLK;
                }

This return gives
>> >mount: the kernel does not recognize /dev/scd4 as a block device
>> >       (maybe `insmod driver'?)
in 'try_mount_one' in 'mount.c'

3)
'get_blkfops' is in ./linux/fs/devices.c :

struct file_operations * get_blkfops(unsigned int major)
{
        return get_fops (major,0,MAX_BLKDEV,"block-major-%d",blkdevs);
}

'get_fops' is in the same file :

static struct file_operations * get_fops(
        unsigned int major,
        unsigned int minor,
        unsigned int maxdev,
        const char *mangle,     /* String to use to build the module name */
        struct device_struct tb[])
{
        struct file_operations *ret = NULL;

        if (major < maxdev){
#ifdef CONFIG_KERNELD
                /*
                 * I do get request for device 0. I have no idea why. It happen
                 * at shutdown time for one. Without the following test, the
                 * kernel will happily trigger a request_module() which will
                 * trigger kerneld and modprobe for nothing (since there
                 * is no device with major number == 0. And furthermore
                 * it locks the reboot process :-(
                 *
                 * Jacques Gelinas ([EMAIL PROTECTED])
                 *
                 * A. Haritsis <[EMAIL PROTECTED]>: fix for serial module
                 *  though we need the minor here to check if serial dev,
                 *  we pass only the normal major char dev to kerneld
                 *  as there is no other loadable dev on these majors
                 */
                if ((isa_tty_dev(major) && need_serial(major,minor)) ||
                    (major != 0 && !tb[major].fops)) {
                        char name[20];
                        sprintf(name, mangle, major);
                        request_module(name);
                }
#endif
                ret = tb[major].fops;
        }
        return ret;
}
-----------------

If your kernel is compiled with 'CONFIG_KERNELD=y'
function 'request_module(name);' could be called because of
'(major != 0 && !tb[major].fops)'
FYI: 'sprintf(name, mangle, major);' puts 'block-major-11' into 'name'.

Please, let me know about your CONFIG_KERNELD.
To be sure, I am going to test this little a bit later because now I have
no time to compile kernel with needed printing the content of 'tb'.


Invoking 'request_module' is resulted in the message from 'modprobe':

>> If there is a message like
>>       modprobe: Can't locate module block-major-11

because /dev/scd0 has the number of the block major = 11


You see, it is independent of

>> >In /usr/src/linux/.config...
>> >
>> ># SCSI support type (disk, tape, CD-ROM)

though in /usr/src/linux/Documentation/Configure.help :

CONFIG_MODULES
  Kernel modules are small pieces of compiled code which can be
  inserted in or removed from the running kernel, using the
  programs insmod and rmmod. This is described in the file
  Documentation/modules.txt. Modules can be device drivers, file
  systems, binary executable formats, and so on. If you think that
  you may want to make use of modules with this kernel in the future,
  then say Y here. If unsure, say Y.

It seems to me that second 'Y' is wrong.


>On Sat Aug 29 1998, Iouri Kropatchev wrote:
>
>Thanks for your reply.
>
>> I think there is typing error:
>>
>> >mount: the kernel does not recognize /dev/scd4 as a block device
>
>Yes, a typo.  It should have read /dev/scd0
>
>> If yes, have a look in /var/log/syslog
>> If there is a message like
>>       modprobe: Can't locate module block-major-11
>
>That's exactly that I'm seeing.  Which is weird, since that refers to the
>scsi cdrom (as a character device).  I've made sure that the /dev/ entries
>are all correct.
>
>> what is about the following in /usr/src/limux/.config :
>> .
>> #
>> # Filesystems
>> .
>> .
>> CONFIG_ISO9660_FS=y
>
>I have this, and I can see iso9660 filesystems from my IDE cdrom.
>
>> >This one has me stumped.
>> >
>> >I'm trying to get a CDROM hanging off my scsi bus to work:
>> >
>> >% mount -t iso9660 /dev/scd0 /cdrom
>> >mount: the kernel does not recognize /dev/scd4 as a block device
>> >       (maybe `insmod driver'?)
>> >
>> >As far as I can see, I am running a kernel with scsi cdrom support compiled
>> >into it!  (ie. drivers/scsi/sr.o has been linked into the kernel):
>> >
>> >In /usr/src/linux/.config...
>> >
>> ># SCSI support type (disk, tape, CD-ROM)
>> >#
>> >CONFIG_BLK_DEV_SD=y
>> ># CONFIG_CHR_DEV_ST is not set
>> >CONFIG_BLK_DEV_SR=y
>> >CONFIG_CHR_DEV_SG=y
>> >
>> >Am I missing something here?
>
>Cheers
>Tony


==============================
Dr. Iouri Kropatchev
Associate Professor
School of Computer Science
Universiti Sains Malaysia
11800 Penang, Malaysia

Tel:    (60-4) 6577888 ext.2127
E-mail: [EMAIL PROTECTED]
=============================

Reply via email to