The every day things from Thalamus' life.

Thalamus' Blog

12 February, 2016

EL7 and biosdevnames

Filed under: ComputerStuff_en — Thalamus @ 01:57

Quick guide to change back to the old ethX, instead of the long and cumbersome enp2s0fX.

# yum install biosdevname

Add ‘net.ifnames=0 biosdevname=0’ to GRUB_CMDLINE_LINUX in /etc/default/grub. While there, why not take away ‘ rhgb quiet’ if this is a server …

# grub2-mkconfig

to verify, before updating grub2.

# grub2-mkconfig -o /boot/grub2/grub.cfg
# cd /etc/sysconfig/network-scripts && mv ifcfg-enp2s0f1 ifcfg-eth1

Update ‘DEVICE=enp2s0f1 to DEVICE=eth1’. Again, if this is a server, I prefer to take away everything NetworkManager related and end up with something like this. If you do, remember to put GATEWAY into /etc/sysconfig/network and update /etc/resolv.conf as well.

DEVICE=eth1
BOOTPROTO=none
IPADDR=192.168.1.2
NETMASK=255.255.255.0
HWADDR=18:a9:05:40:95:bc
ONBOOT=yes

Until today, I’ve had 100% success rate with creating and running a file containing

systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network

without loosing connection to the server, before booting to get the interfaces with the names I want permanently.

• • •