From Fedora Project Wiki


Description

This test scenario make sure that ksdevice=<iface> format will handle interface names of the form emN and pci<slot>#<port>. For example passing ksdevice=em1 will work without issues.

Setup

  1. Make sure hardware requirements are met (see test day requirements)
  2. Download, or create, installation media (either a boot.iso, PXE images or a DVD.iso). If participating during the biosdevname test day, a boot.iso will be provided on the test day wiki page.

How to test

  1. Create a kickstart file to automate a Fedora installation. The quickest method is to copy the kickstart file /root/anaconda-ks.cfg that describes the installation for the existing system. Adjust the kickstart file to ensure the network keyword specifies the configuration parameters for the network interfaces using the new naming convention. For example, to configure three devices you might use the kickstart sample below. More information on kickstart options, and creating a kickstart file can be found at Anaconda/Kickstart.
    network --onboot yes --device em1 --bootproto dhcp --ipv6 auto
    network --onboot yes --device pci1#2 --bootproto dhcp --ipv6 auto
    network --onboot no --device pci1#1  --noipv4 --noipv6 --hostname a-valid-hostname.com

    Once completed, upload the kickstart file to a network location accessible to your system under test. You can upload your file to the Fedora wiki, a pastebin.com (or similar) service, or another system on your local network.

  2. Initiate a Fedora 41 (or Rawhide) installation by booting the installer using any available method (e.g. boot.iso, PXE images or DVD.iso).
  3. At the bootloader screen, press Tab to edit the boot arguments and append ksdevice=em1 ks=http://server/path/to/ks.cfg. Specify the correct ks= parameter that you chose in step#1.
  4. Complete the installation, login to the system.

Expected Results

  1. Make sure ks.cfg is retrieved over the network through the interface specified with ksdevice option. Manual inspection of /var/log/anaconda.log may be required.
  2. Make sure kickstart installation proceeds without any manual intervention required.
  3. Once you login to the system, make sure that onboard device names are of the form emN as described here. You can inspect the contents of /sys/class/net/ to ensure device names are named properly, for example:
    # ls /sys/class/net/
    em1  em2  em3  em4  lo
  4. Make sure that PCI add-in device names are of the form pci<slot>#<port>. As described here. You can inspect the contents of /sys/class/net/ to ensure device names are named properly, for example:
    # ls /sys/class/net/
    lo  pci3#1 pci3#2 pci4#1
  5. Make sure the configuration parameters specified in the kickstart file are applied to the specified interfaces. For example, if you specified a device named em1 to be setup to boot automatically using DHCP, verify using the ifconfig command as shown below
    # ifconfig em1
    em1       Link encap:Ethernet  HWaddr 00:24:E8:2E:DE:FF
              inet addr:172.16.65.55  Bcast:172.16.127.255  Mask:255.255.192.0
              inet6 addr: fe80::224:e8ff:fe2e:deff/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:778483 errors:0 dropped:0 overruns:0 frame:0
              TX packets:95453 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:133048578 (126.8 MiB)  TX bytes:25692991 (24.5 MiB)
              Interrupt:36 Memory:d6000000-d6012800
  6. Make sure ifcfg-emN and ifcfg-pci<slot>#<port> files are created under the dir /etc/sysconfig/network-scripts after the installation is complete.
    # cat ifcfg-em3
    # Please read /usr/share/doc/initscripts-*/sysconfig.txt
    # for the documentation of these parameters.
    DEVICE=em3
    BOOTPROTO=dhcp
    TYPE=Ethernet
    HWADDR=00:24:e8:2e:df:03
    ONBOOT=yes
    USERCTL=no
    PEERDNS=yes
    IPV6INIT=no
    
    # cat ifcfg-pci3#1
    # Please read /usr/share/doc/initscripts-*/sysconfig.txt
    # for the documentation of these parameters.
    DEVICE='pci3#1'
    BOOTPROTO=dhcp
    TYPE=Ethernet
    HWADDR=00:1b:21:44:63:40
    ONBOOT=yes
    USERCTL=no
    PEERDNS=yes
    IPV6INIT=no