Traditional names of network devices

Moving from Slackware to CRUX, I noticed that my network devices have weird names, such as enp4s0. What happened to the good old eth0? It did not bother me much at first, but… For example, I have a firewall script, where I specify adapter names, and it is a bit annoying to always check for the specific one, depending on the computer I am working on.

So, I searched a bit and found this discussion. All that needs to be done is to pass the following as kernel parameters at boot time: net.ifnames=0 biosdevname=0.

I use lilo on one computer and grub on another. So, in case of lilo, edit this line in /etc/lilo.conf:

# Append any additional kernel parameters:
append="net.ifnames=0 biosdevname=0"

Then run:

lilo -v

In case of GRUB, edit this line in /etc/default/grub:

# Parameters to be passed on the kernel for all Linux menu entries.
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Then do:

grub-mkconfig > /boot/grub/grub.cfg

Reboot and things are as they should be.



Leave a comment