Can I identify and set network device names in an Anaconda kickstart file?

Viewed 458

I'm creating a kickstart file for RHEL 8 and am trying to simplify network connectivity among machines. All of the machines will have onboard ethernet ports that will distribute eno1 and eno2 names, but also a separate card which will generate unique names when RHEL is installed.

My question is, can I use the kickstart to identify copper or fiber connections and give them names there or will I need to do this in the post-install section?

1 Answers

Can I use the kickstart to identify copper or fiber connections and give them names there or will I need to do this in the post-install section? From the Kickstart commands for network configuration you can set from the kickstart

B.4.1. network (optional)

Use the optional network Kickstart command to configure network information for the target system and activate the network devices in the installation environment. The device specified in the first network command is activated automatically. You can also explicitly require a device to be activated using the --activate option

--device= - specifies the device to be configured (and eventually activated in Anaconda) with the network command.

If the --device= option is missing on the first use of the network command, the value of the ksdevice= Anaconda boot option is used, if available. Note that this is considered deprecated behavior; in most cases, you should always specify a --device= for every network command.

The behavior of any subsequent network command in the same Kickstart file is unspecified if its --device= option is missing. Make sure you specify this option for any network command beyond the first.

You can specify a device to be activated in any of the following ways:

  1. the device name of the interface, for example, em1

  2. the MAC address of the interface, for example, 01:23:45:67:89:ab

  3. the keyword link, which specifies the first interface with its link in the up state

  4. the keyword bootif, which uses the MAC address that pxelinux set in the BOOTIF variable. Set IPAPPEND 2 in your pxelinux.cfg file to have pxelinux set the BOOTIF variable.

For example:

network --bootproto=dhcp --device=em1

Good Luck Pal

Related