Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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>
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.