aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/usage.xml
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2014-04-23 20:53:49 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2014-04-23 20:53:49 +0000
commit976040f4a11fdf01390d685312ef29e4e84ca1cb (patch)
tree5e278f3f0bc4b5e4da2ee1114e7ed880b2a88a12 /chapter07/usage.xml
parente040ad195fdeed3a0f1d0ac62272491892cd238c (diff)
Update to man-pages-3.65.
Text changes in Chapter 7. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10549 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/usage.xml')
-rw-r--r--chapter07/usage.xml90
1 files changed, 84 insertions, 6 deletions
diff --git a/chapter07/usage.xml b/chapter07/usage.xml
index 3eb323a6e..885032365 100644
--- a/chapter07/usage.xml
+++ b/chapter07/usage.xml
@@ -207,14 +207,93 @@ EOF</userinput></screen>
</sect3>
</sect2>
+ <sect2>
+ <title>Udev Bootscripts</title>
+
+ <para>The first LFS bootscript,
+ <filename>/etc/init.d/mountvirtfs</filename> will copy any devices
+ located in <filename class="directory">/lib/udev/devices</filename> to
+ <filename class="directory">/dev</filename>. This is necessary because
+ some devices, directories, and symlinks are needed before the dynamic
+ device handling processes are available during the early stages of
+ booting a system, or are required by <command>udevd</command> itself.
+ Creating static device nodes in <filename
+ class="directory">/lib/udev/devices</filename> also provides an easy
+ workaround for devices that are not supported by the dynamic device
+ handling infrastructure.</para>
+
+ <para>The <filename>/etc/rc.d/init.d/udev</filename> initscript starts
+ <command>udevd</command>, triggers any "coldplug" devices that have
+ already been created by the kernel and waits for any rules to complete.
+ The script also unsets the uevent handler from the default of
+ <filename>/sbin/hotplug </filename>. This is done because the kernel no
+ longer needs to call out to an external binary. Instead
+ <command>udevd</command> will listen on a netlink socket for uevents that
+ the kernel raises.</para>
+
+ <para>The <command>/etc/rc.d/init.d/udev_retry</command> initscript takes
+ care of re-triggering events for subsystems whose rules may rely on
+ filesystems that are not mounted until the <command>mountfs</command>
+ script is run (in particular, <filename class="directory">/usr</filename>
+ and <filename class="directory">/var</filename> may cause this). This
+ script runs after the <command>mountfs</command> script, so those rules
+ (if re-triggered) should succeed the second time around. It is
+ configured from the <filename>/etc/sysconfig/udev_retry</filename> file;
+ any words in this file other than comments are considered subsystem names
+ to trigger at retry time. To find the subsystem of a device, use
+ <command>udevadm info --attribute-walk &lt;device&gt;</command> where
+ &lt;device&gt; is an absolute path in /dev or /sys such as /dev/sr0 or
+ /sys/class/rtc.</para>
+
+ <sect3>
+ <title>Module Loading</title>
+
+ <para>Device drivers compiled as modules may have aliases built into them.
+ Aliases are visible in the output of the <command>modinfo</command>
+ program and are usually related to the bus-specific identifiers of devices
+ supported by a module. For example, the <emphasis>snd-fm801</emphasis>
+ driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801,
+ and has an alias of <quote>pci:v00001319d00000801sv*sd*bc04sc01i*</quote>.
+ For most devices, the bus driver exports the alias of the driver that
+ would handle the device via <systemitem
+ class="filesystem">sysfs</systemitem>. E.g., the
+ <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file
+ might contain the string
+ <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>.
+ The default rules provided with Udev will cause <command>udevd</command>
+ to call out to <command>/sbin/modprobe</command> with the contents of the
+ <envar>MODALIAS</envar> uevent environment variable (which should be the
+ same as the contents of the <filename>modalias</filename> file in sysfs),
+ thus loading all modules whose aliases match this string after wildcard
+ expansion.</para>
+
+ <para>In this example, this means that, in addition to
+ <emphasis>snd-fm801</emphasis>, the obsolete (and unwanted)
+ <emphasis>forte</emphasis> driver will be loaded if it is
+ available. See below for ways in which the loading of unwanted drivers can
+ be prevented.</para>
+
+ <para>The kernel itself is also able to load modules for network
+ protocols, filesystems and NLS support on demand.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Handling Hotpluggable/Dynamic Devices</title>
+
+ <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
+ player, the kernel recognizes that the device is now connected and
+ generates a uevent. This uevent is then handled by
+ <command>udevd</command> as described above.</para>
+
+ </sect3>
+ </sect2>
+
<sect2 id="ch-scripts-clock">
<title>Configuring the System Clock</title>
- <sect3 id="ch-scripts-setclock">
- <title>System V Clock Configuration</title>
-
- <indexterm zone="ch-scripts-setclock">
- <primary sortas="d-setclock">setclock</primary>
+ <indexterm zone="ch-scripts-clock">
+ <primary sortas="d-scripts-setclock">setclock</primary>
<secondary>configuring</secondary></indexterm>
<para>The <command>setclock</command> script reads the time from the hardware
@@ -268,7 +347,6 @@ EOF</userinput></screen>
<note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set
in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note>
- </sect3>
</sect2>
<sect2 id="ch-scripts-console">