Automatically loading SCSI module

Automatically loading SCSI module

Post by Paul D. Smit » Fri, 19 Jan 2001 15:15:12



I have a SCSI card (an old Adaptec 152x) with a SyQuest drive*
off of it.  There's nothing else on the SCSI card.

I have built my kernel (2.2.18) to include support for this card as a
module (aha152x.o).  I have also built SCSI disk support, etc., all as
modules.

I have added this to my /etc/modules.conf file:

  options aha152x aha152x=0x340,9
  alias scsi_hostadapter aha152x

(these options are required to use the card).  I have added this to my
/etc/fstab file:

  /dev/sda1 /syext ext2 noauto,user 0 0

Now, what I want to happen is that I just say:

  # mount /syext

and Linux will automatically load the aha152x module with the proper
configuration.  But, that's not happening.  When the module is not
loaded and I try the above mount command, I get:

  mount: /dev/sda1 is not a valid block device

If I load the module by hand using "insmod 152x", _then_ it all works
fine and I can mount the filesystem on /dev/sda1, use it, whatever.

If I use "modprobe scsi_hostadapter", then the 152x module is also
loaded correctly in that case.

What do I need to do to convince Linux to load that module when I try to
mount /dev/sda1?  I thought the kmod daemon (which I do have all that
support enabled in my kernel) was supposed to managte all that; the
kernel proper calls the kmod code to resolve the issu, and it calls
modprobe with proper arguments, and problem solved.

What am I missing here?

--
-------------------------------------------------------------------------------

 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

 
 
 

Automatically loading SCSI module

Post by Josef Moeller » Fri, 19 Jan 2001 16:34:44



> I have a SCSI card (an old Adaptec 152x) with a SyQuest drive*
> off of it.  There's nothing else on the SCSI card.

> I have built my kernel (2.2.18) to include support for this card as a
> module (aha152x.o).  I have also built SCSI disk support, etc., all as
> modules.

> I have added this to my /etc/modules.conf file:

>   options aha152x aha152x=0x340,9
>   alias scsi_hostadapter aha152x

> (these options are required to use the card).  I have added this to my
> /etc/fstab file:

>   /dev/sda1 /syext ext2 noauto,user 0 0

> Now, what I want to happen is that I just say:

>   # mount /syext

> and Linux will automatically load the aha152x module with the proper
> configuration.  But, that's not happening.  When the module is not
> loaded and I try the above mount command, I get:

>   mount: /dev/sda1 is not a valid block device

> If I load the module by hand using "insmod 152x", _then_ it all works
> fine and I can mount the filesystem on /dev/sda1, use it, whatever.

> If I use "modprobe scsi_hostadapter", then the 152x module is also
> loaded correctly in that case.

> What do I need to do to convince Linux to load that module when I try to
> mount /dev/sda1?  I thought the kmod daemon (which I do have all that
> support enabled in my kernel) was supposed to managte all that; the
> kernel proper calls the kmod code to resolve the issu, and it calls
> modprobe with proper arguments, and problem solved.

> What am I missing here?

AFAIK, autoloading does not work on SCSI host adapter drivers.
You need to load them explicitly by either building a (new) initrd or
adding an "insmod 152x" to rc.sysinit or the like.

--
Josef M?llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

 
 
 

Automatically loading SCSI module

Post by José Manuel Sousa Perei » Sun, 21 Jan 2001 07:23:25


I have a SCSI card (an old Adaptec 152x) with a SyQuest drive* off of
it. There's nothing else on the SCSI card.

I have built my kernel (2.2.18) to include support for this card as a module
(aha152x.o). I have also built SCSI disk support, etc., all as modules.

I have added this to my /etc/modules.conf file:

  options aha152x aha152x=0x340,9 alias scsi_hostadapter aha152x

(these options are required to use the card). I have added this to my
/etc/fstab file:

  /dev/sda1 /syext ext2 noauto,user 0 0

Now, what I want to happen is that I just say:

  # mount /syext

and Linux will automatically load the aha152x module with the proper
configuration. But, that's not happening. When the module is not loaded and I
try the above mount command, I get:

  mount: /dev/sda1 is not a valid block device

If I load the module by hand using "insmod 152x", _then_ it all works fine and
I can mount the filesystem on /dev/sda1, use it, whatever.

If I use "modprobe scsi_hostadapter", then the 152x module is also loaded
correctly in that case.

