2 added 85 characters in body
source | link

I'm working with USB network interfaces (Ethernet over USB), on a Raspberry Pi. The goal is basically to flash several Linux machines at the same time through TFTP U-boot, using the four USB ports offered by the Raspberry Pi.

Right now, I've defined four usb interfaces, and each of them has an IP address. I've set up the tftp server. It works fine, however if I try to plug several Linux machines at the same time, it seems like DHCP mixes the interfaces (like, old usb0 becomes new usb1 and old usb1 becomes new usb0), and I believe it creates confusion in the leases and so the TFTP exchanges seem to get stuck in a soft-locked state.

Well, this can't happen. So I set up four udev rules that give these devices a fixed name, based on the usb port they're plugged in. Something like this :

SUBSYSTEM=="usb", ACTION=="add", DEVPATH=="*.2", NAME="usb0"

(I got these values using udevadm info)

I obviously need to rename the device, since it will be the name of my network interface. So, in this case, a symlink isn't of any use (unless there is something I'm not aware of).

However, systemd-udevd doesn't let me rename the device :

Feb 28 17:25:01 pi systemd-udevd[3749]: NAME="usb2" ignored, kernel device nodes can not be renamed; please fix it in /lib/udev/rules.d/99-systemd.rules:49

I've read online that this was possible before version 15.04, so I believe there should be a way to restore this old behavior?

Any piece of advice would be greatly appreciated.

I'm working with USB network interfaces (Ethernet over USB), on a Raspberry Pi. The goal is basically to flash several Linux machines at the same time through TFTP U-boot.

Right now, I've defined four usb interfaces, and each of them has an IP address. It works fine, however if I try to plug several Linux machines at the same time, it seems like DHCP mixes the interfaces (like, old usb0 becomes new usb1 and old usb1 becomes new usb0), and I believe it creates confusion in the leases and so the TFTP exchanges seem to get stuck in a soft-locked state.

Well, this can't happen. So I set up four udev rules that give these devices a fixed name, based on the usb port they're plugged in. Something like this :

SUBSYSTEM=="usb", ACTION=="add", DEVPATH=="*.2", NAME="usb0"

(I got these values using udevadm info)

I obviously need to rename the device, since it will be the name of my network interface. So, in this case, a symlink isn't of any use (unless there is something I'm not aware of).

However, systemd-udevd doesn't let me rename the device :

Feb 28 17:25:01 pi systemd-udevd[3749]: NAME="usb2" ignored, kernel device nodes can not be renamed; please fix it in /lib/udev/rules.d/99-systemd.rules:49

I've read online that this was possible before version 15.04, so I believe there should be a way to restore this old behavior?

Any piece of advice would be greatly appreciated.

I'm working with USB network interfaces (Ethernet over USB), on a Raspberry Pi. The goal is basically to flash several Linux machines at the same time through TFTP U-boot, using the four USB ports offered by the Raspberry Pi.

Right now, I've defined four usb interfaces, and each of them has an IP address. I've set up the tftp server. It works fine, however if I try to plug several Linux machines at the same time, it seems like DHCP mixes the interfaces (like, old usb0 becomes new usb1 and old usb1 becomes new usb0), and I believe it creates confusion in the leases and so the TFTP exchanges seem to get stuck in a soft-locked state.

Well, this can't happen. So I set up four udev rules that give these devices a fixed name, based on the usb port they're plugged in. Something like this :

SUBSYSTEM=="usb", ACTION=="add", DEVPATH=="*.2", NAME="usb0"

(I got these values using udevadm info)

I obviously need to rename the device, since it will be the name of my network interface. So, in this case, a symlink isn't of any use (unless there is something I'm not aware of).

However, systemd-udevd doesn't let me rename the device :

Feb 28 17:25:01 pi systemd-udevd[3749]: NAME="usb2" ignored, kernel device nodes can not be renamed; please fix it in /lib/udev/rules.d/99-systemd.rules:49

I've read online that this was possible before version 15.04, so I believe there should be a way to restore this old behavior?

Any piece of advice would be greatly appreciated.

1
source | link

Change kernel device node in Ubuntu 16.04 (static usb interface name based on the port it's plugged in)

I'm working with USB network interfaces (Ethernet over USB), on a Raspberry Pi. The goal is basically to flash several Linux machines at the same time through TFTP U-boot.

Right now, I've defined four usb interfaces, and each of them has an IP address. It works fine, however if I try to plug several Linux machines at the same time, it seems like DHCP mixes the interfaces (like, old usb0 becomes new usb1 and old usb1 becomes new usb0), and I believe it creates confusion in the leases and so the TFTP exchanges seem to get stuck in a soft-locked state.

Well, this can't happen. So I set up four udev rules that give these devices a fixed name, based on the usb port they're plugged in. Something like this :

SUBSYSTEM=="usb", ACTION=="add", DEVPATH=="*.2", NAME="usb0"

(I got these values using udevadm info)

I obviously need to rename the device, since it will be the name of my network interface. So, in this case, a symlink isn't of any use (unless there is something I'm not aware of).

However, systemd-udevd doesn't let me rename the device :

Feb 28 17:25:01 pi systemd-udevd[3749]: NAME="usb2" ignored, kernel device nodes can not be renamed; please fix it in /lib/udev/rules.d/99-systemd.rules:49

I've read online that this was possible before version 15.04, so I believe there should be a way to restore this old behavior?

Any piece of advice would be greatly appreciated.