![]() |
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 Then I editted /boot/grub/menu.lst to this: default 0 timeout 30 color cyan/blue white/blue title Ubuntu, kernel 2.6.12-9-386 root (hd0,0) kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda1 ro quiet splash initrd /boot/initrd.img-2.6.12-9-386 savedefault boot title Honours kernel 2.6.12-9-386.hons root (hd0,0) kernel /boot/vmlinuz-mykernel root=/dev/hda1 ro initrd /boot/initrd.img-2.6.12-9-386 boot 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 |
Look at this:
Quote:
|
Looks like you forgot to actually install the modules. When you compiled the kernel did you do a "make modules_install" ?
|
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 :D lol. Well hopefully that is the only problem. I'll keep you guys updated tomorrow. Thanks for the help. |
Hey. My .config file has CONFIG_MODULES=y
After trying # make modules_install, I get this printed out to the screen: if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.12; fi I do have /sbin/depmod, and I have run it. I will try updating depmod and see what happens. |
well... the hard drive fricken crashed so I'm starting again :(
|
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:
Code:
#cd /bootCode:
2.6.16.18Check 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. |
| All times are GMT -5. The time now is 11:12 AM. |