What do I need to do to convince Linux to load that module when I try to mount
/dev/sda1? I thought the kmod daemon (which I do have all that support enabled
in my kernel) was supposed to managte all that; the kernel proper calls the
kmod code to resolve the issu, and it calls modprobe with proper arguments,
and problem solved.

What am I missing here?

--
-------------------------------------------------------------------------------

"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.

-- Jose' Pereira Tel. +351.21.841 9340 DEEC - Dep. of Electrical and Computer
Engineering Fax. +351.21.841 7499 Instituto Superior Tecnico - Technical
University of Lisboa Av. Rovisco Pais - 1049-001 Lisboa - Portugal

 
 
 

Automatically loading SCSI module

Post by José Manuel Sousa Perei » Sun, 21 Jan 2001 07:34:02



  PDS> I have a SCSI card (an old Adaptec 152x) with a SyQuest drive*
  PDS> off of it.  There's nothing else on the SCSI card.

  PDS> I have built my kernel (2.2.18) to include support for this card as a
  PDS> module (aha152x.o).  I have also built SCSI disk support, etc., all as
  PDS> modules.

  PDS> I have added this to my /etc/modules.conf file:

  PDS> options aha152x aha152x=0x340,9
  PDS> alias scsi_hostadapter aha152x

  PDS> (these options are required to use the card).  I have added this to my
  PDS> /etc/fstab file:

  PDS> /dev/sda1 /syext ext2 noauto,user 0 0

I use automount for removables.

  PDS> Now, what I want to happen is that I just say:

  PDS> # mount /syext

  PDS> and Linux will automatically load the aha152x module with the proper
  PDS> configuration.  But, that's not happening.  When the module is not
  PDS> loaded and I try the above mount command, I get:

  PDS> mount: /dev/sda1 is not a valid block device

  PDS> If I load the module by hand using "insmod 152x", _then_ it all works
  PDS> fine and I can mount the filesystem on /dev/sda1, use it, whatever.

Good.

  PDS> If I use "modprobe scsi_hostadapter", then the 152x module is also
  PDS> loaded correctly in that case.

Fair enough.

  PDS> What do I need to do to convince Linux to load that module when I try to
  PDS> mount /dev/sda1?  I thought the kmod daemon (which I do have all that
  PDS> support enabled in my kernel) was supposed to managte all that; the
  PDS> kernel proper calls the kmod code to resolve the issu, and it calls
  PDS> modprobe with proper arguments, and problem solved.

  PDS> What am I missing here?

Something in /etc/modules.conf like:

add below sd_mod aha152x

or, if you have really old modutils:

pre-install sd_mod modprobe -k aha152x

Yes, it's really this simple. Makes one want to bang the head against the
nearest keyboard. ;-)

--
 Jose' Pereira                                          Tel. +351.21.841 9340
 DEEC - Dep. of Electrical and Computer Engineering     Fax. +351.21.841 7499
 Instituto Superior Tecnico - Technical University of Lisboa
 Av. Rovisco Pais - 1049-001 Lisboa - Portugal

 
 
 

1. Can't get ide-scsi module to load automatically

[ RH 6.2, kernel 2.2.17 ]

I followed the instructions in the CD-Writing HOWTO rather closely,
including the setup of /etc/modules.conf, but I can't get my
CD-RW to mount without issuing "/sbin/insmod ide-scsi" by
hand.  Once I do that, I can mount it fine.  Writing also
works.

(There is one point on which I diverged from the instructions --
I didn't enable ramdisk support -- but my kernel's been working
fine without it, using modules e.g. for the NTFS volumes, so
I kind of suspect that's an outdated instruction.)

My CD-RW is Secondary IDE Master.  Here's the relevant
part of my /etc/modules.conf:

  options ide-cd ignore=hdc            # 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

(At least I *think* that's the relevant part -- I don't understand
kernel modules very well, as may be clear already.)

2. INFO-UNIX Digest V3#004

3. IDE-SCSI module corrupts further module loading on 2.5.50

4. Drsquare is forging Linus again Was: Linux rules on the desktop

5. Need to automatically load a module before mounting the disks

6. Adding to the PATH in env

7. aic7xxx module won't automatically load

8. tape backup, firewall and networking problem

9. How To Make Modules Load Automatically???

10. automatically loading modules after upgrading to kernel 2.4.0-test10

11. Automatically load modules?

12. Automatically loading modules at boot time

13. RH5.2: How to load a kernel module automatically