LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-19-2012, 10:49 AM   #1
akiuni
Member
 
Registered: Sep 2012
Location: France
Distribution: debian
Posts: 51

Rep: Reputation: Disabled
need help to change eth numbers at boot time


Hello everybody

I have googled a lot to find an answer to my question but I couldn't find a correct answer, or I don't have enought knowledge to understand... I hope somebody will help me.

I'm using debian 6 with kernel 3.2.31 on a DELL server with 4 broadcom network connectors. The thing is that debian is autoprobing the cards in a wrong order... The first RJ45 port is eth2, the second is eth3, the third is eth0 and the last one is eth1.

I would like to change this so as to get first port=eth0, second=eth1, third=eth2 and fourth=eth3

I've find out that I could create an alias on the driver name in modeprobe.conf, but all the cards are using the same driver (tg3)...

I've also find out that I could add a kernel boot command like that :
append="netdev=irq=21,io=0x3000,name=eth0"
but I don't know how to find the correct "io" parameter to set (these are PCIexpress cards)

Could someone help me ?

the only thing that I can find to identify the cards is the pci slot, but I don't know how to change the eth numbers based on that information :

#lspci -m
01:00.0 "Ethernet controller" "Broadcom Corporation" "Device 165f" "Dell" "Device 1f5b"
01:00.1 "Ethernet controller" "Broadcom Corporation" "Device 165f" "Dell" "Device 1f5b"
02:00.0 "Ethernet controller" "Broadcom Corporation" "Device 165f" "Dell" "Device 1f5b"
02:00.1 "Ethernet controller" "Broadcom Corporation" "Device 165f" "Dell" "Device 1f5b"


#ls -l /sys/class/net/eth*/device
lrwxrwxrwx 1 root root 0 Oct 19 18:58 /sys/class/net/eth0/device -> ../../../devices/pci0000:00/0000:00:01.0/0000:02:00.0
lrwxrwxrwx 1 root root 0 Oct 19 18:58 /sys/class/net/eth1/device -> ../../../devices/pci0000:00/0000:00:01.0/0000:02:00.1
lrwxrwxrwx 1 root root 0 Oct 19 18:58 /sys/class/net/eth2/device -> ../../../devices/pci0000:00/0000:00:01.1/0000:01:00.0
lrwxrwxrwx 1 root root 0 Oct 19 18:58 /sys/class/net/eth3/device -> ../../../devices/pci0000:00/0000:00:01.1/0000:01:00.1


Thank you in advance
bests
Julien
 
Old 10-19-2012, 11:01 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,206

Rep: Reputation: 229Reputation: 229Reputation: 229
Have you tried creating a udev-net-rules to control the naming of the device links?

A short read of this page may help and this one too for debian.

Hope that helps.

Goodluck.

m.m.

Last edited by malekmustaq; 10-19-2012 at 11:02 AM.
 
Old 10-19-2012, 11:09 AM   #3
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
You'll need a udev rule...

See this for an example;
http://www.novell.com/support/kb/doc.php?id=3012993
It's on SuSE, but the principle should be the same...
 
Old 10-19-2012, 11:10 AM   #4
akiuni
Member
 
Registered: Sep 2012
Location: France
Distribution: debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
yes, thank you malekmustaq, I've forget to say that I can't base my solution on MAC addresses because I'll have to apply my patch on a lot of servers...
 
Old 10-19-2012, 11:16 AM   #5
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
OK,...

Here's,an example closer to what you want;
http://linux-tips.org/article/73/per...ming-with-udev
 
Old 10-22-2012, 10:01 AM   #6
akiuni
Member
 
Registered: Sep 2012
Location: France
Distribution: debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
yes, thanks a lot JaseP, that's exactly what I was looking for !
It worked well

thanks again
bests
Julien
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] <sys/time.h> gettimeofday conflict with Eth socket sendto legendbb Programming 10 06-15-2012 03:30 AM
change wlan name to eth ocsev Linux - Newbie 3 06-11-2012 04:13 PM
attansic L1 eth card and realtek 8139 don't work in the same time djevilx Linux - Hardware 6 03-16-2008 02:05 PM
How can I change/set the MAC address at boot time under SuSE? Basel Linux - Networking 6 10-20-2006 12:23 AM
Change Eth Device gamehack Slackware 4 09-01-2003 11:31 AM


All times are GMT -5. The time now is 08:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration