| Linux - Kernel This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-07-2006, 10:27 AM
|
#1
|
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
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
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
Last edited by jamie_barrow; 08-07-2006 at 10:56 AM.
|
|
|
|
08-07-2006, 11:07 AM
|
#2
|
|
Member
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217
Rep:
|
Look at this:
Quote:
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.
|
|
|
|
08-07-2006, 11:15 AM
|
#3
|
|
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,244
Rep:
|
Looks like you forgot to actually install the modules. When you compiled the kernel did you do a "make modules_install" ?
|
|
|
|
08-07-2006, 01:16 PM
|
#4
|
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
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.
|
|
|
|
08-08-2006, 05:21 AM
|
#5
|
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Original Poster
Rep:
|
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.
|
|
|
|
08-10-2006, 09:42 AM
|
#6
|
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Original Poster
Rep:
|
well... the hard drive fricken crashed so I'm starting again 
|
|
|
|
08-25-2006, 08:41 AM
|
#7
|
|
LQ Newbie
Registered: Aug 2006
Posts: 1
Rep:
|
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 /boot
#mkinitrd -o /boot/initrd-img.2.6.16.18 2.6.16.18
change the 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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:26 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|