modprobe: FATAL: could not load /lib... at kernel boot
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Rep:
modprobe: FATAL: could not load /lib/.../modules.dep at kernel boot
Hey everyone,
I am busy with an OS course project of creating a kernel module and a system call. The module was easy and got that working fine. But system call means that I had to get the kernel source and recompile... which I got working eventually.
# uname -r
2.6.12-9-386
The kernel source I have is for 2.6.12-9-386, located under /usr/src/ (and linked to as /usr/src/linux).
So I've done the following:
# cd /usr/src/linux
# make config (just chose whatever values it had, and made sure ext2 and ext3 were Y)
# make -C ./
# make bzImage
# cp arch/i386/boot/bzImage /boot/vmlinuz-mykernel
title Ubuntu, kernel 2.6.12-9-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.12-9-386
boot
title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
So when I reboot, and choose the second option (the new kernel) I get lots of...
modprobe: FATAL: Could not load /lib/modules/2.6.12/modulesdep : No such file or directory
... then I get...
DONE.
Begin: Running /scripts/init-premount ...
FATAL: Could not load /lib/modules/2.6.12/modulesdep: No such file or directory
FATAL: Could not load /lib/modules/2.6.12/modulesdep: No such file or directory
DONE.
Begin: Mounting root file system ...
Begin: Running /scripts/local-top ...
DONE.
ALERT! /dev/hda1 does not exist. Dropping to a shell!
... and it goes into a BusyBox v1.00 shell.
So my question is.. whats going on?? Is the compilation right, because I think it is. I know I compiled the FS types into the kernel, not as modules so thats not the problem.
I tried...
# make modules install
# depmod
# depmod -a
# ls /lib/modules/2.6.12/modules.dep
...as well, but same thing happened. If anyone knows how to help... please help!
Thanx,
James
Last edited by jamie_barrow; 08-07-2006 at 10:56 AM.
Begin: Running /scripts/init-premount ...
FATAL: Could not load /lib/modules/2.6.12/modulesdep: No such file or directory
This will sound very stupid, but that is normal behavior for a kernel without module support. After checking that you have module support enabled, you should see if you have the depmod binary in /sbin; if not, try upgrading modutils-depmod.
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Original Poster
Rep:
runnerfrog: I will check again when I go back to university tomorrow. I would think that it is compiled with module support... but will double check. Yes, I tried depmod (and yes it is under /sbin) as said earlier.
masonm: Yeah, that might be the problem. I think I forgot the underscore lol. Well hopefully that is the only problem.
I'll keep you guys updated tomorrow. Thanks for the help.
After your kernel rebuilding process completed smoothly, you are supposed to create a new ramdisk image file for the new kernel. That is usually done in this way:
to your version number. Make sure you type the above command COMPLETELY
Check that you have the new initrd image in your /boot directory. Then, edit your grub config file to make changes (which probably you've already done, but now add a new line "initrd=xxxx". Then run grub-install /dev/hdx if you want to install the grub into the MBR.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.