John VanDyk has been innovating with information technology for more than 20 years. Read more...
Solved: Renaming em1 to eth0 on Red Hat Enterprise Linux 6
We had a software package that had a braindead licensing scheme. To generate the license, it uses the MAC address of the network interface card of the machine you are running it on. OK, that's a way of identifying a unique machine. But here's the kicker. It just assumes that your ethernet device is /dev/eth0.
For a while now, NICs that are embedded on the motherboard are identified by udev as em1, em2, etc. This is part of an attempt to make interface naming more predictable and meaningful.
So, how to get em1 renamed to eth0? Here's what worked for me. I should emphasize that I had access to the console, so when ethernet was down I could still access the box.
0. I've been burned enough times to do this out of habit: make a backup of /etc/grub.conf, retaining SELinux info:
# cp --preserve=context /etc/grub.conf /etc/grub.bak
biosdevname=0 to the kernel boot arguments in /etc/grub.conf.
2. Rename /etc/sysconfig/network-scripts/ifcfg-em1 to /etc/sysconfig/network-scripts/ifcfg-eth0, changing the line
3. Delete /etc/udev/rules.d/70-persistent-net.rules
Presto, I get eth0 for the former em1 and the rest of the NICs on this Dell R715 are still em2, em3, em4.