According to Paul Rogers: While burning my CPU.
>
> Dear All
>
> I have recently upgraded my kernel from 2.0.34 to 2.0.36 (Redhat 5.1). I
> had hoped to be able to automatically load modules with kerneld.
> However on start up I get the following:
>
> Finding module dependencies....can't open /lib/modules/preferred
> /modules.dep
> done
> Starting kerneld, version 2.1.85 (pid 51)
>
> If I check with ps -aux kernel d does indeed appear to be running as PID
> 51.
>
> I checked /lib/modules and there is no "preferred" directory. Also
> while there is a modules.dep file in /lib/modules/2.0.34 there isn't one
> in /lib/modules/2.0.36.
>
> I never got this error message when 2.0.34 was running(which was the
> original install from the Redhat CD), but I don't know if kerneld was
> running then.
>
> How do I fix this? Is it as simple as creating the preferred directory
> and then copying modules.dep from 2.0.34 or does modules dep need to be
> created/configured by some program?
No because the symbolic link gets deleted and recreated at bootime.
>
> This problem also occurred when I went from 2.0.34(Original install) to
> 2.0.35 on another machine. What am I doing wrong?? I did all the
> necessary makes etc while compiling the kernel.
If you did make modules make modules_install then one would think all would
be ok, so let me explain what happens when redhat boots.
Instructions are read from a file called /etc/rc.d/rc.sysinit, in this file
there is a small piece of bash scripting which looks at what kernel version
is being booted, ( /proc/cmdline ) just before that /lib/modules/preferred
is deleted, now the script looks at which version is being booted and
creates a new "symlink" called preferred in /lib/modules pointing to the
kernel version number being booted. (In this case 2.0.36)
Now obviously something is going wrong on your system, i presume you
installed the new kernel as per /usr/src/linux/README and have rerun lilo.
I remember a while ago someone else was having trouble and sent me the
relavant lines of his script from /etc/rc.d/rc.sysinit, if i remember
correctly there was a line missing, how it was deleted or got corrupted i
dont know.
What you can do to see what is going on is edit /etc/rc.d/rc.sysinit (make a
backup copy first), comment out the following lines.
(Your verion may be a little different to what is written here).
rm -f /lib/modules/preferred
if [ -n $USEMODULES ]; then
set `cat /proc/cmdline`
while [ $# -gt 0 ]; do
if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then
image=`echo $1 | awk -F= '{ print $2 }'`
kernelfile=`/sbin/lilo -I $image`
if [ -n "$kernelfile" ]; then
kernelname=`echo $kernelfile | awk -F- '{ print $1 }'`
versioninfo=`echo $kernelfile | sed "s|${kernelname}-||"`
if [ "$kernelname" = "/boot/vmlinuz" -a \
-d /lib/modules/$versioninfo -a \
$versioninfo != `uname -r` ]; then
ln -sf $versioninfo /lib/modules/preferred
fi
fi
fi
shift
done
fi
if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
# Get ready for kerneld if module support in the kernel
echo -n "Finding module dependencies... "
if [ -f /lib/modules/preferred ]; then
depmod -a preferred
else
depmod -a preferred
fi
echo "done"
fi
Now add the following.
if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
# Get ready for kerneld if module support in the kernel
echo -n "Finding module dependencies"
depmod -a
echo ""
fi
if [ -x /sbin/kerneld -a -n "$USEMODULES" ]; then
/sbin/kerneld
fi
Note;;
It will only work if, you have followed ALL the instructions from
/usr/src/linux/README.
You could also create a symlink yourself in /lib/modules with;
ln -s 2.0.36 preferred
and comment out the line in /etc/rc.d/rc.sysinit which deletes the symlink;
rm -f /lib/modules/preferred
Considering the rest of the script does not create any symlink like it
should i cant see that it could do any harm.
>
> Any help would be greatly appreciated.
>
>
>
> Paul
>
--
Regards Richard.
[EMAIL PROTECTED]