Gentoo · System

net.eth0 does not exist? ifconfig shows enp4s0?

I’m writing this for my future self. Today I had a remote server that was down to power failure. On site a person read me the boot prompt, and I was surprised with the message ‘net.eth0 does not exist’. WTF? After they logged in, they did an ifconfig -a and told me that net.eth0 was not there but enp4s0 was? I had not idea what this was. A quick Google shows that is the network interface, but named differently. Clearly udev hosed me again.

Reading a variety of how-tos, I opted to do a kernal command line. Getting the live CD in the box and booting, I did the following:

vi /etc/defaults/grub

added this line:


mount /boot
grub-mkconfig -o /boot/grub/grub.cfg
shutdown -r now

This resets the naming to the old style. The other option is to upgrade udev and naming. This article seems to be good. I might do that for other instances: