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 |
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. |
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... |
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...
|
OK,...
Here's,an example closer to what you want; http://linux-tips.org/article/73/per...ming-with-udev |
yes, thanks a lot JaseP, that's exactly what I was looking for !
It worked well thanks again bests Julien |
All times are GMT -5. The time now is 09:29 AM. |