# How to disable 70-pesistent-net.rules?

## NiceGuy

Hi Everyone,

I have built a gentoo machine that upon boot, assigns network labels ("eth0", "eth1", "eth2" ...) to specific MAC addresses configured in

the /etc/udev/rules.d/70-persistent-net.rules.

Regardless, the system configures the labels .. and somehow(??) writes in the udev file storing there configuration labels for next boot.

I am in the need of disbaling this, does anyone know how? I have deleted the configurations inside the 70-persistent-net-rules .. but somehow this file 

keeps getting re-written/re-configured.

Thanks

----------

## sera

Don't know what triggers this auto rewrite and why one would like such a behavior at all.

At least chmod -w /etc/udev/rules.d/70-persistent-net.rules should be a workaround and if you catch a write error you are closer to a true solution.

----------

## wyv3rn

MACs are tied to interface names to keep the interface name -> device associations the same between reboots.  Prior to this interface names were assigned to devices in the order the devices appeared.  Kernel upgrades or changes such as built-in vs. moduled drivers can potentially (and sometimes do - usually on a box 200 miles away) change the probe order of the busses, devices, etc. upon reboot.

Take a look @ /etc/init.d/udev-postmount, you can disable it there.

----------

## MorpheuS.Ibis

why not simply change the names of interfaces in the config file to match what you need?

----------

## jfp

You might look at /etc/conf.d/udev

```
# /etc/conf.d/udev: config file for udev

# We discourage to disable persistent-net!!

# this may lead to random interface naming

# Disable adding new rules for persistent-net

persistent_net_disable="no"

...
```

----------

## NiceGuy

Hi again,

I've built my gentoo install inside a VMWare Server virtual machine and will be porting it to other virtual machines running on different systems.  So in reality .. the interface mac address keep changing 

Regardless, the image has (is configured) for only the one "eth0" ... having the 70-persistent-net.rules always causes this interface to be re-lablled when porting (gernrally on the first boot only) to "eth1".

Of course I have some services inside the VM image environment that are configured to run on eth0 .. so in short I do not require the interface relabeling that udev is currently providing.

As of right now .. I simply deleted the 70-persistent-net.rules AND 75 -persistent-net-generator.rules file.

I believe that is all that is required, but not 100% sure 

Can anybody verify/confirm?

Thanks

----------

## richard.scott

You can delete 70-persistent-net.rules  and it will re-create the interface (i.e. eth0) on reboot.

Howwever, if you also delete 75 -persistent-net-generator.rules file then it may not re-create eth0 on reboot as there is no rule to tell it to do so.

Rich.

----------

