Ignore:
Timestamp:
06/29/2020 07:55:01 AM (4 years ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib-10.1
Children:
c4804e8
Parents:
d4fdde6
Message:

Update to new lfs structure

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11986 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 moved

Legend:

Unmodified
Added
Removed
  • chapter09/symlinks.xml

    rd4fdde6 r37e35d2  
    2222    Intel and Realtek, the network card manufactured by Intel may become eth0
    2323    and the Realtek card becomes eth1. In some cases, after a reboot the cards
    24     get renumbered the other way around.</para>
     24    could get renumbered the other way around.</para>
    2525   
    2626    <para>In the new naming scheme, typical network device names would then
     
    4545      <title>Creating Custom Udev Rules</title>
    4646   
    47       <para>The naming scheme can be customized by creating custom Udev
     47      <para>The naming scheme can be customized by creating custom udev
    4848      rules.  A script has been included that generates the initial rules.
    4949      Generate these rules by running:</para>
     
    6969      the hardware ID nor the driver is used to determine which name to give an
    7070      interface; this information is only for reference. The second line is the
    71       Udev rule that matches this NIC and actually assigns it a name.</para>
    72  
    73       <para>All Udev rules are made up of several keys, separated by commas and
     71      udev rule that matches this NIC and actually assigns it a name.</para>
     72 
     73      <para>All udev rules are made up of several keys, separated by commas and
    7474      optional whitespace. This rule's keys and an explanation of each of them
    7575      are as follows:</para>
     
    7777      <itemizedlist>
    7878        <listitem>
    79           <para><literal>SUBSYSTEM=="net"</literal> - This tells Udev to ignore
     79          <para><literal>SUBSYSTEM=="net"</literal> - This tells udev to ignore
    8080          devices that are not network cards.</para>
    8181        </listitem>
    8282        <listitem>
    83           <para><literal>ACTION=="add"</literal> - This tells Udev to ignore this
     83          <para><literal>ACTION=="add"</literal> - This tells udev to ignore this
    8484          rule for a uevent that isn't an add ("remove" and "change" uevents also
    8585          happen, but don't need to rename network interfaces).</para>
    8686        </listitem>
    8787        <listitem>
    88           <para><literal>DRIVERS=="?*"</literal> - This exists so that Udev will
     88          <para><literal>DRIVERS=="?*"</literal> - This exists so that udev will
    8989          ignore VLAN or bridge sub-interfaces (because these sub-interfaces do
    9090          not have drivers). These sub-interfaces are skipped because the name
     
    9797        <listitem>
    9898          <para><literal>ATTR{type}=="1"</literal> - This ensures the rule only
    99           matches the primary interface in the case of certain wireless drivers,
     99          matches the primary interface in the case of certain wireless drivers
    100100          which create multiple virtual interfaces. The secondary interfaces are
    101101          skipped for the same reason that VLAN and bridge sub-interfaces are
     
    104104        <listitem>
    105105          <para><literal>NAME</literal> - The value of this key is the name that
    106           Udev will assign to this interface.</para>
     106          udev will assign to this interface.</para>
    107107        </listitem>
    108108      </itemizedlist>
     
    134134    the physical path to the CD or DVD device. Second, it can operate in
    135135    <quote>by-id</quote> mode (default for IDE and SCSI devices), where the
    136     rules it creates depend on identification strings stored in the CD or DVD
    137     device itself. The path is determined by Udev's <command>path_id</command>
     136    rules it creates depend on identification strings stored on the CD or DVD
     137    device itself. The path is determined by udev's <command>path_id</command>
    138138    script, and the identification strings are read from the hardware by its
    139139    <command>ata_id</command> or <command>scsi_id</command> programs, depending
     
    160160    should not use by-path persistence, because each time the device is plugged
    161161    into a new external port, its physical path will change. All
    162     externally-connected devices will have this problem if you write Udev rules
     162    externally-connected devices will have this problem if you write udev rules
    163163    to recognize them by their physical path; the problem is not limited to CD
    164164    and DVD drives.</para></important>
    165165
    166     <para>If you wish to see the values that the Udev scripts will use, then
     166    <para>If you wish to see the values that the udev scripts will use, then
    167167    for the appropriate CD-ROM device, find the corresponding directory under
    168168    <filename class="directory">/sys</filename> (e.g., this can be
     
    183183    <quote>by-id</quote> or <quote>by-path</quote>):</para>
    184184
    185 <screen role="nodump"><userinput>sed -i -e 's/"write_cd_rules"/"write_cd_rules <replaceable>mode</replaceable>"/' \
    186     /etc/udev/rules.d/83-cdrom-symlinks.rules</userinput></screen>
     185<screen role="nodump"><userinput>sed -e 's/"write_cd_rules"/"write_cd_rules <replaceable>mode</replaceable>"/' \
     186    -i /etc/udev/rules.d/83-cdrom-symlinks.rules</userinput></screen>
    187187
    188188    <para>Note that it is not necessary to create the rules files or symlinks
    189     at this time, because you have bind-mounted the host's
    190     <filename class="directory">/dev</filename> directory into the LFS system,
     189    at this time because you have bind-mounted the host's
     190    <filename class="directory">/dev</filename> directory into the LFS system
    191191    and we assume the symlinks exist on the host. The rules and symlinks will
    192192    be created the first time you boot your LFS system.</para>
     
    194194    <para>However, if you have multiple CD-ROM devices, then the symlinks
    195195    generated at that time may point to different devices than they point to on
    196     your host, because devices are not discovered in a predictable order. The
     196    your host because devices are not discovered in a predictable order. The
    197197    assignments created when you first boot the LFS system will be stable, so
    198198    this is only an issue if you need the symlinks on both systems to point to
     
    213213    <filename>/dev/video0</filename> refers to the camera and
    214214    <filename>/dev/video1</filename> refers to the tuner, and sometimes
    215     after a reboot the order changes to the opposite one.
     215    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 for custom persistent symlinks.
    218218    The case of network cards is covered separately in
    219219    <xref linkend="ch-config-network"/>, and sound card configuration can
     
    238238<literal>
    239239# Persistent symlinks for webcam and tuner
    240 KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", \
    241     SYMLINK+="webcam"
    242 KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", \
    243     SYMLINK+="tvtuner"
     240KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", SYMLINK+="webcam"
     241KERNEL=="video*", ATTRS{device}=="0x036f",  ATTRS{vendor}=="0x109e", SYMLINK+="tvtuner"
    244242</literal>
    245243EOF</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.