rkp4k
Posts: 3
Joined: Sat Jul 27, 2013 3:36 pm

Unable to create udev rules for USB NICs

Sat Jul 27, 2013 3:45 pm

Hello,

I am running "Linux raspberrypi 3.6.11+ #510 PREEMPT Mon Jul 22 21:55:20 BST 2013 arm61 GNU/Linux," and I have installed multiple USB NICs (plugged into a hub). Boths NICs use the AX88772 chipset and work fine. The difficulty I am running into is that /etc/udev/rules.d/75-persistent-net-generator.rules is not being created, so the NICs are not consistently assigned to interfaces across reboots. For example, NIC #1 was assigned to eth1 and NIC#2 was assigned to eth2, but after I rebooted, they swapped.

Based on what I have read, rebooting should generate the rules file, but that has not worked for me. Any ideas of how else I can get this file created? Thanks for the information.

-Ryan

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Unable to create udev rules for USB NICs

Sat Jul 27, 2013 4:04 pm

For some reason udev configuration was modified to stop assigning names for eth and wlan when wheezey appeared. Why I don't know.

Can someone else explain why?


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

rkp4k
Posts: 3
Joined: Sat Jul 27, 2013 3:36 pm

Re: Unable to create udev rules for USB NICs

Sat Jul 27, 2013 4:16 pm

I think some previous versions had eth included in the device name whitelist in /lib/udev/rules.d/75-persistent-net-generator.rules. However, mine does not:

# device name whitelist
KERNEL!="ath*|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
GOTO="persistent_net_generator_end"

MrEngman
Posts: 4032
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Unable to create udev rules for USB NICs

Sat Jul 27, 2013 5:03 pm

rkp4k wrote:I think some previous versions had eth included in the device name whitelist in /lib/udev/rules.d/75-persistent-net-generator.rules. However, mine does not:

# device name whitelist
KERNEL!="ath*|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
GOTO="persistent_net_generator_end"
You're right. In some versions it looked like

Code: Select all

# device name whitelist
KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
                                        GOTO="persistent_net_generator_end"
The eth*| section was dropped from most versions originally I think then wlan*[0-9]|

I have added back the wlan*[0-9] section in some of my sd cards as I sometimes have multiple wifi adaptors connected and it makes life easier having the same names assigned on each boot.

Ryan
You could try modifying /lib/udev/rules.d/75-persistent-net-generator.rules and add in the eth*| section to see what happens.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Unable to create udev rules for USB NICs

Sat Jul 27, 2013 5:07 pm

You could always just manually add appropriate entries to /etc/udev/rules.d/70-persistent-net.rules instead of letting the auto-generator do it for you.

rkp4k
Posts: 3
Joined: Sat Jul 27, 2013 3:36 pm

Re: Unable to create udev rules for USB NICs

Sat Jul 27, 2013 9:56 pm

You could try modifying /lib/udev/rules.d/75-persistent-net-generator.rules and add in the eth*| section to see what happens.
MrEngman, that worked as I now have entries for all of my NICs.

Thanks,
-Ryan

User avatar
Onira
Posts: 233
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland

Re: Unable to create udev rules for USB NICs

Sun Oct 20, 2013 6:51 pm

Confirm!

I made my own /etc/udev/rules.d/70-persistent-net.rules file and it works fine :D
Cogito ergo sum

Return to “Troubleshooting”