old-www/HOWTO/Kerneld/commonproblems.html

1007 lines
19 KiB
HTML

<HTML
><HEAD
><TITLE
>Common problems and things that make you wonder</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Linux kerneld mini-HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Special kerneld uses"
HREF="goodies.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux kerneld mini-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="goodies.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
>&nbsp;</TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="COMMONPROBLEMS"
>Common problems and things that make you wonder</A
></H1
><DIV
CLASS="QANDASET"
><DL
><DT
>1. <A
HREF="commonproblems.html#AEN381"
>Why do I get <SPAN
CLASS="ERRORNAME"
>Cannot locate module for
net-pf-</SPAN
><TT
CLASS="VARNAME"
>X</TT
> messages when I
run <B
CLASS="COMMAND"
>/sbin/ifconfig</B
>?</A
></DT
><DT
>2. <A
HREF="commonproblems.html#AEN398"
>After starting kerneld, my system slows to a crawl
when I activate my ppp-connection</A
></DT
><DT
>3. <A
HREF="commonproblems.html#AEN410"
>kerneld does not load my SCSI driver!</A
></DT
><DT
>4. <A
HREF="commonproblems.html#AEN418"
>modprobe complains about
<SPAN
CLASS="ERRORNAME"
>gcc2_compiled</SPAN
> being
undefined</A
></DT
><DT
>5. <A
HREF="commonproblems.html#AEN424"
>My sound driver keeps forgetting its settings for
volume etc</A
></DT
><DT
>6. <A
HREF="commonproblems.html#AEN432"
>DOSEMU needs some modules; how can I get kerneld to
load those ?</A
></DT
><DT
>7. <A
HREF="commonproblems.html#AEN437"
>Why do I get <SPAN
CLASS="ERRORNAME"
>Ouch, kerneld timed out,
message failed</SPAN
> messages ?</A
></DT
><DT
>8. <A
HREF="commonproblems.html#AEN449"
>Mount doesn't wait for kerneld to load the
filesystem module</A
></DT
><DT
>9. <A
HREF="commonproblems.html#AEN455"
>kerneld fails to load the <TT
CLASS="LITERAL"
>ncpfs</TT
>
module</A
></DT
><DT
>10. <A
HREF="commonproblems.html#AEN464"
>kerneld fails to load the <TT
CLASS="FILENAME"
>smbfs</TT
>
module</A
></DT
><DT
>11. <A
HREF="commonproblems.html#AEN472"
>I built everything as modules, and now my system
cannot boot or kerneld fails to load the root filesystem
module!</A
></DT
><DT
>12. <A
HREF="commonproblems.html#AEN488"
>kerneld will not load at boot time; it complains
about libgdbm</A
></DT
><DT
>13. <A
HREF="commonproblems.html#AEN498"
>I get Cannot load module <TT
CLASS="VARNAME"
>xxx</TT
> but
I just reconfigured my kernel without
<TT
CLASS="VARNAME"
>xxx</TT
> support!</A
></DT
><DT
>14. <A
HREF="commonproblems.html#AEN507"
>I rebuilt my kernel and modules, and still get
messages about unresolved symbols when
booting</A
></DT
><DT
>15. <A
HREF="commonproblems.html#AEN516"
>I installed Linux 2.1/2.3 and now I cannot
load <I
CLASS="EMPHASIS"
>any</I
> modules!</A
></DT
><DT
>16. <A
HREF="commonproblems.html#AEN532"
>What about dial-on-demand networking?</A
></DT
></DL
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN381"
></A
><B
>1. </B
>Why do I get <SPAN
CLASS="ERRORNAME"
>Cannot locate module for
net-pf-</SPAN
><TT
CLASS="VARNAME"
>X</TT
> messages when I
run <B
CLASS="COMMAND"
>/sbin/ifconfig</B
>?</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>Around kernel version 1.3.80, the networking code
was changed to allow loading protocol families (e.g. IPX,
AX.25 and AppleTalk) as modules. This caused the addition
of a new kerneld request:
<TT
CLASS="LITERAL"
>net-pf-</TT
><TT
CLASS="VARNAME"
>X</TT
>, where
<TT
CLASS="VARNAME"
>X</TT
> is a number identifying the protocol
(see
<TT
CLASS="FILENAME"
>/usr/src/linux/include/linux/socket.h</TT
>
for the meaning of the various numbers). Unfortunately,
<B
CLASS="COMMAND"
>ifconfig</B
> accidentally triggers these
messages, so a lot of people get a couple of messages
logged when the system boots and it runs
<B
CLASS="COMMAND"
>ifconfig</B
> to setup the loopback
device. The messages are harmless, and you can disable
them by adding the lines</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
> alias net-pf-3 off # Forget AX.25
alias net-pf-4 off # Forget IPX
alias net-pf-5 off # Forget AppleTalk</PRE
></TD
></TR
></TABLE
><P
>to <TT
CLASS="FILENAME"
>/etc/conf.modules</TT
>. Of
course, if you do use IPX as a module, you should not add
a line to disable IPX. </P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN398"
></A
><B
>2. </B
>After starting kerneld, my system slows to a crawl
when I activate my ppp-connection</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>There have been a couple of reports of this. It
seems to be an unfortunate interaction between kerneld and
the <SPAN
CLASS="PRODUCTNAME"
>tkPPP</SPAN
> script that is used
on some systems to setup and monitor the PPP
connection. The script apparently runs loops while running
<B
CLASS="COMMAND"
>ifconfig</B
>. This triggers kerneld, to
look for the
<TT
CLASS="LITERAL"
>net-pf-</TT
><TT
CLASS="VARNAME"
>X</TT
> modules
(see above), keeping the system load high and possibly
pouring lots of Cannot locate module for
<TT
CLASS="LITERAL"
>net-pf-</TT
><TT
CLASS="VARNAME"
>X</TT
> messages
into the system log. There is no known workaround, other
than not use <SPAN
CLASS="PRODUCTNAME"
>tkPPP</SPAN
>, or change
it to use some other way of monitoring the
connection.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN410"
></A
><B
>3. </B
>kerneld does not load my SCSI driver!</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>Add an entry for the SCSI hostadapter to your
<TT
CLASS="FILENAME"
>/etc/conf.modules</TT
>. See the
description of the <A
HREF="special-devs.html#SCSIDEVS"
><TT
CLASS="LITERAL"
>scsi_hostadapter</TT
></A
>
entry above.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN418"
></A
><B
>4. </B
>modprobe complains about
<SPAN
CLASS="ERRORNAME"
>gcc2_compiled</SPAN
> being
undefined</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>This is a bug in the module utilities, that show up
only with binutils 2.6.0.9 and later, and it is also
documented in the release note for the binutils. So read
that, or fetch an upgrade to the module-utilities that fix
this bug. </P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN424"
></A
><B
>5. </B
>My sound driver keeps forgetting its settings for
volume etc</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>The settings for a module are stored inside the
module itself when it is loaded. So when kerneld
auto-unloads a module, any settings you have made are
forgotten, and the next time the module loads it reverts
to the default settings. </P
><P
>You can tell kerneld to configure a module by
running a program after the module has been
auto-loaded. See <A
HREF="special-devs.html#PRE-POST"
>Pre/Post Install</A
> on the
<TT
CLASS="LITERAL"
>post-install</TT
> entry. </P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN432"
></A
><B
>6. </B
>DOSEMU needs some modules; how can I get kerneld to
load those ?</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>You cannot. None of the dosemu versions, official or
development versions, support loading the dosemu modules
through kerneld. However, if you are running kernel 2.0.26
or later, you do not need the special dosemu modules any
longer; just upgrade dosemu to 0.66.1 or higher.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN437"
></A
><B
>7. </B
>Why do I get <SPAN
CLASS="ERRORNAME"
>Ouch, kerneld timed out,
message failed</SPAN
> messages ?</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>When the kernel sends a request off to to kerneld,
it expects to receive an acknowledgment back within one
second. If kerneld does not send this acknowledgment,
this message is logged. The request is retransmitted, and
should get through eventually. </P
><P
>This usually happens on systems with a very high
load. Since kerneld is a user-mode process, it is
scheduled just like any other process on the system. At
times of high load, it may not get to run in time to send
back the acknowledgment before the kernel times
out. </P
><P
>If this happens even when the load is light, try
restarting kerneld. Kill the kerneld process, and start
it again with the command <B
CLASS="COMMAND"
>/usr/sbin/kerneld</B
>. If the problem persists,
you should mail a bug report to
<TT
CLASS="EMAIL"
>&#60;<A
HREF="mailto:linux-kernel@vger.rutgers.edu"
>linux-kernel@vger.rutgers.edu</A
>&#62;</TT
>, but
<I
CLASS="EMPHASIS"
>please</I
> make sure that your versions
of the kernel, kerneld and the module utilities are
up-to-date before posting about the problem. Check the
requirements in
<TT
CLASS="FILENAME"
>linux/Documentation/Changes</TT
></P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN449"
></A
><B
>8. </B
>Mount doesn't wait for kerneld to load the
filesystem module</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>There has been a number of reports that the mount(8)
command does not wait for kerneld to load the filesystem
module. <B
CLASS="COMMAND"
>lsmod</B
> does show that kerneld
loads the module, and if you repeat the mount command
immediately it will succeed. This appears to be a bug in
the module-utilities version 1.3.69f that affects some
Debian users. It can be fixed by getting a later version
of the module-utilities. </P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN455"
></A
><B
>9. </B
>kerneld fails to load the <TT
CLASS="LITERAL"
>ncpfs</TT
>
module</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>You need to compile the ncpfs utilities with
<SPAN
CLASS="TOKEN"
>-DHAVE_KERNELD</SPAN
>. See the
<SPAN
CLASS="PRODUCTNAME"
>ncpfs</SPAN
>
<TT
CLASS="FILENAME"
>Makefile</TT
>. </P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN464"
></A
><B
>10. </B
>kerneld fails to load the <TT
CLASS="FILENAME"
>smbfs</TT
>
module</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>You are using an older version of the
<SPAN
CLASS="PRODUCTNAME"
>smbmount</SPAN
> utilities. Get the
latest version (0.10 or later) from <A
HREF="ftp://tsx-11.mit.edu/pub/linux/filesystems/smbfs/"
TARGET="_top"
>the
SMBFS archive one TSX-11</A
></P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN472"
></A
><B
>11. </B
>I built everything as modules, and now my system
cannot boot or kerneld fails to load the root filesystem
module!</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>You cannot modularize
<I
CLASS="EMPHASIS"
>everything</I
>: The kernel must have
enough drivers built in for it to be able to mount your
root filesystem, and run the necessary programs to start
kerneld<A
NAME="AEN477"
HREF="#FTN.AEN477"
>[1]</A
>. You cannot modularize </P
><P
></P
><UL
><LI
><P
>the driver for the hard disk
where your root filesystem lives </P
></LI
><LI
><P
>the root filesystem driver itself
</P
></LI
><LI
><P
>the binary format loader for init,
kerneld and other programs </P
></LI
></UL
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN488"
></A
><B
>12. </B
>kerneld will not load at boot time; it complains
about libgdbm</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>Newer versions of kerneld need the GNU dbm library,
<TT
CLASS="FILENAME"
>libgdbm.so</TT
>, to run. Most
installations have this file in
<TT
CLASS="FILENAME"
>/usr/lib</TT
>, but you are probably
starting kerneld before the <TT
CLASS="FILENAME"
>/usr</TT
>
filesystem is mounted. One symptom of this is that kerneld
will not start during boot-up (from your rc-scripts), but
runs fine if you start it by hand after that system is
up. The solution is to either move the kerneld startup to
after your <TT
CLASS="FILENAME"
>/usr</TT
> is mounted, or move
the gdbm library to your root filesystem, e.g. to
<TT
CLASS="FILENAME"
>/lib</TT
>.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN498"
></A
><B
>13. </B
>I get Cannot load module <TT
CLASS="VARNAME"
>xxx</TT
> but
I just reconfigured my kernel without
<TT
CLASS="VARNAME"
>xxx</TT
> support!</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>The Slackware installation (possibly others) builds
a default <TT
CLASS="FILENAME"
>/etc/rc.d/rc.modules</TT
> which
does an explicit modprobe on a variety of modules. Exactly
which modules get modprobed depends on the original
kernel's configuration. You have probably reconfigured
your kernel to exclude one or more of the modules that is
getting modprobed in rc.modules, thus, the error
message(s). Update your rc.modules by commenting out any
modules you no longer use, or remove the
<TT
CLASS="FILENAME"
>rc.modules</TT
> entirely and let kerneld
load the modules when they are needed.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN507"
></A
><B
>14. </B
>I rebuilt my kernel and modules, and still get
messages about unresolved symbols when
booting</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>You probably reconfigured/rebuilt your kernel and
excluded some modules. You've got some old modules that
you no longer use hanging around in the
<TT
CLASS="FILENAME"
>/lib/modules</TT
> directory. The easiest
fix is to delete your
<TT
CLASS="FILENAME"
>/lib/modules/</TT
><TT
CLASS="VARNAME"
>x.y.z</TT
>
directory and do a <B
CLASS="COMMAND"
>make modules_install</B
>
from the kernel source directory again. Note that this
problem only occurs when reconfiguring your kernel without
changing versions. If you see this error when moving to a
newer kernel version you've got some other problem.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN516"
></A
><B
>15. </B
>I installed Linux 2.1/2.3 and now I cannot
load <I
CLASS="EMPHASIS"
>any</I
> modules!</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>Odd numbered Linux are development kernels. As such,
it should be expected that things break from time to
time. One of the things that has changed significantly is
the way modules are handled, and where the kernel and
modules are loaded into memory.</P
><P
>In brief, if you want to use modules with a
development kernel, you must</P
><P
></P
><UL
><LI
><P
>read the
<TT
CLASS="FILENAME"
>Documentation/Changes</TT
> file and see
what packages need upgrading on your system</P
></LI
><LI
><P
>use the latest modutils package,
available from <A
HREF="ftp://ftp.redhat.com/pub/alphabits/"
TARGET="_top"
>AlphaBits on
Red Hat</A
> or the mirror site at <A
HREF="ftp://tsx-11.mit.edu/pub/linux/packages/alphabits/"
TARGET="_top"
>TSX-11</A
></P
></LI
></UL
><P
>I recommend using at least kernel 2.1.29, if you
want to use modules with a 2.1 kernel.</P
></DIV
></DIV
><DIV
CLASS="QANDAENTRY"
><DIV
CLASS="QUESTION"
><P
><A
NAME="AEN532"
></A
><B
>16. </B
>What about dial-on-demand networking?</P
></DIV
><DIV
CLASS="ANSWER"
><P
><B
> </B
>kerneld originally had some support for establishing
dial-up network connections on demand; trying to send
packets to a network without being connected would cause
kerneld to run the
<TT
CLASS="FILENAME"
>/sbin/request_route</TT
> script to setup a
PPP or SLIP connection.</P
><P
>This turned out to be a bad idea. Alan Cox of Linux
networking fame wrote on the linux-kernel mailing list</P
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>The request-route stuff is obsolete, broken and
not required [...] Its also removed from 2.1.x
trees.</P
></BLOCKQUOTE
><P
>Instead of using the request-route script and
kerneld, I highly recommend Eric Schenk's <A
HREF="http://www.dna.lth.se/~erics/diald.html"
TARGET="_top"
>diald
package</A
> to manage your demand dialing.</P
></DIV
></DIV
></DIV
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN477"
HREF="commonproblems.html#AEN477"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>Actually, this is not true. Late
1.3.x and all 2.x kernels support the use of an initial
ram-disk that is loaded by LILO or LOADLIN; it is possible
to load modules from this disk very early in the boot
process. How to do it is described in the
<TT
CLASS="FILENAME"
>linux/Documentation/initrd.txt</TT
> file
that comes with the kernel source-files. </P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="goodies.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Special kerneld uses</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>