aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/udev.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter07/udev.xml')
-rw-r--r--chapter07/udev.xml42
1 files changed, 30 insertions, 12 deletions
diff --git a/chapter07/udev.xml b/chapter07/udev.xml
index ba8b851e0..7d4bcc495 100644
--- a/chapter07/udev.xml
+++ b/chapter07/udev.xml
@@ -88,6 +88,7 @@
registered with <systemitem class="filesystem">sysfs</systemitem> are
available to userspace processes and to <command>udevd</command> for device
node creation.</para>
+
</sect3>
<sect3>
@@ -112,6 +113,7 @@
receives. Finally, the bootscript &quot;coldplugs&quot; any devices that
have already been registered with the kernel by forcing them to raise
hotplug events which <command>udevd</command> will then handle.</para>
+
</sect3>
<sect3>
@@ -134,6 +136,7 @@
<emphasis>root:root</emphasis>. Documentation on the syntax of the Udev
rules configuration files are available in
<filename>/usr/share/doc/udev-&udev-version;/index.html</filename></para>
+
</sect3>
<sect3>
@@ -166,6 +169,7 @@
<para>The kernel itself is also able to load modules for network
protocols, filesystems and NLS support on demand.</para>
+
</sect3>
<sect3>
@@ -175,6 +179,7 @@
player, the kernel recognizes that the device is now connected and
generates a hotplug event. This hotplug event is then handled by
<command>udevd</command> as described above.</para>
+
</sect3>
</sect2>
@@ -187,6 +192,7 @@
<sect3>
<title>A kernel module is not loaded automatically</title>
+
<para>Udev will only load a module if it has a bus-specific alias and the
bus driver properly exports the necessary aliases to <systemitem
class="filesystem">sysfs</systemitem>. In other cases, one should
@@ -201,7 +207,7 @@
the argument. Now try locating the device directory under
<filename class="directory">/sys/bus</filename> and check whether there is
a <filename>modalias</filename> file there.</para>
-
+
<para>If the <filename>modalias</filename> file exists in <systemitem
class="filesystem">sysfs</systemitem>, the driver supports the device and
can talk to it directly, but doesn't have the alias, it is a bug in the
@@ -213,12 +219,13 @@
means that the kernel developers have not yet added modalias support to
this bus type. With Linux-&linux-version;, this is the case with ISA and
IDE busses. Expect this issue to be fixed in later kernel versions.</para>
-
+
<!-- Remove IDE from the list above after Linux-2.6.16 -->
<para>Udev is not intended to load <quote>wrapper</quote> drivers such as
<emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as
<emphasis>loop</emphasis> at all.</para>
+
</sect3>
<sect3>
@@ -232,14 +239,16 @@
<command>modprobe</command> to load the wrapper after Udev loads the
wrapped module. To do this, add an <quote>install</quote> line in
<filename>/etc/modprobe.conf</filename>. For example:</para>
-<screen role="nodump">install snd-pcm modprobe -i snd-pcm ; modprobe \
- snd-pcm-oss ; true</screen>
-
+
+<screen role="nodump"><literal>install snd-pcm modprobe -i snd-pcm ; modprobe \
+ snd-pcm-oss ; true</literal></screen>
+
<para>If the module in question is not a wrapper and is useful by itself,
configure the <command>S05modules</command> bootscript to load this
module on system boot. To do this, add the module name to the
<filename>/etc/sysconfig/modules</filename> file on a separate line.
This works for wrapper modules too, but is suboptimal in that case.</para>
+
</sect3>
<sect3>
@@ -248,10 +257,12 @@
<para>Either don't build the module, or blacklist it in
<filename>/etc/modprobe.conf</filename> file as done with the
<emphasis>forte</emphasis> module in the example below:</para>
-<screen role="nodump">blacklist forte</screen>
+
+<screen role="nodump"><literal>blacklist forte</literal></screen>
<para>Blacklisted modules can still be loaded manually with the
explicit <command>modprobe</command> command.</para>
+
</sect3>
<sect3>
@@ -262,26 +273,30 @@
and the corresponding SCSI generic device (incorrectly) by vendor.
Increase the logging verbosity of Udev, find the offending rule by
examining the logs and make it more specific.</para>
+
</sect3>
<sect3>
<title>Udev rule works unreliably</title>
+
<para>This may be another manifestation of the previous problem. If not,
and your rule uses <systemitem class="filesystem">sysfs</systemitem>
attributes, it may be a kernel timing issue, to be fixed in later kernels.
For now, you can work around it by creating a rule that waits for the used
<systemitem class="filesystem">sysfs</systemitem> attribute and appending
it to the <filename>/etc/udev/rules.d/10-wait_for_sysfs.rules</filename>
- file. Please notify the LFS Development list if you do so and it helps.
- </para>
+ file. Please notify the LFS Development list if you do so and it
+ helps.</para>
+
</sect3>
-
+
<sect3>
<title>Udev does not create a device</title>
+
<para>Further text assumes that the driver is built statically into the
kernel or already loaded as a module, and that you have already checked
that Udev doesn't create a misnamed device.</para>
-
+
<para>Udev has no information needed to create a device node if a kernel
driver does not export its data to <systemitem
class="filesystem">sysfs</systemitem>.
@@ -293,10 +308,12 @@
vendor). The static device node will be copied to
<filename class="directory">/dev</filename> by the
<command>S10udev</command> bootscript.</para>
+
</sect3>
-
+
<sect3>
<title>Device naming order changes randomly after rebooting</title>
+
<para>This is due to the fact that Udev, by design, handles uevents and
loads modules in parallel, and thus in an unpredictable order. This will
never be <quote>fixed</quote>. You should not rely upon the kernel device
@@ -305,8 +322,9 @@
serial number or the output of various *_id utilities installed by Udev.
See also the network interface renaming example in
<xref linkend="ch-scripts-network"/>.</para>
+
</sect3>
-
+
</sect2>
<sect2>