In trying to swap a motherboard for the exact same type I kept having issues with the NIC not being started (network manager was disabled). I finally found 70-persistent-net.rules under udev had the mac address of the old nic as eth0 so I moved this file out and rebooted only to see it was recreated as expected but had the old mac address? I finally edited the mac address and that worked.
Where in the world would it have gotten the old mac from?
Thanks, jlc
Joseph L. Casale wrote:
In trying to swap a motherboard for the exact same type I kept having issues with the NIC not being started (network manager was disabled). I finally found 70-persistent-net.rules under udev had the mac address of the old nic as eth0 so I moved this file out and rebooted only to see it was recreated as expected but had the old mac address? I finally edited the mac address and that worked.
Where in the world would it have gotten the old mac from?
Thanks, jlc
Check .etc.sysconfig/network-scripts/ifcfg-<interface>. Probably ifcfg-eth0 in this case.
Mikkel
Joseph L. Casale wrote:
In trying to swap a motherboard for the exact same type I kept having issues with the NIC not being started (network manager was disabled). I finally found 70-persistent-net.rules under udev had the mac address of the old nic as eth0 so I moved this file out and rebooted only to see it was recreated as expected but had the old mac address? I finally edited the mac address and that worked.
Where in the world would it have gotten the old mac from?
Thanks, jlc
Good question, and yes, udev DOES keep track.
check in /etc/udev/rules.d for file names with *persistant* in them. There are several, and one for -- you guessed it -- network/NIC data.
By removing the persistent file(s), udev will rebuild it with the correct/current info.
This is how you install on one platform and put that disk into another.: Remove the udev persistant rules in the post-install.
Good Luck!
Good question, and yes, udev DOES keep track.
check in /etc/udev/rules.d for file names with *persistant* in them. There are several, and one for -- you guessed it -- network/NIC data.
By removing the persistent file(s), udev will rebuild it with the correct/current info.
This is how you install on one platform and put that disk into another.: Remove the udev persistant rules in the post-install.
Phil, This is exactly what I did, I moved the file out altogether. Should I have simply removed the line in it? It recreated the file next boot with the old mac address only to still cause issues!
Thanks, jlc
Joseph L. Casale wrote:
Good question, and yes, udev DOES keep track.
check in /etc/udev/rules.d for file names with *persistant* in them. There are several, and one for -- you guessed it -- network/NIC data.
By removing the persistent file(s), udev will rebuild it with the correct/current info.
This is how you install on one platform and put that disk into another.: Remove the udev persistant rules in the post-install.
Phil, This is exactly what I did, I moved the file out altogether. Should I have simply removed the line in it? It recreated the file next boot with the old mac address only to still cause issues!
Thanks, jlc
Yes, do not move (mv) the file, remove (rm) it. Copy it first to some other directory if you wish, but do not leave any trace of the original file anywhere udev can find it. :)
Good Luck!
Phil Meyer wrote:
Joseph L. Casale wrote:
Good question, and yes, udev DOES keep track.
check in /etc/udev/rules.d for file names with *persistant* in them. There are several, and one for -- you guessed it -- network/NIC data.
By removing the persistent file(s), udev will rebuild it with the correct/current info.
This is how you install on one platform and put that disk into another.: Remove the udev persistant rules in the post-install.
Phil, This is exactly what I did, I moved the file out altogether. Should I have simply removed the line in it? It recreated the file next boot with the old mac address only to still cause issues!
Thanks, jlc
Yes, do not move (mv) the file, remove (rm) it. Copy it first to some other directory if you wish, but do not leave any trace of the original file anywhere udev can find it. :)
Good Luck!
One further clarification:
To make a 'clean' system disk that can be put into another system, remove all the /etc/udev/rules.d/*persistant* and /etc/sysconfig/network-scripts/*eth? and /etc/sysconfig/network-scripts/*wlan? and /etc/X11/xorg.conf files.
I always do this in a post install, and have not tried it on a live system. It may be necessary to do this from a rescue disk. I do not know if a running udev will 'let you' remove that data.
Sorry to not be able to verify the steps on a previously running system. I just don't do those.
However, every day I use a virtual machine on my desktop to install an OS on Compact Flash Cards, and thumb drives, to be used in a variety of equipment. This method works perfectly for that, with the exception that I have to also rebuild the initrd image with drivers that anaconda did not see during the install.
Here is what I use, for the curious:
My %post section includes this:
# # fix udev rules for fake interfaces # rm -f /etc/udev/rules.d/70-persistent-net.rules rm -f /etc/X11/xorg.conf # cat << _EOF > /etc/sysconfig/network-scripts/ifcfg-eth0 # DEVICE=eth0 BOOTPROTO=dhcp HWADDR= IPV6INIT=no ONBOOT=yes DHCP_HOSTNAME=skid TYPE=Ethernet _EOF # # make sure usb-storage is in the initrd image # kernel=`ls /boot/vmli* | awk -F- '{printf("%s-%s\n", $2,$3)}'` initrd="/boot/initrd-${kernel}.img" rm $initrd mkinitrd --preload=ehci-hcd --preload=ahci --preload=libata --preload=jbd --preload=ohci-hcd --preload=uhci-hcd --preload=scsi_wait_scan --preload=usb-storage --preload=scsi_mod --preload=sd_mod --preload=pata_amd --preload=ata_generic --preload=pata_cs5536 --preload=pata_acpi $initrd $kernel #
Good Luck
One further clarification:
To make a 'clean' system disk that can be put into another system, remove all the /etc/udev/rules.d/*persistant* and /etc/sysconfig/network-scripts/*eth? and /etc/sysconfig/network-scripts/*wlan? and /etc/X11/xorg.conf files.
I think you found the error in my way! I was running while I did it. I'll keep this email and refer back to it next time.
Out of curiosity now, I also deleted my xorg.conf but if I leave inittab set to 5 it hangs? If I boot to 3, then init 5, it works fine? It also didn't recreate the xorg.conf file?
Thanks for everything! jlc
To make a 'clean' system disk that can be put into another system, remove all the /etc/udev/rules.d/*persistant* and /etc/sysconfig/network-scripts/*eth? and /etc/sysconfig/network-scripts/*wlan? and /etc/X11/xorg.conf files.
I copied the partition to another disk, and put that to a new computer, installed grub and moved /etc/udev/rules.d/*persistent* and /etc/sysconfig/network-scripts/*eth? to /root/backups.
The system boots and seems to work, but there are no new /etc/udev/rules.d/*persistent* files, should there be?
Are the /etc/udev/rules.d/*persistent* needed? Even if those are not required can I somehow re-create those?
I do have the old ones, but I would not like to use those, I'd rather make/generate new ones if possible (and needed).
-Paavo