Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] weird numbering of network devices after cloning..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
oliwel
n00b
n00b


Joined: 09 Oct 2004
Posts: 67

PostPosted: Mon May 14, 2007 9:24 am    Post subject: [solved] weird numbering of network devices after cloning.. Reply with quote

Hi Folks,

I have a very weird error here - I have two boxes which are nearly equal regarding hardware, I setup the first box which works fine, I copied over the whole filesystem to the second box and have now troubles with the NICs.

On Box A (the original setup) I have two NICs which are correctly numbered as eth0 and eth1.

On Box B (the cloned one) I have two NICs which are numbered as eth2 and eth3, no eth0/1 shows up on this box, there is no other hardware that I can image to take this numbers.

Does udev daemon use cashed data from the old node? If so were can I find it and reset it to have eth0/eth1 back again.

Oliver


Last edited by oliwel on Tue May 15, 2007 7:45 am; edited 1 time in total
Back to top
View user's profile Send private message
mudrii
l33t
l33t


Joined: 26 Jun 2003
Posts: 789
Location: Singapore

PostPosted: Mon May 14, 2007 10:15 am    Post subject: Reply with quote

what is output from ifconfig -a ?
what script is in /etc/init.d/net.ethX ?
_________________
www.gentoo.ro
Back to top
View user's profile Send private message
oliwel
n00b
n00b


Joined: 09 Oct 2004
Posts: 67

PostPosted: Mon May 14, 2007 11:07 am    Post subject: Reply with quote

ifconfig -a shows only eth2 and eth3
I had eth0 and eth1 scripts in init.d what failed - now I have eth2 and eth3 in there and it works.

Oliver
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Mon May 14, 2007 11:14 am    Post subject: Reply with quote

remove the udev network rules file:
Code:
# rm /etc/udev/rules.d/70-persistent-net.rules

and reboot

or edit that file so that the mac addresses match
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
pharoh
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2004
Posts: 91
Location: Minnesota

PostPosted: Wed Jun 06, 2007 1:13 pm    Post subject: eth0 now eth2? Reply with quote

Hi all,

we recently have started to have a problem on new loads of Gentoo where the network adapters eth0 and eth1 show up as eth2 and 3 but in dmesg we can see they are detected as 0 and 1 then renamed. any ideas? the systems are all using gentoo-sources 2.6.18/19/20 and the e1000 driver.
_________________
Linux user number 361815
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 6607

PostPosted: Wed Jun 06, 2007 1:16 pm    Post subject: Reply with quote

Look for renaming:
Code:
grep eth /etc/modprobe.conf
grep eth /etc/udev/rules.d/*
Back to top
View user's profile Send private message
jschweg
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2004
Posts: 85

PostPosted: Wed Jun 06, 2007 1:20 pm    Post subject: Reply with quote

This happened when I upgraded udev.

I just renamed the interface back to eth0 in /etc/udev/rules.d/*-persistent-net.rules
Back to top
View user's profile Send private message
pharoh
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2004
Posts: 91
Location: Minnesota

PostPosted: Wed Jun 06, 2007 1:33 pm    Post subject: Reply with quote

yes it is looking at the original machine and not the imaged machine so it adds 2 new nics. nice feature but wish it was in the notes during an emerge :-(

THANK YOU!
_________________
Linux user number 361815
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10951
Location: the dutch mountains

PostPosted: Wed Jun 06, 2007 5:47 pm    Post subject: Reply with quote

merged above four posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
anjgentoo
n00b
n00b


Joined: 12 Jun 2007
Posts: 18

PostPosted: Tue Jun 12, 2007 11:48 am    Post subject: Reply with quote

[quote="davjel"]remove the udev network rules file:
Code:
# rm /etc/udev/rules.d/70-persistent-net.rules

and reboot

I have had this problem after changing my failed main board to a new model. Solved by removing the udev file above, thanks.
Back to top
View user's profile Send private message
hidrogen
n00b
n00b


Joined: 08 Mar 2007
Posts: 51

PostPosted: Mon Oct 08, 2007 9:31 am    Post subject: gentoo virtual machines changed interface eth0 to eth3 Reply with quote

I have some gentoo virtual machines on a computer with windows xp.

After a reboot i lost my network connections. The network interfaces used to be eth0 and eth1 but after doing cat /proc/net/dev instead of having eth0 and eth1 i had eth3 and eth4.

The module pcnet32 is loaded when i boot the virtual machines. How can i rename my interfaces back to the eth0 and eth1? Anyone knows why this happened?

Thanks in advance
Back to top
View user's profile Send private message
Dagger
Developer
Developer


Joined: 11 Jun 2003
Posts: 765
Location: UK

PostPosted: Mon Oct 08, 2007 11:05 am    Post subject: Reply with quote

check/post
Code:

/etc/udev/rules.d/70-persistent-net.rules

_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
hidrogen
n00b
n00b


Joined: 08 Mar 2007
Posts: 51

PostPosted: Mon Oct 08, 2007 12:48 pm    Post subject: Reply with quote

It seems i don't have that file. What should i do now?

Dagger wrote:
check/post
Code:

/etc/udev/rules.d/70-persistent-net.rules
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10951
Location: the dutch mountains

PostPosted: Wed Oct 10, 2007 4:40 pm    Post subject: Reply with quote

merged above three posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
hidrogen
n00b
n00b


Joined: 08 Mar 2007
Posts: 51

PostPosted: Mon Oct 15, 2007 1:46 pm    Post subject: [Solved] Reply with quote

Dagger wrote:
check/post
Code:

/etc/udev/rules.d/70-persistent-net.rules


I removed the file and rebooted my gentoo. It worked. But is there any way to do that without rebooting?
Back to top
View user's profile Send private message
jniklast
n00b
n00b


Joined: 12 Mar 2005
Posts: 42

PostPosted: Mon Oct 15, 2007 1:57 pm    Post subject: Reply with quote

running udevstart should do the trick
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Thu Dec 13, 2007 7:15 pm    Post subject: Network ports are eth2/eth3 instead of eth0/eth1??? Reply with quote

I have two identical x86 servers. I just installed Gentoo on one of them, and then cloned the disk (used a disk duplication thing to copy the whole disk block-by-block) and put it in the second one.

Everything works EXCEPT the network ports on the second one show up as eth2 and eth3 instead of eth0 and eth1!!!!

How can I get those switched back to eth0 and eth1? I have some scripts that deal with network interfaces that I want to work on both machines, and I really don't want to deal with the network ports being named differently on each machine. (the whole point of the machines is for them to be identical)

Any suggestions would be welcome.

~ Peaceful
Back to top
View user's profile Send private message
Wormo
Developer
Developer


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Thu Dec 13, 2007 7:37 pm    Post subject: udev is assigning dev names by MAC addresses Reply with quote

udev is reserving eth0 and eth1 for ethernets that have MAC addresses from your original box.

On the second box, edit /etc/udev/rules.d/70-persistent-net.rules and update the MAC addresses for eth0 and eth1 to match the HW address of the cards in that box.
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Thu Dec 13, 2007 7:41 pm    Post subject: Re: udev is assigning dev names by MAC addresses Reply with quote

Wormo wrote:
udev is reserving eth0 and eth1 for ethernets that have MAC addresses from your original box.

On the second box, edit /etc/udev/rules.d/70-persistent-net.rules and update the MAC addresses for eth0 and eth1 to match the HW address of the cards in that box.


I figured it would be something like that. Thanks for the quick response! I'll go try that right now.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10951
Location: the dutch mountains

PostPosted: Fri Dec 14, 2007 6:19 pm    Post subject: Reply with quote

merged above three posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum