Changeset 966b175

07/12/2006 09:19:33 PM (17 years ago)
Dan Nichilson <dnicholson@…>
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, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 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/parallelism, xry111/pip3, xry111/rust-wip-20221008

Various fixes and additions for examples of custom rules in Udev courtesy
of Alexander Patrakov. Includes guidelines for persistent CD-ROM symlinks.

git-svn-id: 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

1 added
4 edited


  • chapter01/changelog.xml

    r77e97ae r966b175  
    3939      <para>July 12, 20006</para>
    4040      <itemizedlist>
     41        <listitem>
     42          <para>[dnicholson] - Various fixes and additions for examples
     43          of custom rules in Udev courtesy of Alexander Patrakov. Added
     44          the "Creating custom symlinks" page which includes examples
     45          of creating persistent device symlinks, including CD-ROMs. Added
     46          a second set of guidelines for creating persistent symlinks for
     47          network cards. Other text touch ups on the configuration pages
     48          involving Udev. Closes ticket #1818.</para>
     49        </listitem>
    4150        <listitem>
    4251          <para>[bdubbs] - Updated udev-config and bootscripts download
  • chapter07/chapter07.xml

    r77e97ae r966b175  
    2323  <xi:include xmlns:xi="" href="hostname.xml"/>
    2424  <xi:include xmlns:xi="" href="hosts.xml"/>
     25  <xi:include xmlns:xi="" href="symlinks.xml"/>
    2526  <xi:include xmlns:xi="" href="network.xml"/>
  • chapter07/network.xml

    r77e97ae r966b175  
    3838    cases, after a reboot the cards get renumbered the other way around. To
    3939    avoid this, create Udev rules that assign stable names to network cards
    40     based on their MAC addresses.</para>
     40    based on their MAC addresses or bus positions.</para>
    42     <para>First, find out the MAC addresses of your network cards:</para>
     42    <para>If you are going to use MAC addresses to identify your network
     43    cards, find the addresses with the following command:</para>
    4445<screen role="nodump"><userinput>grep -H . /sys/class/net/*/address</userinput></screen>
    5051<screen role="nodump"><userinput>cat &gt; /etc/udev/rules.d/26-network.rules &lt;&lt; "EOF"
    51 <literal>ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>52:54:00:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>"
    52 ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>"</literal>
     52<literal>ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*", SYSFS{address}=="<replaceable>00:e0:4c:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>"
     53ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>"</literal>
     56    <para>The DRIVER=="?*" key prevents Udev from attempting to rename 8021Q
     57    VLAN interfaces (not available without the Vlan package from
     58    <ulink url=""/>).
     59    This is necessary since VLANs have the same MAC address as
     60    the real network card.</para>
     62<!-- Yes, I know that VLANs are beyond BLFS. This is not the reason to get them
     63     incorrect by default when every distro does this right. -->
     65    <para>If you are going to use the bus position as a key, create
     66    Udev rules similar to the following:</para>
     68<screen role="nodump"><userinput>cat &gt; /etc/udev/rules.d/26-network.rules &lt;&lt; "EOF"
     69<literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0c.0</replaceable>", NAME="<replaceable>realtek</replaceable>"
     70ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0d.0</replaceable>", NAME="<replaceable>intel</replaceable>"</literal>
    5573    <para>These rules will always rename the network cards to
    56     <quote>realtek</quote> and <quote>intel</quote>, independently of the
    57     original numbering provided by the kernel. Use these names instead of
    58     <quote>eth0</quote> in the network interface configuration files created
     74    <quote>realtek</quote> and <quote>intel</quote>, independently
     75    of the original numbering provided by the kernel (i.e.: the original
     76    <quote>eth0</quote> and <quote>eth1</quote> interfaces will no longer
     77    exist, unless you put such <quote>descriptive</quote> names in the NAME
     78    key). Use the descriptive names from the Udev rules instead
     79    of <quote>eth0</quote> in the network interface configuration files
    5980    below.</para>
    61     <note>
    62       <para>Persistent names must be different from the default network
    63       interface names assigned by the kernel.</para>
    64     </note>
    6682  </sect2>
  • chapter07/udev.xml

    r77e97ae r966b175  
    268268      example, a poorly-writen rule can match both a SCSI disk (as desired)
    269269      and the corresponding SCSI generic device (incorrectly) by vendor.
    270       Increase the logging verbosity of Udev, find the offending rule by
    271       examining the logs and make it more specific.</para>
     270      Find the offending rule and make it more specific.</para>
    273272    </sect3>
    317316      stable names based on some stable attributes of the device, such as a
    318317      serial number or the output of various *_id utilities installed by Udev.
    319       See also the network interface renaming example in
    320       <xref linkend="ch-scripts-network"/>.</para>
     318      See <xref linkend="ch-scripts-symlinks"/> and
     319      <xref linkend="ch-scripts-network"/> for examples.</para>
    322321    </sect3>
Note: See TracChangeset for help on using the changeset viewer.