systemd.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-udev" role="wrap">
  8. <?dbhtml filename="udev.html"?>
  9. <sect1info condition="script">
  10. <productname>udev</productname>
  11. <productnumber>&systemd-version;</productnumber>
  12. <address>&systemd-url;</address>
  13. </sect1info>
  14. <title>Udev-&systemd-version; (Extracted from systemd-&systemd-version;)</title>
  15. <indexterm zone="ch-system-udev">
  16. <primary sortas="a-Udev">Udev</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Udev package contains programs for dynamic creation of device
  21. nodes. The development of udev has been merged with systemd, but
  22. most of systemd is incompatible with LFS. Here we build and install just
  23. the needed udev files.</para>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&systemd-ch6-sbu;</seg>
  29. <seg>&systemd-ch6-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Udev</title>
  35. <note><para>This package is a little different from other packages. The
  36. initial package that is extracted is
  37. <filename>systemd-&systemd-version;.tar.xz</filename> even though the
  38. application we are installing is udev. After changing to the
  39. systemd directory, follow the instructions below.</para></note>
  40. <para>The udev-lfs tarball contains LFS-specific files used to build
  41. Udev. Unpack it into the systemd source directory:</para>
  42. <screen><userinput remap="pre">tar -xvf ../&udev-lfs;.tar.bz2</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput remap="make">make -f &udev-lfs;/Makefile.lfs</userinput></screen>
  45. <para>Install the package:</para>
  46. <screen><userinput remap="install">make -f &udev-lfs;/Makefile.lfs install</userinput></screen>
  47. <caution><para>There are several places within the
  48. <application>systemd</application> source code that have explicit directory
  49. paths embedded. For instance, the binary version of the hardware
  50. database's path and file name used at run time,
  51. <filename>/etc/udev/hwdb.bin</filename>, cannot be changed without explict
  52. changes to the source code.</para></caution>
  53. <para>Now initialize the hardware database:</para>
  54. <screen><userinput remap="install">build/udevadm hwdb --update</userinput></screen>
  55. <para>Finally set up the persistent network udev rules. This task will be
  56. explained in detail in <xref linkend='stable-net-names'/>. Note that the
  57. <filename class='directory'>/sys</filename> and <filename
  58. class='directory'>/proc</filename> filesystems must be mounted in the
  59. chroot environment as explained at the beginning of this chapter for the
  60. following script to work.</para>
  61. <screen><userinput remap="install">bash &udev-lfs;/init-net-rules.sh</userinput></screen>
  62. </sect2>
  63. <sect2 id="contents-udev" role="content">
  64. <title>Contents of Udev</title>
  65. <segmentedlist>
  66. <segtitle>Installed programs</segtitle>
  67. <segtitle>Installed libraries</segtitle>
  68. <segtitle>Installed directories</segtitle>
  69. <seglistitem>
  70. <seg>accelerometer, ata_id, cdrom_id, collect, mtd_probe,
  71. scsi_id, v4l_id, udevadm, and udevd</seg>
  72. <seg>libudev.so</seg>
  73. <seg>/etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev</seg>
  74. </seglistitem>
  75. </segmentedlist>
  76. <variablelist>
  77. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  78. <?dbfo list-presentation="list"?>
  79. <?dbhtml list-presentation="table"?>
  80. <varlistentry id="ata_id">
  81. <term><command>ata_id</command></term>
  82. <listitem>
  83. <para>Provides Udev with a unique string and
  84. additional information (uuid, label) for an ATA drive</para>
  85. <indexterm zone="ch-system-udev ata_id">
  86. <primary sortas="b-ata_id">ata_id</primary>
  87. </indexterm>
  88. </listitem>
  89. </varlistentry>
  90. <varlistentry id="cdrom_id">
  91. <term><command>cdrom_id</command></term>
  92. <listitem>
  93. <para>Provides Udev with the capabilities of a
  94. CD-ROM or DVD-ROM drive</para>
  95. <indexterm zone="ch-system-udev cdrom_id">
  96. <primary sortas="b-cdrom_id">cdrom_id</primary>
  97. </indexterm>
  98. </listitem>
  99. </varlistentry>
  100. <varlistentry id="collect">
  101. <term><command>collect</command></term>
  102. <listitem>
  103. <para>Given an ID for the current uevent and a list of
  104. IDs (for all target uevents), registers the current ID
  105. and indicates whether all target IDs have been registered</para>
  106. <indexterm zone="ch-system-udev collect">
  107. <primary sortas="b-collect">collect</primary>
  108. </indexterm>
  109. </listitem>
  110. </varlistentry>
  111. <varlistentry id="scsi_id">
  112. <term><command>scsi_id</command></term>
  113. <listitem>
  114. <para>Provides Udev with a unique SCSI identifier
  115. based on the data returned from sending a SCSI INQUIRY command to
  116. the specified device</para>
  117. <indexterm zone="ch-system-udev scsi_id">
  118. <primary sortas="b-scsi_id">scsi_id</primary>
  119. </indexterm>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry id="udevadm">
  123. <term><command>udevadm</command></term>
  124. <listitem>
  125. <para>Generic udev administration tool: controls the udevd daemon,
  126. provides info from the Udev database, monitors uevents, waits for
  127. uevents to finish, tests Udev configuration, and triggers uevents
  128. for a given device</para>
  129. <indexterm zone="ch-system-udev udevadm">
  130. <primary sortas="b-udevadm">udevadm</primary>
  131. </indexterm>
  132. </listitem>
  133. </varlistentry>
  134. <varlistentry id="udevd">
  135. <term><command>udevd</command></term>
  136. <listitem>
  137. <para>A daemon that listens for uevents on the netlink socket,
  138. creates devices and runs the configured external programs in
  139. response to these uevents</para>
  140. <indexterm zone="ch-system-udev udevd">
  141. <primary sortas="b-udevd">udevd</primary>
  142. </indexterm>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry id="libudev">
  146. <term><filename class="libraryfile">libudev</filename></term>
  147. <listitem>
  148. <para>A library interface to udev device information</para>
  149. <indexterm zone="ch-system-udev libudev">
  150. <primary sortas="c-libudev">libudev</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="etc-udev">
  155. <term><filename class="directory">/etc/udev</filename></term>
  156. <listitem>
  157. <para>Contains Udev configuration files,
  158. device permissions, and rules for device naming</para>
  159. <indexterm zone="ch-system-udev etc-udev">
  160. <primary sortas="e-/etc/udev">/etc/udev</primary>
  161. </indexterm>
  162. </listitem>
  163. </varlistentry>
  164. </variablelist>
  165. </sect2>
  166. </sect1>