LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-07-2006, 10:27 AM   #1
jamie_barrow
Member
 
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107

Rep: Reputation: 15
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.
 
Old 08-07-2006, 11:07 AM   #2
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
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.
 
Old 08-07-2006, 11:15 AM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Looks like you forgot to actually install the modules. When you compiled the kernel did you do a "make modules_install" ?
 
Old 08-07-2006, 01:16 PM   #4
jamie_barrow
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: Reputation: 15
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.
 
Old 08-08-2006, 05:21 AM   #5
jamie_barrow
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: Reputation: 15
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.
 
Old 08-10-2006, 09:42 AM   #6
jamie_barrow
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: Reputation: 15
well... the hard drive fricken crashed so I'm starting again
 
Old 08-25-2006, 08:41 AM   #7
quchenxy
LQ Newbie
 
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
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
Code:
2.6.16.18
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.
 
  


Reply

Tags
kernel, modprobe



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modprobe: FATAL: Could not load /lib/modules/.../modules.dep Ankardo Debian 9 02-01-2011 05:09 PM
FATAL: Could not load /lib/modules/2.6.14-default/modules.dep no such file exist dr_zayus69 Linux - Software 3 12-26-2005 06:44 PM
Fatal: Kernel /boot/vmlinuz-2.6.8.1 is too big Ph0enix2003 Mandriva 2 09-04-2004 09:41 PM
where to set up "modprobe 3c59x" to load nic driver on boot? zero79 Debian 3 04-15-2004 03:42 PM
FATAL: could not load /lib/modules/2.6.1/modules.dep Fr33B33R Slackware 3 01-12-2004 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration