I want to load my kernel module hello.ko
on boot in Ubuntu 12.04. I placed it in /lib/modules/3.8.0-31-generic/kernel/ubuntu/hello.ko
, ran depmod -a
, and added "hello" to /etc/modules
.
However, when I restart, there is no "hello" module in lsmod
. In /var/log/upstart/module-init-tools.log
there is a string "FATAL: Module hello not found."
If I run modprobe hello
everything is fine. What's wrong with /etc/modules
? Where is it trying to find modules?
Best Answer
Run
sudo update-initramfs -u
to get your module in the initial ramdisk for the current kernel. Otherwise it will not load on init.