LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   modprobe: FATAL: Could not load.....modules.dep (https://www.linuxquestions.org/questions/linux-newbie-8/modprobe-fatal-could-not-load-modules-dep-677078/)

anuj.d@tcs.com 10-17-2008 08:57 AM

modprobe: FATAL: Could not load.....modules.dep
 
During the boot with my new upgraded kernel I get these messages 2 times

modprobe: FATAL: Could not load /lib/modules/2.6.14-pne/modules.dep: No such file or directory

After that, the system boots fine and everything works normally.

I just want to know why this error comes , and how can I resolve it?

bathory 10-17-2008 09:29 AM

Run
Code:

depmod -a
to create the missing modules.dep.
The error is most likely produced by a startup script trying to find if there are any new modules installed.

anuj.d@tcs.com 10-17-2008 09:57 AM

Quote:

Originally Posted by bathory (Post 3313464)
Run
Code:

depmod -a
to create the missing modules.dep.
The error is most likely produced by a startup script trying to find if there are any new modules installed.


After booting have checked the file modules.dep at required location, the file(modules.dep)is already exist there.

I have done some investigation here but not sure it is right or not;

modules.dep file is created by rc.modules at run time using code

# If the modules.dep file does not exist, generate it in the default
# location.
if test ! -f ${MODULES_DEP}; then
/sbin/depmod
fi
fi

in next step rc.modules execces this modules.dep file in loading modules.

# Load modules in /etc/modules
if test -f /etc/modules; then
modules=`grep -E "^[[:alnum:]][[: print:]]+$" /etc/modules`
for mod in ${modules}; do
/sbin/modprobe ${mod}
done
fi

can it possible that /sbin/modprobe trying to access this modules.dep file before succesfully executing /sbin/depmod ?

bathory 10-18-2008 08:56 AM

Quote:

can it possible that /sbin/modprobe trying to access this modules.dep file before succesfully executing /sbin/depmod ?
First of all modules.dep should always exist and second the commands in shell scripts are executed in the order they are encountered. Maybe the grep command in the modprobe part gives wrong output. What gives:
Code:

uname -r

anuj.d@tcs.com 10-20-2008 07:27 AM

Quote:

Originally Posted by bathory (Post 3314554)
First of all modules.dep should always exist and second the commands in shell scripts are executed in the order they are encountered. Maybe the grep command in the modprobe part gives wrong output. What gives:
Code:

uname -r

Have executed manually 'grep -E "^[[:alnum:]][[:print:]]+$" /etc/modules' it is working fine but here it is showing nothing because all modules in /etc/modules are commnted.

cat /etc/modules
#e1000
#ipv6
#ip_tables
#ip6_tables
#uhci-hcd
#280fbs
#mtdchar

the output for the 'uname' -r is '2.6.14-pne'.

bathory 10-20-2008 07:46 AM

So what modules are loaded at boot time? What gives?
Code:

lsmod
Put a echo before the modprobe command to see which module fails:
Code:

if test -f /etc/modules; then
modules=`grep -E "^[[:alnum:]][[: print:]]+$" /etc/modules`
for mod in ${modules}; do
echo ${mod}
/sbin/modprobe ${mod}
done
fi


anuj.d@tcs.com 10-21-2008 09:02 AM

Quote:

Originally Posted by bathory (Post 3316454)
So what modules are loaded at boot time? What gives?
Code:

lsmod
Put a echo before the modprobe command to see which module fails:
Code:

if test -f /etc/modules; then
modules=`grep -E "^[[:alnum:]][[: print:]]+$" /etc/modules`
for mod in ${modules}; do
echo ${mod}
/sbin/modprobe ${mod}
done
fi



I have introduce some print logs in rc.modules and found that error comes before executing rc.modules.

below are the logs for the same

Unmounting /sys
Unmounting /proc
mounting FS type proc on /proc
Unmounting /proc
mounting FS type selinuxfs on /selinux/
modprobe: FATAL: Could not load /lib/modules/2.6.14-pne/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.14-pne/modules.dep: No such file or directory


INIT: version 2.85 booting
mounting FS type proc on /proc
mounting FS type sysfs on /sys
Entring in rc.modules
Creating modules.dep
File has been Created
I am going to show the modules.dep file
cat /lib/modules/2.6.14-pne/modules.dep
Loading, please wait...
Modules loaded

mounting FS type tmpfs on /dev
mounting FS type tmpfs on /dev/shm
Starting hardware event daemon:[ OK ]
Creating initial udev device nodes:[ OK ]
Exit from rc.modules

anuj.d@tcs.com 10-21-2008 09:05 AM

Nullxxxxxxxx

anuj.d@tcs.com 10-21-2008 09:06 AM

Is there any script wchich access modules.dep before executing rc.modules at boot time?

anuj.d@tcs.com 10-21-2008 09:16 AM

Quote:

Originally Posted by bathory (Post 3316454)
So what modules are loaded at boot time? What gives?
Code:

lsmod
[/CODE]

output of 'lsmode' is :-
Module Size Used by
softdog 7188 0
tipc 194664 58
pmemfs 26028 1
linux_user_bde 18892 0
linux_kernel_bde 27512 1 linux_user_bde
fault 35036 0
vmc 76096 2 fault,[permanent]
ipmibus 5760 1 vmc
ipmi_si 40400 3
ipmi_devintf 9960 6
ipmi_msghandler 57404 3 vmc,ipmi_si,ipmi_devintf

bathory 10-21-2008 09:26 AM

Quote:

Unmounting /proc
mounting FS type proc on /proc
Unmounting /proc
mounting FS type selinuxfs on /selinux/
modprobe: FATAL: Could not load /lib/modules/2.6.14-pne/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.14-pne/modules.dep: No such file or directory

INIT: version 2.85 booting
mounting FS type proc on /proc
So that is because of unmounting /proc before loading modules, so /proc/modules cannot be created. Find where (and why) /proc is unnmounting for 2nd time.


All times are GMT -5. The time now is 07:56 PM.