need help to change eth numbers at boot time
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 :
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 :
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
You'll need a udev rule...
See this for an example;
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...
Here's,an example closer to what you want;
yes, thanks a lot JaseP, that's exactly what I was looking for !
It worked well
|All times are GMT -5. The time now is 11:52 PM.|