LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-19-2009, 06:27 PM   #1
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Rep: Reputation: 15
Modprobe Query


Hi all, I want to insert these following modules to the kernel so as i do not have to be loading them everytime the linux box reboots.

modprobe nf_conntrack_proto_gre
modprobe nf_nat_proto_gre
modprobe ip_nat_pptp
modprobe ip_conntrack_pptp

I added these modules to /etc/modprobe.d and upon reboot, got a massive amount of errors. When I use to load the modules manually, there was no issue. So it tells me that I have misconfigured when I need to insert the module to be loaded as part of the kernel.

Anyone knows what I 'should' be configuring to get this to work?

Thanks again.
 
Old 02-20-2009, 06:07 AM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
I'm using Ubuntu and on my system /etc/modprobe.d is a directory. I usually put modules that need to be loaded in /etc/modules with just the module name.

On your system is modprobe.d a file? What system do you use?
 
Old 02-22-2009, 04:29 PM   #3
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ajlewis2 View Post
I'm using Ubuntu and on my system /etc/modprobe.d is a directory. I usually put modules that need to be loaded in /etc/modules with just the module name.

On your system is modprobe.d a file? What system do you use?
I use centos 5.2

And yes you are right, modprobe.d is a directory, i also have a file in etc called modprobe.conf

Are you able to tell me how you store these modules in modprobe.d directory?
 
Old 02-22-2009, 04:46 PM   #4
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
Quote:
Originally Posted by GGlinux View Post
Are you able to tell me how you store these modules in modprobe.d directory?
No, I don't know centos. If there is a file /etc/modules, then you can put the module name in that file. But I don't know how centos works; so they may not use that file for loading modules.
 
Old 02-22-2009, 04:50 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You don't store modules there. You create a file with the same entry that would go in modprobe.conf. It doesn't really matter which you do.
e.g.: cat /etc/modprobe.d/nvidia
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660

Debian is probably different. Do you have a file that lists the modules to load at boot time? On SuSE, there is /etc/sysconfig/kernel where you can add the kernel modules to load in a variable. I think that debian may have a similar file.

Manually load the modules and look at them with lsmod and modinfo to see which are prerequisites of the others. I wonder if the order you are loading them is important or if your modprobe.conf entries need to indicate that. Also try running "sudo /sbin/depmod -a" in case that needs updating.
 
Old 02-22-2009, 06:01 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Sorry, I misread. I don't know where I got the idea that you are using debian.

If you look in /lib/modules/$(uname -r)/modules.dep you may see a line such as:
/lib/modules/2.6.27.5-117.fc10.x86_64/kernel/net/netfilter/nf_conntrack_pptp.ko: /lib/modules/2.6.27.5-117.fc10.x86_64/kernel/net/netfilter/nf_conntrack_proto_gre.ko

The dependencies are loaded right to left. If modules.dep isn't up to date it may not have the dependency info and cause errors if modules are loaded in the wrong order. What were the errors you were seeing? Another possibility is if you are missing a needed parameter in the modprobe.conf entry. However, I didn't find any parameters when I used modinfo.

You could try running modprobe with the -nv option. -n (dry run) -v (verbose) to load the modules. Also, what are the error messages you were seeing?
 
Old 02-22-2009, 08:47 PM   #7
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
Sorry, I misread. I don't know where I got the idea that you are using debian.

If you look in /lib/modules/$(uname -r)/modules.dep you may see a line such as:
/lib/modules/2.6.27.5-117.fc10.x86_64/kernel/net/netfilter/nf_conntrack_pptp.ko: /lib/modules/2.6.27.5-117.fc10.x86_64/kernel/net/netfilter/nf_conntrack_proto_gre.ko

The dependencies are loaded right to left. If modules.dep isn't up to date it may not have the dependency info and cause errors if modules are loaded in the wrong order. What were the errors you were seeing? Another possibility is if you are missing a needed parameter in the modprobe.conf entry. However, I didn't find any parameters when I used modinfo.

You could try running modprobe with the -nv option. -n (dry run) -v (verbose) to load the modules. Also, what are the error messages you were seeing?
Thanks ill give that a try!
 
Old 02-23-2009, 11:53 AM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, FreeBSD
Posts: 3,925
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by GGlinux
I want to insert these following modules to the kernel so as i do not have to be loading them everytime the linux box reboots.

modprobe nf_conntrack_proto_gre
modprobe nf_nat_proto_gre
modprobe ip_nat_pptp
modprobe ip_conntrack_pptp
It's not the most elegant approach, but on RHEL / CentOS systems I simply append to /etc/rc.d/rc.local e.g.:
Code:
/sbin/modprobe some_module
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message: modprobe: modprobe: can't locate module nls_iso8859-1 berty800 Linux - Hardware 1 06-06-2008 09:07 AM
modprobe doesn't work; why is modprobe.conf deprecated in slack 12? aquilolumen Slackware 13 08-26-2007 02:05 AM
Making modprobe pcspkr stick with modprobe.preload? gm4jjj Fedora 3 06-16-2004 03:27 AM
modprobe: modprobe: Couldn't locate module nvnet.o/nvaudio.o xiojqwnko Linux - Newbie 2 12-08-2003 05:41 PM
modprobe: modprobe can't locate module ppp0 in redhat 7.1 while shutting down. cyberdude3k Linux - Networking 1 09-08-2003 12:01 PM


All times are GMT -5. The time now is 12:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration