I recently restored a system image from a working freePBX system running on a Dell Optiplex 755 to a Dell Optiplex 745 with similar hardware (2 NICs) that I use for testing purposes.
After restoring the system image to the 745, for some reason the OS is enumerating the onboard Ethernet adapter as eth1 and the PCI Ethernet adapter as eth0.
Is there a way to have the Linux operating system do a reset and re-scan of all hardware? Or, is there a way with the Sangoma Linux 7 to rename/swap the eth0 and eth1 interfaces? I know if I did a complete fresh install on the 745 it would enumerate the interfaces correctly (in order) during setup and initial boot, but I prefer not to lose everything contained/configured in this system image.
So far I have tried removing and reinserting the PCI network adapter, but it always comes back as eth0. I’ve also tried specifying the MAC address in the ifcfg-ethx files by specifying the HWADDR= option in the config files, but the network services will not start because the MAC addresses do not match the hardware addresses detected by the kernel.
I tried following these steps to rename the interfaces here:
but my suspicion is that the 70-persistent-net.rules file no longer works or pertains to the Sangoma Linux 7 distribution.
Now this site looks more promising, but I do not know exactly what to replace the <module> entries with in the /etc/modules.conf file for the aliases: Network interfaces assignment problem
I apologize for the lack of experience when it comes to basic Linux skills; I come mainly from a MS environment, and in Windoze, a simple uninstall and reinstall of the network adapters from the Device Mangler followed by a few netsh commands and the adapters would be installed in numerical order.
Thank you for your reply! Unfortunately I tried what you suggested but it did not work. On the system in question, the 70-persistent-net.rules file does not exist in the /etc/udev/rules.d folder. I did create this file though and gave the user root full permissions. If this file/method works on the Sangoma Linux version 7, perhaps I don’t have the right items configured in the file?
This is what I put in the 70-persistent-net.rules file:
Does anyone else have anything to suggest/try? So far I have gone as far as restoring the image to the system again, but without the second PCI network card installed. With the card not installed, the onboard Ethernet adapter gets properly enumerated as eth0. But as soon as I add the PCI network card in, all Hell breaks loose.
Is there a command that I can run that can re-scan the hardware similar to how the setup iso runs on initial install of FreePBX?
How does the setup enumerate and install devices during the initial install? Or is it left up to the operating system somehow and cannot be controlled or modified?
I’m still at a loss here, and I am thinking of just using VMWare Converter to make a virtual machine of the production machine and go from there, but unfortunately I currently don’t have any USB-to-Ethernet adapters.
Seeing this post here by @dicko that points to the same Red Hat site that @kunter posted above here, it appears that my particular installation is missing some of the udev rpms required for generating the .rules file. I ran the following commands to install them onto the installation: