aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2011-10-06 15:35:49 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2011-10-06 15:35:49 +0000
commit2a1c1e03a43156b673a7188a0cd4a784829ab3c5 (patch)
tree44836a7635dccafd4c8bac9fbb7234d059b1d52b /chapter07
parentb777a9ed50efe38706c26e9e4bae3e1efb67d24f (diff)
Fix the udev_retry script, and add an explanation
for how to configure it. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9614 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07')
-rw-r--r--chapter07/udev.xml58
1 files changed, 35 insertions, 23 deletions
diff --git a/chapter07/udev.xml b/chapter07/udev.xml
index 5bb769caa..3ceb7704c 100644
--- a/chapter07/udev.xml
+++ b/chapter07/udev.xml
@@ -93,40 +93,52 @@
</sect3>
<sect3>
- <title>Udev Bootscript</title>
-
- <para>The <command>/etc/rc.d/init.d/udev</command> initscript takes care of creating
- device nodes when Linux is booted. The script unsets the uevent handler
- from the default of <command>/sbin/hotplug</command>. 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. Next, the bootscript copies any static
- device nodes that exist in <filename
+ <title>Udev Bootscripts</title>
+
+ <para>The <command>/etc/rc.d/init.d/udev</command> initscript takes care
+ of creating device nodes when Linux is booted. The script unsets the
+ uevent handler from the default of <command>/sbin/hotplug</command>.
+ 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. Next, the bootscript
+ copies any static device nodes that exist 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. The bootscript then starts the
- Udev daemon, <command>udevd</command>, which will act on any uevents it
- receives. Finally, the bootscript forces the kernel to replay uevents for
- any devices that have already been registered and then waits for
+ 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. The bootscript then starts the Udev daemon,
+ <command>udevd</command>, which will act on any uevents it receives.
+ Finally, the bootscript forces the kernel to replay uevents for any
+ devices that have already been registered and then waits for
<command>udevd</command> to handle them.</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, /usr and /var 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</command>.)</para>
+
</sect3>
<sect3>
<title>Device Node Creation</title>
- <para>To obtain the right major and minor number for a device, Udev relies
- on the information provided by <systemitem
+ <para>To obtain the right major and minor number for a device, Udev
+ relies on the information provided by <systemitem
class="filesystem">sysfs</systemitem> in <filename
class="directory">/sys</filename>. For example,
<filename>/sys/class/tty/vcs/dev</filename> contains the string
- <quote>7:0</quote>. This string is used by <command>udevd</command>
- to create a device node with major number <emphasis>7</emphasis> and minor
+ <quote>7:0</quote>. This string is used by <command>udevd</command> to
+ create a device node with major number <emphasis>7</emphasis> and minor
<emphasis>0</emphasis>. The names and permissions of the nodes created
under the <filename class="directory">/dev</filename> directory are
determined by rules specified in the files within the <filename