Changeset a804834 for chapter07


Ignore:
Timestamp:
10/24/2006 01:41:23 AM (18 years ago)
Author:
Bryan Kadzban <bryan@…>
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, 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/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
e88ab625
Parents:
dbfd971
Message:

Add an explanation of how to find the PCI bus position of network devices, to fix #1904. Also switch the sample udev rule from ID== to KERNELS== (required for udev >=098).

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7835 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

    rdbfd971 ra804834  
    7272    </note>
    7373
    74     <para>If you are going to use the bus position as a key, create
    75     Udev rules similar to the following:</para>
     74    <para>If you are going to use the bus position as the key, find the
     75    position of each card with the following commands:</para>
     76
     77<screen role="nodump"><userinput>for dir in /sys/class/net/* ; do
     78    [ -e $dir/device ] &amp;&amp; {
     79        basename $dir ; readlink -f $dir/device
     80    }
     81done</userinput></screen>
     82
     83    <para>This will yield output similar to:</para>
     84
     85<screen role="nodump"><userinput><replaceable>eth0</replaceable>
     86/sys/devices/pci0000:00/<replaceable>0000:00:0c.0</replaceable>
     87<replaceable>eth1</replaceable>
     88/sys/devices/pci0000:00/<replaceable>0000:00:0d.0</replaceable></userinput></screen>
     89
     90    <para>In this example, <replaceable>eth0</replaceable> has PCI bus position
     91    <replaceable>0000:00:0c.0</replaceable> (domain 0000, bus 00, device 0c,
     92    function 0), and <replaceable>eth1</replaceable> has PCI bus position
     93    <replaceable>0000:00:0d.0</replaceable> (domain 0000, bus 00, device 0d,
     94    function 0).</para>
     95 
     96    <para>Now create Udev rules similar to the following:</para>
    7697
    7798<screen role="nodump"><userinput>cat &gt; /etc/udev/rules.d/26-network.rules &lt;&lt; EOF
    78 <literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0c.0</replaceable>", \
     99<literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", KERNELS=="<replaceable>0000:00:0c.0</replaceable>", \
    79100    NAME="<replaceable>realtek</replaceable>"
    80 ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0d.0</replaceable>", \
     101ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", KERNELS=="<replaceable>0000:00:0d.0</replaceable>", \
    81102    NAME="<replaceable>intel</replaceable>"</literal>
    82103EOF</userinput></screen>
    83104
    84     <para>These rules will always rename the network cards to
    85     <quote>realtek</quote> and <quote>intel</quote>, independently
    86     of the original numbering provided by the kernel (i.e.: the original
    87     <quote>eth0</quote> and <quote>eth1</quote> interfaces will no longer
    88     exist, unless you put such <quote>descriptive</quote> names in the NAME
    89     key). Use the descriptive names from the Udev rules instead
    90     of <quote>eth0</quote> in the network interface configuration files
     105    <para>Regardless of which method you use, these rules will always rename
     106    the network cards to <quote>realtek</quote> and <quote>intel</quote>,
     107    independently of the original numbering provided by the kernel (i.e.: the
     108    original <quote>eth0</quote> and <quote>eth1</quote> interfaces will no
     109    longer exist, unless you put such <quote>descriptive</quote> names in the
     110    NAME key). Use the descriptive names from the Udev rules instead of
     111    <quote>eth0</quote> in the network interface configuration files
    91112    below.</para>
    92113
Note: See TracChangeset for help on using the changeset viewer.