Changeset 625eab8


Ignore:
Timestamp:
12/22/2022 11:30:12 PM (18 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib
Children:
bfd92cf
Parents:
a8de3b44 (diff), 8972a36 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Automatic merge of trunk into multilib

Location:
chapter09
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter09/symlinks.xml

    ra8de3b44 r625eab8  
    1818    data or physical characteristics like the bus, slot, or MAC address.  The
    1919    purpose of this naming convention is to ensure that network devices are
    20     named consistently and not based on the time the network card was
    21     discovered.  For example, on a computer having two network cards made by
    22     Intel and Realtek, the network card manufactured by Intel may become eth0
    23     and the Realtek card becomes eth1. In some cases, after a reboot the cards
    24     could get renumbered the other way around.</para>
    25 
    26     <para>In the new naming scheme, typical network device names would then
    27     be something like enp5s0 or wlp3s0.  If this naming convention is not
    28     desired, the traditional naming scheme or a custom scheme can be
     20    named consistently, not based on when the network card was
     21    discovered.  In older versions of Linux&mdash;on a computer with two
     22    network cards made by Intel and Realtek, for instance&mdash;the
     23    network card manufactured by Intel might have become eth0
     24    while the Realtek card became eth1. After a reboot, the cards
     25    would sometimes get renumbered the other way around.</para>
     26
     27    <para>In the new naming scheme, typical network device names are
     28    something like enp5s0 or wlp3s0.  If this naming convention is not
     29    desired, the traditional naming scheme, or a custom scheme, can be
    2930    implemented.</para>
    3031
     
    3233      <title>Disabling Persistent Naming on the Kernel Command Line</title>
    3334
    34       <para>The traditional naming scheme using eth0, eth1, etc can be
     35      <para>The traditional naming scheme using eth0, eth1, etc. can be
    3536      restored by adding <userinput>net.ifnames=0</userinput> on the
    36       kernel command line.  This is most appropriate for those systems
    37       that have only one ethernet device of the same type.  Laptops
    38       often have multiple ethernet connections that are named eth0 and
    39       wlan0 and are also candidates for this method.  The command line
    40       is passed in the GRUB configuration file.
     37      kernel command line.  This is most appropriate for systems
     38      that have just one ethernet device of a particular type.  Laptops
     39      often have two ethernet connections named eth0 and
     40      wlan0; such laptops can also use this method.  The command line
     41      is in the GRUB configuration file.
    4142      See <xref linkend="grub-cfg"/>.</para>
    4243    </sect3>
     
    5758<screen role="nodump"><userinput>cat /etc/udev/rules.d/70-persistent-net.rules</userinput></screen>
    5859
    59       <note><para>In some cases such as when MAC addresses have been assigned to
    60       a network card manually or in a virtual environment such as Qemu or Xen,
    61       the network rules file may not have been generated because addresses
     60      <note><para>In some cases, such as when MAC addresses have been assigned to
     61      a network card manually, or in a virtual environment such as Qemu or Xen,
     62      the network rules file may not be generated because addresses
    6263      are not consistently assigned.  In these cases, this method cannot
    6364      be used.</para></note>
    6465
    65       <para>The file begins with a comment block followed by two lines for each
     66      <para>The file begins with a comment block, followed by two lines for each
    6667      NIC. The first line for each NIC is a commented description showing its
    6768      hardware IDs (e.g. its PCI vendor and device IDs, if it's a PCI card),
    68       along with its driver in parentheses, if the driver can be found. Neither
     69      along with its driver (in parentheses, if the driver can be found). Neither
    6970      the hardware ID nor the driver is used to determine which name to give an
    7071      interface; this information is only for reference. The second line is the
    7172      udev rule that matches this NIC and actually assigns it a name.</para>
    7273
    73       <para>All udev rules are made up of several keys, separated by commas and
    74       optional whitespace. This rule's keys and an explanation of each of them
    75       are as follows:</para>
     74      <para>All udev rules are made up of several keywords, separated by commas and
     75      optional whitespace. Here are the keywords, and an explanation of each one:</para>
    7676
    7777      <itemizedlist>
     
    8989          ignore VLAN or bridge sub-interfaces (because these sub-interfaces do
    9090          not have drivers). These sub-interfaces are skipped because the name
    91           that would be assigned would collide with their parent devices.</para>
    92         </listitem>
    93         <listitem>
    94           <para><literal>ATTR{address}</literal> - The value of this key is the
     91          that would be assigned would collide with the parent devices.</para>
     92        </listitem>
     93        <listitem>
     94          <para><literal>ATTR{address}</literal> - The value of this keyword is the
    9595          NIC's MAC address.</para>
    9696        </listitem>
     
    103103        </listitem>
    104104        <listitem>
    105           <para><literal>NAME</literal> - The value of this key is the name that
     105          <para><literal>NAME</literal> - The value of this keyword is the name that
    106106          udev will assign to this interface.</para>
    107107        </listitem>
     
    111111      you know which name has been assigned to each of your network cards before
    112112      proceeding, and be sure to use that <literal>NAME</literal> value when
    113       creating your configuration files below.</para>
     113      creating your network configuration files.</para>
    114114
    115115    </sect3>
     
    119119  <sect2 revision="sysv">
    120120
    121     <title>CD-ROM symlinks</title>
     121    <title>CD-ROM Symlinks</title>
    122122
    123123    <para>Some software that you may want to install later (e.g., various
    124     media players) expect the <filename class="symlink">/dev/cdrom</filename>
     124    media players) expects the <filename class="symlink">/dev/cdrom</filename>
    125125    and <filename class="symlink">/dev/dvd</filename> symlinks to exist, and
    126126    to point to a CD-ROM or DVD-ROM device. Also, it may be convenient to put
     
    140140    on which type of device you have.</para>
    141141
    142     <para>There are advantages to each approach; the correct approach to use
    143     will depend on what kinds of device changes may happen. If you expect the
     142    <para>There are advantages to each approach; the correct approach
     143    depends on what kinds of device changes may happen. If you expect the
    144144    physical path to the device (that is, the ports and/or slots that it plugs
    145145    into) to change, for example because you plan on moving the drive to a
    146146    different IDE port or a different USB connector, then you should use the
    147147    <quote>by-id</quote> mode. On the other hand, if you expect the device's
    148     identification to change, for example because it may die, and you would
    149     replace it with a different device with the same capabilities and which
    150     is plugged into the same connectors, then you should use the
     148    identification to change, for example because it may die, and you intend
     149    to replace it with a different device that
     150    plugs into the same connectors, then you should use the
    151151    <quote>by-path</quote> mode.</para>
    152152
     
    199199    the same device. If you need that, then inspect (and possibly edit) the
    200200    generated <filename>/etc/udev/rules.d/70-persistent-cd.rules</filename>
    201     file after booting, to make sure the assigned symlinks match what you need.</para>
     201    file after booting, to make sure the assigned symlinks match your needs.</para>
    202202
    203203  </sect2>
     
    205205  <sect2>
    206206
    207     <title>Dealing with duplicate devices</title>
     207    <title>Dealing with Duplicate Devices</title>
    208208
    209209    <para>As explained in <xref linkend="ch-config-udev"/>, the order in
     
    215215    after a reboot the order changes.
    216216    For all classes of hardware except sound cards and network cards, this is
    217     fixable by creating udev rules for custom persistent symlinks.
     217    fixable by creating udev rules to create persistent symlinks.
    218218    The case of network cards is covered separately in
    219219    <xref linkend="ch-config-network"/>, and sound card configuration can
  • chapter09/udev.xml

    ra8de3b44 r625eab8  
    8686      as they are detected by the kernel. For drivers compiled as modules,
    8787      registration happens when the module is loaded. Once the <systemitem
    88       class="filesystem">sysfs</systemitem> filesystem is mounted (on /sys),
     88      class="filesystem">sysfs</systemitem> filesystem is mounted (on
     89      <filename class="directory">/sys</filename>),
    8990      data which the drivers have registered with <systemitem
    9091      class="filesystem">sysfs</systemitem> are available to userspace
Note: See TracChangeset for help on using the changeset viewer.