You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a RPi zero (2) is being connected to a pc it will get a new random mac address each time.
When ifupdown was removed it got trivial to get g_ether working again, so I installed it again which made everything work again. #810
But it would be preferable if g_ether got a fixed MAC address at first boot. I was trying to add the following to /usr/lib/raspberrypi-sys-mods/firstboot:
You may have better luck on the forum, since this isn't really a pi-gen issue.
In firstboot, / is mounted as read-only for most of the time, so where you're adding that line may make a difference. Also it may be running before the g_ether module is loaded, so the lines you're expecting may not have appeared in dmesg yet. Instead of trying to get the addresses from dmesg, I'd derive them form the device serial number in some way.
At some point firstboot should disappear altogether in favour of initramfs hooks like this one. So that may be a better approach here as well.
Ok, thank you. Appreciate you taken the time to reply. I know it isn't a pi-gen issue, I've asked also on rpi stackexchange but the people there are usually kind of jerks. I'll close it.
When a RPi zero (2) is being connected to a pc it will get a new random mac address each time.
When ifupdown was removed it got trivial to get g_ether working again, so I installed it again which made everything work again.
#810
But it would be preferable if g_ether got a fixed MAC address at first boot. I was trying to add the following to
/usr/lib/raspberrypi-sys-mods/firstboot
:echo 'options g_ether host_addr='$(dmesg | awk '/: HOST MAC/{print $NF}')' dev_addr='$(dmesg | awk '/: MAC/{print $NF}') > etc/modprobe.d/g_ether.conf
Without any luck, it didn't work. As I am still new at bash, so I am probably doing something wrong. Some guidance would be nice.
The text was updated successfully, but these errors were encountered: