Re: loading module on boot
Magnus Therning <magnus@therning.org> writes:
> On Thu, Jun 08, 2006 at 23:18:39 -0400, David Zelinsky wrote:
> >I can't get ide-cd to load automatically on boot. I put it in
> >/dev/modules-2.6 and the boot messages say it's being loaded, but when
> >I log in and run lsmod it's not there, and udev hasn't made /dev/hdc.
> >Just for yucks I also tried it in /etc/modules, but that wasn't any
> >better (I don't think /etc/modules is used when I boot the 2.6 kernel).
> >
> >When I run 'modprobe ide-cd' manually, everything works fine.
> >
> >What am I doing wrong?
>
> /dev/modules-2.6?? What's that?
>
> Try adding it to /etc/modules instead.
In /etc/init.d/modules-init-tools I find the following:
KVER=$(uname -r)
KMAJ=${KVER%${KVER#*.*[^.]}}
KMAJ=${KMAJ%.}
if [ -e /etc/modules-$KVER ]; then
MODULES_FILE=/etc/modules-$KVER
elif [ -e /etc/modules-$KMAJ ]; then
MODULES_FILE=/etc/modules-$KMAJ
else
MODULES_FILE=/etc/modules
fi
This says that if /etc/modules-2.6 exists it is read instead of
/etc/modules when booting a 2.6 kernel.
But as I mentioned in my first post, I did try putting ide-cd in
/etc/modules anyway, and as expected that didn't work either.
The ide-cd entry in /etc/modules-2.6 _is_ getting read, because it
prints something in the boot messages saying it's loading ide-cd. But
either the load is failing for some reason, or it's getting unloaded
by some other script.
-David
Reply to: