[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

predefine interfaces by MAC with udev?



On Thu, Feb 07, 2008 at 12:00:57PM +0100, Chris Fanning wrote:
> Hi,
> 
> We're trying to boot diskless servers that have two network interfaces.
> 
> We boot from one interface (dhcpd/MAC), but when initramfs kicks in,
> udev (isn't it?) sets the interface names and then (often) the boots
> process fails becuase it's looking for the filesystem on the wrong
> interface.
> 
> We can't use the MAC as an option for 'ifconfig' or 'ip add add', so
> we need to change something with udev, right?
> 
> KERNEL=="eth*", SYSFS{address}=="00:12:34:fe:dc:ba", NAME="eth0"
> KERNEL=="eth*", SYSFS{address}=="00:56:78:98:76:54", NAME="eth1"
> 
> I've looked around the scripts but nothing as jumped out at me.

/etc/udev/rules.d/z25_persistent-net.rules is generated by
/etc/udev/rules.d/z45_persistent-net-generator.rules

It might provide you some inspiration.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



Reply to: