LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2006, 11:07 AM   #1
Frenchyp
LQ Newbie
 
Registered: Jan 2006
Location: Seattle
Distribution: debian 3.1 unstable/xfce4
Posts: 12

Rep: Reputation: 0
Yet Another Module Question


Hi,

I m trying to unload some of my numerous running modules:

Code:
pierre@debian:~$ lsmod
Module                  Size  Used by
autofs4                18052  1
thermal                12944  0
fan                     4236  0
button                  6680  0
processor              17584  1 thermal
ac                      5132  0
battery                 9740  0
ipv6                  229892  6
af_packet              20872  2
ipt_state               2304  18
ipt_REJECT              6528  4
ipt_limit               2688  6
ipt_LOG                 6272  6
ip_conntrack_ftp       72240  0
ip_conntrack           32908  2 ipt_state,ip_conntrack_ftp
iptable_filter          3072  1
ip_tables              16896  5 ipt_state,ipt_REJECT,ipt_limit,ipt_LOG,iptable_filter
eth1394                19976  0
pcspkr                  3816  0
ohci1394               32004  0
ieee1394              100408  2 eth1394,ohci1394
snd_intel8x0           33068  0
snd_ac97_codec         59268  1 snd_intel8x0
snd_pcm_oss            48168  0
snd_mixer_oss          16640  1 snd_pcm_oss
snd_pcm                85384  2 snd_intel8x0,snd_pcm_oss
snd_timer              23300  1 snd_pcm
snd_page_alloc         11144  2 snd_intel8x0,snd_pcm
gameport                4736  1 snd_intel8x0
snd_mpu401_uart         7296  1 snd_intel8x0
snd_rawmidi            23204  1 snd_mpu401_uart
snd_seq_device          7944  1 snd_rawmidi
snd                    50660  9 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               9824  1 snd
pci_hotplug            30640  0
intel_agp              20512  1
agpgart                31784  1 intel_agp
ehci_hcd               27908  0
uhci_hcd               29328  0
usbcore               104164  4 ehci_hcd,uhci_hcd
b44                    19972  0
mii                     4864  1 b44
yenta_socket           19200  0
pcmcia_core            63028  1 yenta_socket
hw_random               5652  0
capability              4872  0
commoncap               7168  1 capability
joydev                  9536  0
mousedev                9996  1
evdev                   9088  0
p4_clockmod             5000  0
tsdev                   7168  0
speedstep_lib           4356  1 p4_clockmod
freq_table              4356  1 p4_clockmod
cpufreq_userspace       5336  2
psmouse                17800  0
ide_cd                 38176  0
cdrom                  35740  1 ide_cd
genrtc                  9332  0
reiserfs              209872  3
ext3                  109544  0
jbd                    54552  1 ext3
ide_generic             1664  0
ide_disk               16768  5
piix                   12448  1
ide_core              125028  4 ide_cd,ide_generic,ide_disk,piix
unix                   26036  125
font                    8576  0
vesafb                  6688  0
cfbcopyarea             3840  1 vesafb
cfbimgblt               3200  1 vesafb
cfbfillrect             3712  1 vesafb
First of all, I can't make depmod work:

Code:
pierre@debian:~$ su
Password:
debian:/home/pierre# depmod gameport
WARNING: Can't read module gameport: No such file or directory
debian:/home/pierre# depmod joydev
WARNING: Can't read module joydev: No such file or directory
debian:/home/pierre#
/etc/modules contains some of the modules I want to load:

Code:
debian:/home/pierre# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line.  Comments begin with
# a "#", and everything on the line after them are ignored.

ide-cd
ide-disk
ide-generic
psmouse
cpufreq-userspace
p4-clockmod
This is the head of my /etc/modules.conf:

Code:
### This file is automatically generated by update-modules
#
# Please do not edit this file directly. If you want to change or add
# anything please take a look at the files in /etc/modutils and read
# the manpage for update-modules.
#
### update-modules: start processing /etc/modutils/0keep
# DO NOT MODIFY THIS FILE!
# This file is not marked as conffile to make sure if you upgrade modutils
# it will be restored in case some modifications have been made.
The update-modules man page says that the function is obsolete and runs update-modules.modutils
The update-modules.modutils man page says that it generates the /etc/modules.conf from the files in /etc/modutils/

Here is my /etc/modutils/:

Code:
debian:/home/pierre# ls /etc/modutils/
total 44
-rw-r--r-- 1 root root  432 2004-12-19 02:40 0keep
-rw-r--r-- 1 root root  254 2005-04-20 23:21 actions
-rw-r--r-- 1 root root 4178 2005-04-20 23:21 aliases
-rw-r--r-- 1 root root 8265 2005-02-24 14:59 alsa-base
-rw-r--r-- 1 root root   97 2005-03-31 12:55 apm
drwxr-xr-x 2 root root  392 2006-01-09 12:01 arch
-rw-r--r-- 1 root root   28 2005-09-12 00:55 i2c
lrwxrwxrwx 1 root root   41 2006-01-09 16:13 linux-sound-base_noOSS -> /lib/linux-sound-base/noOSS.modutils.conf
-rw-r--r-- 1 root root  303 2006-01-09 09:37 lirc
-rw-r--r-- 1 root root  139 2004-12-19 02:40 paths
debian:/home/pierre#
I ran the update-modules command and restarted my computer, and none of my modules would get loaded.
From tty1 I ran update-modules.modutils and update-modules again, and restarted my computer and everything was back to normal.

I have a debian sarge upgraded to unstable with the default kernel

Question:
What should I do/read?

Thanks for your help
 
Old 01-17-2006, 12:22 PM   #2
Zeistler
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 108

Rep: Reputation: 15
It is usually better to use the command mobprobe when dealing with modules since it not only adds or removes the module itself but also the modules it depends on. You use it like this:

add module: modprobe modulename
remove module: modprobe -r modulename

You can only remove modules that no program or system is currently using.
 
Old 01-17-2006, 12:41 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,664

Rep: Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439Reputation: 2439
Furthermore, the system will usually sweep through memory and unload modules on its own.
 
Old 01-18-2006, 02:44 AM   #4
Frenchyp
LQ Newbie
 
Registered: Jan 2006
Location: Seattle
Distribution: debian 3.1 unstable/xfce4
Posts: 12

Original Poster
Rep: Reputation: 0
Got it, thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on USB module satimis Linux From Scratch 4 09-12-2005 07:29 PM
dumb module question... Keithjr Linux - Newbie 6 06-28-2005 10:40 PM
vmware, and a module question. Kjetil4455 Slackware 9 12-03-2003 10:00 AM
module question wr3ck3d Slackware 2 02-27-2003 11:28 AM
Modem Module Question Tuzinor Linux - General 1 12-22-2002 04:56 AM


All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration