modprobe kmod kerneld and conf.modules

modprobe kmod kerneld and conf.modules

Post by David Forres » Sun, 20 Jun 1999 04:00:00



Dear Sir or Madam,
  I've looked around a while for info on how to make
kerneld or modprobe do things, and it seems like it should be able
to call in the proper modules when 'something' is referenced.
Is there a nice way to figure out what the something is?
My specific problem is a Memorex CRW-1622 on /dev/hdd
I'm setting it up using the stuff in the
http://www.veryComputer.com/
on my
new 2.3.6 kernel.  Since the howto recommends setting it up as a
ide-scsi generic device, I needed a bunch of modules:
My rc.modules file has:
# SCSI kernel support:
/sbin/modprobe ide-scsi   # ide-scsi emulation
/sbin/modprobe scsi_mod  # scsi support
#/sbin/modprobe scsi_syms
/sbin/modprobe sd_mod     # scsi disks
/sbin/modprobe sg         # scsi generic (cd-writing)
/sbin/modprobe sr_mod     # scsi - cd-rom
#/sbin/modprobe st        # tape

Now, I am wonder if since:
ls -la /dev/sda1 /dev/sga /dev/cdrom /dev/cdwriter
gives:
lrwxrwxrwx   1 root     root            4 Jun 19 02:32 /dev/cdrom -> scd0
lrwxrwxrwx   1 root     root            3 Jun 19 02:33 /dev/cdwriter -> sga
brw-r-----   1 root     disk       8,   1 Apr 29  1995 /dev/sda1
crw-------   1 root     sys       21,   0 Jun 19 02:11 /dev/sga

shouldnt kerneld or kmod be able to do the module loading based on the
major numbers?
 If I do a 'modprobe -c' I get:
...
alias char-major-21 sg
alias block-major-8 sd_mod
alias iso9660 isofs
...

In other words, if I put a cd in the drive, and try a:
mount -t iso9660 /dev/cdrom /cd

The kernel knows it needs iso9660, and the major device 8, why does it not
load in these modules?

I'd like to use the /etc/conf.modules rather than the rc.modules script,
but I cannot find any good info on how its working.

Dave--

 (804)-979-8634             http://www.veryComputer.com/.*ia.edu/~drf5n/

------------------  Posted via SearchLinux  ------------------
                  http://www.veryComputer.com/

 
 
 

modprobe kmod kerneld and conf.modules

Post by David Forres » Mon, 21 Jun 1999 04:00:00


Apologies, I solved my own problems.

0) rtfm: http://www.veryComputer.com/

1) kerneld was not loaded properly in my new install of slackware 4.0, and
I enabled it by uncommenting the kerneld stuff in /etc/rc.d/rc.modules

2) I now have this in /etc/conf.modules:
alias scd0 sr_mod
alias scsi_hostadapter ide-scsi
alias eth0 ne
options ne io=0x300

I also needed "hdc=ide-scsi" as a booting command line
(I use lilo and have
  append = "hdc=ide-scsi"
in /etc/lilo.conf)

Which makes mount /cdrom work well with the symbolic links shown below.
If you are experimenting with modules, learn the commands
'lsmod'
'modprobe -v <module-name>'
'modprobe -r <module-name>'
'rmmod -a'

I moved from kerneld to kmod and now have only the following in my
/etc/rc.d/rc.modules

### Update module dependencies ###
echo "Updating module dependencies for Linux `uname -r`:"
/sbin/depmod -a

### kerneld & kmod ###
# Automatic module loading.  To load and unload kernel modules
# automatically as needed, uncomment the lines below to run kerneld.
# In some cases, you'll need to create aliases to load the correct
# module. For more information, see the docs in /usr/doc/modules.
# and http://www.veryComputer.com/
if [ -x /sbin/kerneld ]; then
  if [ -f /proc/sys/kernel/modprobe ] ; then
     echo "kmod is running"
     echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
  else
     if /sbin/kerneld ; then echo "kerneld is running" ; fi
  fi
fi

Note:
If you have a bunch of unresolved symbols during bootup, and have done
several different kernel recompiles, try a 'make clean' and 'make mrproper'
moving your /lib/modules/x.x.x/ aside before doing the make
modules_install.  'make modules_install' copies those modules present in
the compilation tree to the /lib/modules/x.x.x/ directory, but (wisely)
does not eliminate modules laready there.  'depmod -a' looks through these
and finds modules that don't quite match and prints errors.

Note 2:
  try using:
     cd /usr/src/linux
     grep -r request_module *
to find places where the kernel comes up with the module names that it
passes to /sbin/modprobe and what might need aliases in /etc/conf.modules

Irrelevant note, but anyway:
  Check out the software at http://www.veryComputer.com/
machine inside a linux window.  You can install and run windows inside a X
window, and use samba to share your files.  It really really cool.

Dave


> Dear Sir or Madam,
>   I've looked around a while for info on how to make
> kerneld or modprobe do things, and it seems like it should be able
> to call in the proper modules when 'something' is referenced.
> Is there a nice way to figure out what the something is?
> My specific problem is a Memorex CRW-1622 on /dev/hdd
> I'm setting it up using the stuff in the
> http://www.veryComputer.com/
> on my
> new 2.3.6 kernel.  Since the howto recommends setting it up as a
> ide-scsi generic device, I needed a bunch of modules:
> My rc.modules file has:
> # SCSI kernel support:
> /sbin/modprobe ide-scsi   # ide-scsi emulation
> /sbin/modprobe scsi_mod  # scsi support
> #/sbin/modprobe scsi_syms
> /sbin/modprobe sd_mod     # scsi disks
> /sbin/modprobe sg         # scsi generic (cd-writing)
> /sbin/modprobe sr_mod     # scsi - cd-rom
> #/sbin/modprobe st        # tape

> Now, I am wonder if since:
> ls -la /dev/sda1 /dev/sga /dev/cdrom /dev/cdwriter
> gives:
> lrwxrwxrwx   1 root     root            4 Jun 19 02:32 /dev/cdrom -> scd0
> lrwxrwxrwx   1 root     root            3 Jun 19 02:33 /dev/cdwriter ->
sga
> brw-r-----   1 root     disk       8,   1 Apr 29  1995 /dev/sda1
> crw-------   1 root     sys       21,   0 Jun 19 02:11 /dev/sga

> shouldnt kerneld or kmod be able to do the module loading based on the
> major numbers?
>  If I do a 'modprobe -c' I get:
> ...
> alias char-major-21 sg
> alias block-major-8 sd_mod
> alias iso9660 isofs
> ...

> In other words, if I put a cd in the drive, and try a:
> mount -t iso9660 /dev/cdrom /cd

> The kernel knows it needs iso9660, and the major device 8, why does it
not
> load in these modules?

> I'd like to use the /etc/conf.modules rather than the rc.modules script,
> but I cannot find any good info on how its working.

> Dave--

>  (804)-979-8634             http://www.veryComputer.com/.*ia.edu/~drf5n/

> ------------------  Posted via SearchLinux  ------------------
>                   http://www.veryComputer.com/

------------------  Posted via SearchLinux  ------------------
                  http://www.veryComputer.com/

 
 
 

1. kerneld and kmod (was: kmod and modules...)

   what kind of machine/distribution you have? I suppose there is
   no need for you to worry about how to manually load ppp_deflate
   as an module, because if you have machine configured correctly,
   either kerneld or kmod will automatically calls modprobe and
   load/unload whatever module(s) on as need basis.

   regards.

--

                                      ("\''/").___..--''"`-._
                          \           `9_ 9  )   `-.  (     ).`-.__.`)
                           \ /\       (_Y_.)'  ._   )  `._ `. ``-..-'

                         .( o ).   (il).-''  ((i).'  ((!.-'

2. PPPd dies

3. kmod, kerneld and /proc/sys/kernel/modprobe

4. 202Mg HD...How much does DOS really need?

5. kmod, modprobe and kerneld 2.2.14

6. mail program for shell scripts+smtp server

7. kerneld and modprobe not loading modules

8. java_g coredump when using jb6/jb7+linux 7.1 emulator under FreeBSD

9. conf.modules vs. modules.conf & modules.dep??

10. my NE2000 loads with modprobe but not with conf.modules at boot ?!

11. modprobe - /etc/modules.conf

12. Newbie Question: modprobe and lspci and /etc/module.conf

13. modprobe - /etc/modules.conf