GRUB config to fix network interface names

The newer Linux kernel tries to set a a unique interface name for each network card on the server. To revert back to the “eth0” type names follow the following steps:

vi /target/etc/default/grub

Change the line with GRUB_CMDLINE_LINUX_DEFAULT to have the following two values.

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
to
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset net.ifnames=0 biosdevname=0"

image

Save the file with

:wq

The run
update-grub2

This will update the GRUB config for the next reboot. If your interface names are currently not names “eth0”, you will need to confirm that there is someone on standby with console access to a VM or physical access to the server to fix any config after the reboot.

You will need to update your network interface names on your config to match the new “eth0” and eth1" values that will exist after the reboot.

run ifconfig -a to check all the interfaces that exist and get the name of the main network interface. Ensure that this is the first entry in the list and then you can update your config to “eth0” for that interface.