predefine interfaces by MAC with udev?
Hi,
Well, I compiled the kernel with
CONFIG_SYSFS_DEPRECATED disabled
And it hasn't helped. :(
I want to boot from 00:01:02:f3:ef:8c, pxe boot works, nfs mount fails.
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:01:02:f3:ef:8c", NAME="eth0"
#SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}==" 00:0a:5e:5e:e0:fa",
NAME="eth0"
I have modified /etc/initramfs-tools/hooks/udev
#mkdir$DESTDIR/lib/udev/
mkdir -p $DESTDIR/lib/udev/
cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/
copy_exec /lib/udev/ide.agent /lib/udev/
for program in /lib/udev/*_id; do
copy_exec $program /lib/udev/
done
now ip link sh' shows
eth0: 00:0a:5e:5e:e0:fa
eth1_rename: 00:01:02:f3:ef:8c
(before it just showed eth1: 00:01:02:f3:ef:8c)
I've tried everything I can think of.
Are the nics hotplug devices?
I've also looked at
vim init-premount/udev
udevd --verbose log_priority=debug
and I can see
udev: parse_file: reading /etc/udev/rules.d/z25_persistent-net.rules
udev: parse_file: reading /etc/udev/rules.d/z45_persistent-net-generator.rules
I've got a headache ;)
Chris.
On Feb 10, 2008 2:07 PM, Jordi Pujol <jordipujolp at gmail.com> wrote:
> another test, more complex,
> also works selecting device names by MAC
>
> ifconfig
> **********************************
> jpeth0 Link encap:Ethernet HWaddr 00:1b:fc:19:ef:43
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> jpwlan0 Link encap:Ethernet HWaddr 00:19:5b:78:f3:df
> inet addr:192.168.44.132 Bcast:192.168.44.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:18 errors:0 dropped:0 overruns:0 frame:0
> TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:4883 (4.7 KiB) TX bytes:720 (720.0 B)
> **********************************
>
> cat /etc/udev/rules.d/z25_persistent-net.rules
> **********************************
> # PCI device 0x1969:0x1048 (atl1)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:fc:19:ef:43",
> NAME="jpeth0"
> # USB device 07d1:3c03 (rt73usb)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:5b:78:f3:df",
> ATTR{type}=="1", NAME="jpwlan0"
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:fc:19:ef:44",
> NAME="jpeth0"
> # USB device 07d1:3c03 (rt73usb)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:5b:78:f3:d0",
> ATTR{type}=="1", NAME="jpwlan0"
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:fc:19:ef:45",
> NAME="jpeth01"
> # USB device 07d1:3c03 (rt73usb)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:5b:78:f3:d1",
> ATTR{type}=="1", NAME="jpwlan01"
> **********************************
>
> El Sunday 10 February 2008 12:56:52 Jordi Pujol va escriure:
>
> > Hello list,
> >
> > After creating and installing a kernel with CONFIG_SYSFS_DEPRECATED
> > disabled the interfaces are renamed by udev,
> > and that is working,
> >
> > # ifconfig
> > **********************************
> > jpeth0 Link encap:Ethernet HWaddr 00:1b:fc:19:ef:43
> > UP BROADCAST MULTICAST MTU:1500 Metric:1
> > RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> > collisions:0 txqueuelen:1000
> > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> >
> > jpwlan0 Link encap:Ethernet HWaddr 00:19:5b:78:f3:df
> > inet addr:192.168.44.132 Bcast:192.168.44.255
> > Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> > RX packets:22 errors:0 dropped:0 overruns:0 frame:0
> > TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
> > collisions:0 txqueuelen:1000
> > RX bytes:5472 (5.3 KiB) TX bytes:720 (720.0 B)
> > **********************************
> >
> > cat /etc/udev/rules.d/z25_persistent-net.rules
> > **********************************
> > # PCI device 0x1969:0x1048 (atl1)
> > SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:fc:19:ef:43",
> > NAME="jpeth0"
> > # USB device 07d1:3c03 (rt73usb)
> > SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:5b:78:f3:df",
> > ATTR{type}=="1", NAME="jpwlan0"
> > **********************************
> >
> > Hope this helps,
> >
> > Jordi Pujol
> >
> > El Friday 08 February 2008 20:44:13 Jordi Pujol va escriure:
> > > Now my Live system has network interfaces with personalized name
> > >
> > > ifconfig
> > > *********************************************************
> > > eth-mypc Link encap:Ethernet HWaddr 00:1b:fc:19:ef:43
> > > UP BROADCAST MULTICAST MTU:1500 Metric:1
> > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> > > collisions:0 txqueuelen:1000
> > > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> > > *********************************************************
> > >
> > > cat /etc/udev/rules.d/010_netinterfaces.rules
> > > *********************************************************
> > > # rules
> > >
> > > KERNEL=="eth*", SYSFS{address}=="00:1b:fc:19:ef:43", NAME="eth-mypc"
> > > KERNEL=="eth*", SYSFS{address}=="00:12:34:fe:dc:ba", NAME="eth-mypc"
> > > KERNEL=="eth*", SYSFS{address}=="00:56:78:98:76:54", NAME="eth-mypc"
> > >
> > > KERNEL=="wlan*", SYSFS{address}=="00:56:78:98:76:54", NAME="wlan-mypc"
> > > KERNEL=="wlan*", SYSFS{address}=="00:12:34:fe:dc:ba", NAME="wlan-mypc"
> > > KERNEL=="wlan*", SYSFS{address}=="00:19:5b:78:f3:df", NAME="wlan-mypc"
> > > *********************************************************
> > >
> > > That is the first config supposed to work, when listing various
> > > interfaces then udev selects that interface corresponding to the MAC
> > > address, and renames it.
> > >
> > > The interfaces are created, but not working into the started OS.
> > > dmesg shows some lines about this,
> > >
> > > *********************************************************
> > > net wlan-mypc: device_rename: sysfs_create_symlink failed (-17)
> > > udev: renamed network interface wlan0 to wlan-mypc
> > > *********************************************************
> > >
> > > searching kernel.org about this error, we must create a kernel with
> > > CONFIG_SYSFS_DEPRECATED disabled, Pending to test.
> > >
> > > Regards,
> > >
> > > Jordi Pujol
>
>
>
> _______________________________________________
> debian-live-devel mailing list
> debian-live-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel
>
Reply to: