Changeset 2a1c1e0 for chapter07


Ignore:
Timestamp:
10/06/2011 03:35:49 PM (13 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
81060b6
Parents:
b777a9e
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/udev.xml

    rb777a9e r2a1c1e0  
    9494
    9595    <sect3>
    96       <title>Udev Bootscript</title>
    97 
    98       <para>The <command>/etc/rc.d/init.d/udev</command> initscript takes care of creating
    99       device nodes when Linux is booted. The script unsets the uevent handler
    100       from the default of <command>/sbin/hotplug</command>.  This is done
    101       because the kernel no longer needs to call out to an external binary.
    102       Instead <command>udevd</command> will listen on a netlink socket for
    103       uevents that the kernel raises. Next, the bootscript copies any static
    104       device nodes that exist in <filename
     96      <title>Udev Bootscripts</title>
     97
     98      <para>The <command>/etc/rc.d/init.d/udev</command> initscript takes care
     99      of creating device nodes when Linux is booted. The script unsets the
     100      uevent handler from the default of <command>/sbin/hotplug</command>.
     101      This is done because the kernel no longer needs to call out to an
     102      external binary.  Instead <command>udevd</command> will listen on a
     103      netlink socket for uevents that the kernel raises. Next, the bootscript
     104      copies any static device nodes that exist in <filename
    105105      class="directory">/lib/udev/devices</filename> to <filename
    106       class="directory">/dev</filename>. This is necessary because some devices,
    107       directories, and symlinks are needed before the dynamic device handling
    108       processes are available during the early stages of booting a system, or
    109       are required by <command>udevd</command> itself.  Creating static device
    110       nodes in <filename class="directory">/lib/udev/devices</filename> also
    111       provides an easy workaround for devices that are not supported by the
    112       dynamic device handling infrastructure. The bootscript then starts the
    113       Udev daemon, <command>udevd</command>, which will act on any uevents it
    114       receives. Finally, the bootscript forces the kernel to replay uevents for
    115       any devices that have already been registered and then waits for
     106      class="directory">/dev</filename>. This is necessary because some
     107      devices, directories, and symlinks are needed before the dynamic device
     108      handling processes are available during the early stages of booting a
     109      system, or are required by <command>udevd</command> itself.  Creating
     110      static device nodes in <filename
     111      class="directory">/lib/udev/devices</filename> also provides an easy
     112      workaround for devices that are not supported by the dynamic device
     113      handling infrastructure. The bootscript then starts the Udev daemon,
     114      <command>udevd</command>, which will act on any uevents it receives.
     115      Finally, the bootscript forces the kernel to replay uevents for any
     116      devices that have already been registered and then waits for
    116117      <command>udevd</command> to handle them.</para>
    117118
     119      <para>The <command>/etc/rc.d/init.d/udev_retry</command> initscript takes
     120      care of re-triggering events for subsystems whose rules may rely on
     121      filesystems that are not mounted until the <command>mountfs</command>
     122      script is run (in particular, /usr and /var may cause this).  This script
     123      runs after the <command>mountfs</command> script, so those rules (if
     124      re-triggered) should succeed the second time around.  It is configured
     125      from the <filename>/etc/sysconfig/udev_retry</filename> file; any words
     126      in this file other than comments are considered subsystem names to
     127      trigger at retry time.  (To find the subsystem of a device, use
     128      <command>udevadm info --attribute-walk</command>.)</para>
     129
    118130    </sect3>
    119131
     
    121133      <title>Device Node Creation</title>
    122134
    123       <para>To obtain the right major and minor number for a device, Udev relies
    124       on the information provided by <systemitem
     135      <para>To obtain the right major and minor number for a device, Udev
     136      relies on the information provided by <systemitem
    125137      class="filesystem">sysfs</systemitem> in <filename
    126138      class="directory">/sys</filename>.  For example,
    127139      <filename>/sys/class/tty/vcs/dev</filename> contains the string
    128       <quote>7:0</quote>. This string is used by <command>udevd</command>
    129       to create a device node with major number <emphasis>7</emphasis> and minor
     140      <quote>7:0</quote>. This string is used by <command>udevd</command> to
     141      create a device node with major number <emphasis>7</emphasis> and minor
    130142      <emphasis>0</emphasis>. The names and permissions of the nodes created
    131143      under the <filename class="directory">/dev</filename> directory are
Note: See TracChangeset for help on using the changeset viewer.