udev rule not 'used' till after reloading module

Kernels & Hardware, configuring network, installing services

udev rule not 'used' till after reloading module

Postby greg-905 » 2017-09-12 15:38

Hello,

The intention is to rename a NIC. This particular card is a 10Gbit Chelsio using the cxgb4 driver.

I made an entry into /etc/udev/rules.d/70-persistant.rules which doesn't seem to work as expected when the system is coming up. The interface comes up with the 'old' name.

After the system is up if I do a "rmmod cxgb4 && modprobe cxgb4", the interface comes up with the name we wish to use.

Is there a way I can correct this? I've changed the names of other interfaces and never experienced this issue before, not sure which is the best way to correct.

greg
greg-905
 
Posts: 1
Joined: 2017-09-12 15:07

Re: udev rule not 'used' till after reloading module

Postby debiman » 2017-09-14 18:44

i'm guessing the module is being loaded before the udev rule executes.
maybe you can make that rmmod && insmod part of the udev rule?
does seem a bit hackish though.
can't you post the rule in question?
User avatar
debiman
 
Posts: 1202
Joined: 2013-03-12 07:18

Re: udev rule not 'used' till after reloading module

Postby wizard10000 » 2017-09-14 22:37

udev responds to system events, I'm pretty sure the issue is that your NIC is initialized before udev starts so there's no event to trigger your udev rule :D
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1187
Joined: 2011-05-09 20:02
Location: midwestern us

Re: udev rule not 'used' till after reloading module

Postby ralph.ronnquist » 2017-09-15 06:49

Did you rebuild initrd after having fixed the rule file?
Code: Select all
# update-initramfs -u -k all
Otherwise it's not in the pre-pivot udev environment (in initrd), which is used when the module is first loaded.
User avatar
ralph.ronnquist
 
Posts: 300
Joined: 2015-12-19 01:07
Location: Melbourne, Australia


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable