Page 1 of 1
What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 9:46 am
by gibs
Hi,
Since 1 week I have noticed that my Mister Mac Address change each reboot.
I haven't modified anything (hardware of software).
I have decided to rollback to the latest linux.img from 2022 and I don't have this issue anymore.
How to fix that issue so I can continu to update my mister ?
My USB adapter is the : Bus 001 Device 004: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter
Regards
gibs
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 10:22 am
by RealLarry
Can't give an answer yet, but have a look at this thread regarding MiSTer's MAC address and how to set a fixed MAC address (see (my) last post in this thread).
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 12:12 pm
by gibs
RealLarry wrote: ↑Wed May 17, 2023 10:22 am
Can't give an answer yet, but have a look at this thread regarding MiSTer's MAC address and how to set a fixed MAC address (see (my) last post in this thread).
Thanks, I tried that before posting but did not work in my case.
I have created /media/fat/linux/u-boot.txt with the mac address in it but did not changed anything.
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 1:13 pm
by RealLarry
gibs wrote: ↑Wed May 17, 2023 12:12 pm
RealLarry wrote: ↑Wed May 17, 2023 10:22 am
Can't give an answer yet, but have a look at this thread regarding MiSTer's MAC address and how to set a fixed MAC address (see (my) last post in this thread).
Thanks, I tried that before posting but did not work in my case.
I have created /media/fat/linux/u-boot.txt with the mac address in it but did not changed anything.
It isn't??? but it has to! I'm wondering about your both issues: A changing MAC on reboot and defining a fixed MAC isn't working. "Impossible".
What about backing up your SD and creating a fresh one?
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 2:13 pm
by Stupid Dufus
I had the problem too after the latest linux update. I found that using the script here fixed the problem for me. I imagine I'll have to run it again after the next linux update though
viewtopic.php?f=27&p=49700#p49700
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 5:35 pm
by gibs
RealLarry wrote: ↑Wed May 17, 2023 1:13 pm
gibs wrote: ↑Wed May 17, 2023 12:12 pm
RealLarry wrote: ↑Wed May 17, 2023 10:22 am
Can't give an answer yet, but have a look at this thread regarding MiSTer's MAC address and how to set a fixed MAC address (see (my) last post in this thread).
Thanks, I tried that before posting but did not work in my case.
I have created /media/fat/linux/u-boot.txt with the mac address in it but did not changed anything.
It isn't??? but it has to! I'm wondering about your both issues: A changing MAC on reboot and defining a fixed MAC isn't working. "Impossible".
What about backing up your SD and creating a fresh one?
I confirm again, it isn't event if it has to
/root# cd /media/fat/linux/
/media/fat/linux# cat u-boot.txt
ethaddr=16:88:11:C3:71:7D
Then I reboot and I get this mac address : 00:E0:4C:77:20:78
16:88:11:C3:71:7D is the real mac address and the one that were reserved in my router for years. This is also the mac address that show up when I replace the linux.img with the lastest from 2022.
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 5:50 pm
by gibs
Stupid Dufus wrote: ↑Wed May 17, 2023 2:13 pm
I had the problem too after the latest linux update. I found that using the script here fixed the problem for me. I imagine I'll have to run it again after the next linux update though
viewtopic.php?f=27&p=49700#p49700
Thanks but from what I see, it set-up the mac address for eth0.
my issue is on wlan0.
I did the change in u-boot.txt manualy and it did not work.
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 5:56 pm
by RealLarry
gibs wrote: ↑Wed May 17, 2023 5:50 pm
Thanks but from what I see, it set-up the mac address for eth0.
my issue is on wlan0.
I did the change in u-boot.txt manualy and it did not work.
Ah! I thought you meant eth0; that is what the parameter in u-boot.txt is for.
But the MAC of your WiFi adapter should be statically defined in it's firmware. I'll have a look at this strange issues tomorrow...
Meanwhile please post the name/brand and USB ID of your WiFi adapter (by starting lsusb in MiSTer's shell/ssh connection)
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 7:37 pm
by gibs
RealLarry wrote: ↑Wed May 17, 2023 5:56 pm
Meanwhile please post the name/brand and USB ID of your WiFi adapter (by starting lsusb in MiSTer's shell/ssh connection)
This is what I did in my initial message
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 17, 2023 11:44 pm
by Stupid Dufus
gibs wrote: ↑Wed May 17, 2023 5:50 pm
Stupid Dufus wrote: ↑Wed May 17, 2023 2:13 pm
I had the problem too after the latest linux update. I found that using the script here fixed the problem for me. I imagine I'll have to run it again after the next linux update though
viewtopic.php?f=27&p=49700#p49700
Thanks but from what I see, it set-up the mac address for eth0.
my issue is on wlan0.
I did the change in u-boot.txt manualy and it did not work.
There is a file in the zip in the post I linked for wlan0 as well.
Re: What keeps changing my MAC Address on reboot ?
Posted: Thu May 18, 2023 4:04 am
by RealLarry
I can't find a satisfactory answer for what is happening here. Best would be to open an issue about that here
A solution meanwhile worth to try could be to edit the file /etc/udev/rules.d/70-persistent-net.rules and to edit the first "SUBSYSTEM==" line to
Code: Select all
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="16:88:11:c3:71:7d", NAME="wlan0", RUN+="/sbin/ifup -a"
Re: What keeps changing my MAC Address on reboot ?
Posted: Wed May 24, 2023 8:24 pm
by gibs
Thanks, will try and let you know.
Re: What keeps changing my MAC Address on reboot ?
Posted: Thu Sep 14, 2023 8:58 pm
by shark800
I had same issue - each reboot different MAC and therefore DHCP server assigned different IP. After some investigation I found this shell script
Code: Select all
/media/fat/Scripts/mac_address_change.sh
and as I was not sure if I can delete it I "improved" it with single line of code - exit 0
Code: Select all
# Version 1.0 - 2019-05-13 - First commit
exit 0
========= OPTIONS ==================
MAC_ADDRESS=""
Since then it behaves well again
Petr