-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mac address changes on each reboot #471
Comments
🤔 no... could you provide the output from |
Sure! Here is my >cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2708
Revision : 0000
Serial : 00000000481f76bc |
the Revision number in that output is what board exactly is this happening on? |
Thanks for pointing the origin of the problem @goranche In fact, I have 2 raspberries, whose >cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2708
Revision : 0000
Serial : 00000000481f76bc >cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2708
Revision : 000e
Serial : 00000000807cd7d5 Their both Model B Rev 2 (revision I bought both of them at the same time, and both went well for months and years. And now, for no particular reason, one of the raspberries went wrong and lost its revision. I'd like to know why. If anyone has a clue about that, please tell me! |
you could try adding the following to
boot, and check disclaimer: this of course is not guaranteed to do anything, and might break stuff :D |
also, just to be sure... does the serial number change between boots? |
The serial number does not seem to change between boots. |
Adding |
huh... 🤔 I'm not sure about the "e", you might try 14, since it's supposed to be hex other than that... I'm out of ideas, sorry 😉 |
The serialnumber is hardcoded into the SoC. It cannot be changed. If it appears changed this may mean that the firmware is in someway altered. Possibly an SEU How old is the image on your SD? i.e. When did you install it? |
not really, no... that would make production of the SoCs way too expensive... the serial number (as well as the hardware revision) can be written to, but I'm not sure with which version of the firmware (or possibly hardware) this was removed from the public interface (mainly because of licensing the mp4 stuff)... but it was possible to change the number (to a random number one) how else do you think the hardware revision could be set to 0? 😉 |
I still haven't found a solution for this problem. However, I found a workaround that consist in hard coding a mac address as described in this post (see post from dRm on Tue May 26, 2015 2:06 am). To apply this workaround, just edit the file
I'm still looking for a real solution. |
@oupala What firmware version is installed on the "broken" Pi? Did you make an "apt-get upgrade" recently? I just noticed that both my RPis (2B and 3B) have the same problem (Revision = 0000, can't say anything about the MAC because I don't use eth0), whenever I boot with the new firmware package: raspberrypi-bootloader-nokernel 1.20170427-1. |
oh, that's not good... 🤔 |
@Zeerix I'm using raspbian-ua-netinst v1.0.9 (from this repo). I first discovered this problem yesterday while reinstalling raspbian from scratch as described in the doc. I don't know which firmware is installed, but it should be the one installed by the installation process of raspbian-ua-netinst. |
Maybe this thread can give a clue on what's happening. Extract:
|
Could there be a relation with #472? |
interesting... possible that something in a package (probably kernel or boot related) changed... |
doubt it... possible, but unlikely |
My guess: Kernel is old (May 2016), firmware is new (April 2017) and something changed in how things are passed between them. |
That's the newest firmware in Raspbian, which just got updated. Myself wrote:
I just updated to kernel 4.9 from the Raspbian repository, and the Revision is back to normal. So again, my guess is that the old kernel is incompatible with the new firmware package. After the update, uname -a shows this: |
I noticed that my both raspberry pi have the same kernel but different firmware. One is working ok, the other one has the problem.
>uname -a
Linux pi2-ok 4.4.0-1-rpi #1 Debian 4.4.6-1+rpi14 (2016-05-05) armv6l GNU/Linux
>sudo /opt/vc/bin/vcgencmd version
May 20 2016 19:02:21
Copyright (c) 2012 Broadcom
version faf071dd4885c5ac1a89483d35a5326e7f69495f (clean) (release)
>uname -a
Linux pi2-ko 4.4.0-1-rpi #1 Debian 4.4.6-1+rpi14 (2016-05-05) armv6l GNU/Linux
>sudo /opt/vc/bin/vcgencmd version
Apr 27 2017 17:21:38
Copyright (c) 2012 Broadcom
version 17af5814bb19dbb7c70ccd2c845b80a160943811 (clean) (release) I wonder how is raspbian-ua-netinst managing kernel and firmware version at first install and at reinstall. Maybe @diederikdehaas has an idea about that! |
There's definitely an upstream problem. This morning's install:
|
End of the log:
After the reboot:
Odd. |
Installing with #475 (installer using kernel 4.9) in place resulted in (ignoring, for the moment, the HWRNG error):
So, using kernel 4.9 seems to fix this.
|
FWIW: I maintain a sdcard image (https://flightaware.com/adsb/piaware/build) which is built via raspbian-ua-netinst. The piaware software, for historical installs, relies on the hardware MAC address to identify the user. Recently there have been a spate of reports from users who have done a package upgrade from older images, which will upgrade the firmware but not the kernel IIRC, who then end up with randomly assigned MACs and so lose their feeder<->user association. So far I have not managed to reproduce it on my own Pi but it sounds like the same problem described here and the kernel vs. firmware mismatch is a pretty big clue which I will investigate some more.. edit: reproduced the same problem by upgrading the bootloader but not the kernel. |
PR #475 will fix this. |
Hello, |
Does anyone knows how and when this could be fixed? Is it just a matter a merging pr #475 ? |
When you're on an already installed system running an upgrade and then fixing
If you plan to reinstall #475 should solve it. |
As I'm testing the full installation of a raspbian home server via ansible, I need to reinstall the system in order to test my playbook. I have to wait for the merge request then. |
If you are building your own installer from the v1.1.x branch, you can merge the pull request locally, or you can clone the pull request branch (do a search for "github clone pull request") and then build from that branch. |
It appears that #475 has been merged on 15 Jul while release v1.1.1-beta3 has been published on 3 Aug. I should then be able to test this beta release. |
The release v1.1.1-beta3 seems to fix the bug as I succeeded to install it (so #485 seems to be fixed also) and boot with a MAC address that does not change. I can't tell if I got the original MAC address as I can't remember it, but So I guess the problem has been fixed upstream. But I can't tell how it would work with the old 1.0.x installer. |
This just happened to me... I installed network-manager to utilize nmcli, however it kept saying the wlan0 was unavailable. I rebooted the pi zero w and it still wouldn't work, so I went back to square one and set up the wifi using wpa_supplicant.conf. Upon doing so I was able to connect via wifi but unable to SSH. I rebooted a couple of times and found the MAC address was changing each time. I removed network-manager, rebooted, and everything is back to normal. |
yeah, it still happens. I don't think anything mentioned above helps on RPi 3.
a simple update ended up as a painful troubleshooting for me. I have no clue how or when is this mac address generated, but instead of tinkering i am pretty much trying to figure out how to fix this randomization thing. |
Which installer version do you use? And which kernel? |
I use raspbian stretch, lite, updated recently to kernel 4.9.41-v7+ (dc4@dc4-XPS13-9333). My CPU has a valid revision (a22082) but that doesn't stop wlan driver from randomizing mac address. Something else must be going on. |
Are you actually using this installer? Because, I don't think it uses kernel 4.9.41 at all. If yes, try installing with the most recent version. |
I used installer, and then issued apt-get update && apt-get upgrade. FWIW i see the correct mac address reported via |
for anyone who wanders here with same problem and need immediate remedy: edit
this seems to be working. sadly, that's only a work-around for the problem, not actual fix. |
Which version of the installer are you talking about. |
https://www.raspberrypi.org/downloads/raspbian/ i thought i mentioned this 5 comments above. Unless that's not the installer you're asking for, i probably need a little more clarifications. Googling around for 'raspberry pi installer' doesn't give any other information than installer images, so i figure that's what you were looking for...? |
For support on the Raspberry Pi Foundation's distribution you can use their forums: |
Found a post on the rpi forums. Apparently NetworkManager can randomize your mac to make it harder to people to snoop on traffic. Here is a blog post on how to turn it off. To disable the MAC address randomization create the file
with the content:
|
@marklester this works like charm |
I realize this is an old thread....but the solution posted above doesn't work if you install the home assistant image....it only works if you install the docker/supervised image. I can't get to /etc/network/manager even with "terminal" addins. How do you disable the security feature that changes the MAC on a raspberry pi 3? |
This is still a problem today. Just set up a brand new fresh out of factory Raspberry Pi 4 Model B. Installed a freshly downloaded raspian image two days ago from this posts date. |
This has nothing to do with this installer. Use the appropriate channels for your issue. |
I have a problem and the problem is simple to explain: the mac address of my raspberry pi 1 changes on each reboot.
It make dhcp and nat config hard to maintain.
Do you have such behaviour on your raspberries?
The text was updated successfully, but these errors were encountered: