How to add ethX naming rules

This is a classic. Now we have the so called “natural naming”. Network interfaces are named after its origin and location. This is called Predictable Network Interface Naming. But for some of us, this modern naming is not of our taste. A network interface must be called ethX. So what to do? I found out, for Fedora (sorry but an old one, F.20) this solution:

# vi /etc/default/grub 
grub conf (for biosdevname=0)
GRUB_CMDLINE_LINUX=
"rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True 
KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 
biosdevname=0 rd_blacklist=nouveau"
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 
SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 
net.ifnames=0 biosdevname=0 rdblacklist=nouveau"
# vi /etc/sysconfig/network-scripts
--> edit or delete the corresponding interfaces the way you like
 grub2-mkconfig -o /boot/grub2/grub.cfg
--> reboot

As soon as I find similar solution for other systems (CentOS 7?) I will update this post. Anyway, be careful: fiddling with grub may result on an unbootable system šŸ˜¦

EDIT: it works also for CentOS.7. We have ethX names again !! šŸ™‚

Advertisements

About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s