LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-14-2015, 01:18 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How can I get CentOS to recognize the nic (eth0) after changing the mother board?


How can I get CentOS to recognize the nic (eth0) after changing the mother board?

Both motherboards were Supermicro, apparently with different nic's so it seems the driver doesn't match.

What's the easiest way to get it to recognize the new nic without reinstalling the OS?
 
Old 04-14-2015, 05:41 PM   #2
zeos386sx
Member
 
Registered: Oct 2004
Location: waco, tx
Distribution: Fedora
Posts: 48

Rep: Reputation: 15
the most basic thing would be to use lspci to find out what nic is there and then use modprobe to load the kernel module for that device.

I have noticed on my desktop running cent 7 that in the gui there is an option to "create" a network device.
 
Old 04-14-2015, 06:36 PM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Most likely udev is naming your nic eth1. You can check dmesg, and grep for "eth". I suspect you'll find that a different ethX is configured. If so:

There must be a file called 70-persistent-net.rules. Most likely it is in /etc/udev/rules.d. But that is Debian, Centos might be different.

Anyway, open that file and delete the lines which describe the hardware properties of eth0 and eth1. Reboot.

jlinkels
 
1 members found this post helpful.
Old 04-14-2015, 06:45 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Centos7 renamed my nick to 'enp7s4' Why can we not stick to the basic here?
 
Old 04-14-2015, 06:54 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Centos 7 didn't rename it to enp7s4. Red Hat followed BSD naming conventions to more easily help advanced users find what nic they really are using rather than an arbitrary enX number. My guess is that most other distro's will eventually follow this naming.

I'd also suggest ip command or ifconfig -a to find out what you have. I too agree that it may be named differently based on the motherboard change.

Fedoara, RedHat and clones are stinkers and have been stinkers when cloning or moving to other hardware because they way it located nic's before. There is some file you have to edit if the name is wrong to get back to eth0.

Now, if your nic isn't fully supported then you either need to do one or more of the following. Blacklist driver, add in driver, use ndiswrapper to run windows driver.
 
Old 04-14-2015, 07:03 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
CentOS is the same. If you delete the /etc/udev/rules.d/70-persistent-net.rules and remove the MAC address from the ifcfg-eth0 file networking should be reconfigured when you reboot.

lazydog
http://en.wikipedia.org/wiki/Consist..._Device_Naming
 
1 members found this post helpful.
Old 04-14-2015, 08:01 PM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You might check the configuration files. Those generated by the GUI tend to have the MAC address AND a UUID included. And these alone will prevent the network device from being recognized.

If the file /etc/sysconfig/network-scripts/ifcfg-<interface> have an entry "HWADDR=" and/or "UUID="
you would have a problem. I just commented out the "UUID=" entry (using #) and then replace the MAC address with that of the new entry.

No problems after that. In the case of my SuperMicro motherboard, the system named the interface enp6s0 and enp6s1 (I'm using Fedora 21).

I had no need to change drivers - the system recognized them appropriately.

Last edited by jpollard; 04-14-2015 at 08:03 PM.
 
Old 04-15-2015, 04:06 AM   #8
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by michaelk View Post
CentOS is the same. If you delete the /etc/udev/rules.d/70-persistent-net.rules and remove the MAC address from the ifcfg-eth0 file networking should be reconfigured when you reboot.

lazydog
http://en.wikipedia.org/wiki/Consist..._Device_Naming
That was it thanks, I move that file out of rules.d and it recreated it upon reboot with the new MAC addresses
 
Old 04-15-2015, 08:57 AM   #9
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by michaelk View Post
I never had an issue with the old way. Got my order by placing the MAC address in the config files. The new way make you have to think about what port is where. Besides it is easier to remember eth0 instead of enp7s4 (had to look it up).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Older distributions won't recognize newer mother board IDE DMA homerwsmith Linux - Server 3 09-13-2010 05:42 PM
Anyone know of a mother board with an onboard wireless nic that works with linux? abefroman Linux - Hardware 2 01-07-2010 09:37 PM
eth0/eth1 disappeared after changing mother board noir911 Linux - Networking 5 09-14-2008 08:41 PM
dsl 3.3 not detecting forcedeth mother board nic markos DamnSmallLinux 3 04-16-2007 08:03 PM
Changing the mother board prabhatsoni Linux - Hardware 3 06-26-2006 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration