LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-21-2007, 11:57 AM   #1
naveen_highlander
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Unhappy "FATAL: Module not found error" using modprobe


Hello,

As a newbie, I just started writing simple loadable kernel modules. I am using ubuntu distribution and "2.6.20-15-generic" is the kernel version.
I get the following error when i try to a modprobe to insert my module.

$ sudo /sbin/modprobe print_number_of_memory_nodes_or_banks.ko
FATAL: Module print_number_of_memory_nodes_or_banks.ko not found.

I am running the modprobe command from the same directory in which my module has been compiled.

if i try to insert the module using insmod, I get the following error:
$ sudo insmod print_number_of_memory_nodes_or_banks.ko

insmod: error inserting 'print_number_of_memory_nodes_or_banks.ko': -1 Unknown symbol in module

The source code of this modules is as follows :--
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/mmzone.h>

1 #include <linux/mm.h>
2 #include <linux/sched.h>
3 #include <linux/module.h>
4 #include <linux/delay.h>
5 #include <linux/mmzone.h>
6
7 static int print_memory_banks_or_nodes(void)
8 {
9 pg_data_t *bank = NULL;
10 for_each_online_pgdat(bank)
11 {
12 printk("node_start_pfn: %lu\n", bank->node_start_pfn);
13 printk("node_present_pages: %lu\n", bank->node_present_pages);
14 printk("node_spanned_pages: %lu\n", bank->node_spanned_pages);
15 printk("node_id: %d\n", bank->node_id);
16 }
17 return 0;
18 }
19
20
21 module_init(print_memory_banks_or_nodes);
22
23 MODULE_AUTHOR("Naveen Kumar Singh");
24 MODULE_DESCRIPTION("Print Memory Banks or Nodes Information");
25 MODULE_LICENSE("GPL");



module_init(print_memory_banks_or_nodes);
//module_exit(unload_task_mm);
//module_param(param_pid, int, 0);

MODULE_AUTHOR("Naveen Kumar Singh");
MODULE_DESCRIPTION("Print Memory Banks or Nodes Information");
MODULE_LICENSE("GPL");

The symbol "for_each_online_pgdat" (line # 10) is definitely not being exported by the kernel as it is not present in the /proc/kallsyms file. How do I go about fetching another kernel module which exports the "for_each_online_pgdat" symbol?

Can someone suggest how should I proceed on this?

Thanks in advance.
 
Old 10-22-2007, 08:48 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Compiling and using kernel modules is not the same as compiling c or c++ source code for an application.

In the case of kernel modules, first the kernel has to supply the functionality you want to use via lodable module. Then you configure the kernel to provide that functionality (if not already compiled in), followed by 'make', 'make modules_install' (or something like that; haven't messed with kernels for a long time), and finally '/sbin/depmod -a' which writes the /etc/modules.conf file if I remember correctly.

But then, if the kernel has that functionality, and it's compiled in, then you already have a module (or it's in the kernel) to do it. So it seems you are trying to write a module, but not adding to the kernel code to be able to use that module.
 
Old 01-05-2011, 05:08 AM   #3
rakhiwarriar
LQ Newbie
 
Registered: Jan 2011
Location: Mumbai, India
Distribution: Ubuntu
Posts: 1

Rep: Reputation: 0
Thanks a lot. I was stuck with the same problem. and now its solved!
 
Old 03-19-2011, 12:21 AM   #4
surajmukade
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
Hi..
Will please elaborate the above solution?
I'm facing the same problem while writing a tunnel program using NetFilter..
 
Old 05-15-2011, 05:00 AM   #5
abdika
LQ Newbie
 
Registered: Aug 2010
Location: Indonesia
Distribution: ubuntu 11.04
Posts: 5

Rep: Reputation: 0
module -r not found

Hy, i am newbie too.when i try configure my modem Novatel Wireless, i using that manual when i try to follow intsruction "sudo modprobe –r usbserial"
that reply is FATAL ; module -r not found.

can help me to solve it? i am using ubuntu 11.04.
 
Old 05-16-2011, 01:40 AM   #6
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
modprobe -r should work, make sure you have given a space between -r and the module name. (it does in 10.04)
or try using rmmod "module name"
 
Old 05-07-2013, 01:01 AM   #7
gopkris2000
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
I have received the following errors

root@test [/etc/openvpn]# modprobe -r tun
FATAL: Module tun not found.


Any idea??
 
Old 05-07-2013, 02:29 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by gopkris2000 View Post
I have received the following errors

root@test [/etc/openvpn]# modprobe -r tun
FATAL: Module tun not found.


Any idea??
It would be better to start your own thread & also supply more detail like what OS you are using .
Tun driver should actually load by default.
 
Old 05-07-2013, 02:30 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by gopkris2000 View Post
I have received the following errors

root@test [/etc/openvpn]# modprobe -r tun
FATAL: Module tun not found.


Any idea??
It would be better to start your own thread & also supply more detail like what OS you are using .
Tun driver should actually load by default.
Also provide output of lspci.
 
  


Reply

Tags
insmod, module, symbol, unknown


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
"FATAL: Module ndiswrapper not found" walterbyrd Debian 9 01-05-2008 01:36 PM
"Fatal server error: no screens found" in gentoo andrewshen123 Linux - Distributions 33 01-21-2007 05:57 PM
Fatal "modprobe" error with nvidia drivers in Gentoo Penguin of Wonder Linux - Hardware 11 01-11-2006 04:16 PM
ADSL modem and "FATAL: module usbcore not found" popero Linux - Hardware 4 06-04-2004 07:59 PM
Driver "nvidia" causes Fatal Error: no screens found Gamezace Linux - Newbie 3 04-19-2004 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 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
Open Source Consulting | Domain Registration