Welcome! Log In Create A New Profile

Advanced

Pogoplug Pro random MAC address after upgrading to kernel 5.15.158

Posted by nwestfal 
Pogoplug Pro random MAC address after upgrading to kernel 5.15.158
October 13, 2025 12:08PM
Hi all, I decided to try updating my Pogoplug Pro since it hadn't been updated in a couple of years. I was on kernel version 4.14.180 (with a buster rootfs) and went through the instructions in the Oxnas thread to get it updated. I thought it wasn't booting correctly as I could no longer ping it with the new kernel. I eventually figured out that it was showing up in my router with a random MAC address instead of as defined in the ethaddr environment variable in uBoot.

I also tried with a new rootfs with bookworm and it is exhibiting the same behavior.

This is with U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)

Here is my fw_printenv output:

bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
usb_custom_params=zswap.enabled=1
device=0:1
devices=usb ide
disks=0 1 2 3
ethact=mii0
if_netconsole=ping $serverip
dtb_file=/boot/dts/ox820-pogoplug-pro.dtb
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 0x60500000 /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x60510000  $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
preboot=run preboot_nc
ipaddr=10.10.10.3
serverip=10.10.10.5
ethaddr=00:25:31:01:B4:72
mtdparts=mtdparts=41000000.nand-controller:14m(boot),-(data)

ifconfig eth0 output:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.77.117  netmask 255.255.255.0  broadcast 172.16.77.255
        inet6 fe80::d4c9:63ff:fef4:af62  prefixlen 64  scopeid 0x20<link>
        ether d6:c9:63:f4:af:62  txqueuelen 1000  (Ethernet)
        RX packets 5471  bytes 431169 (421.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 534  bytes 95765 (93.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 58  base 0xc000

It's a different MAC address on every boot.

Is it a known thing with newer kernels? What is the best way to make it use the ethaddr again?



Edited 1 time(s). Last edit at 10/13/2025 12:59PM by nwestfal.
Re: Pogoplug Pro random MAC address after upgrading to kernel 5.15.158
October 13, 2025 03:08PM
nwestfal,

> it was showing up in my router with a
> random MAC address instead of as defined in the
> ethaddr environment variable in uBoot.
>
> I also tried with a new rootfs with bookworm and
> it is exhibiting the same behavior.

I don't recall seeing this in bookworm with this kernel.

> Is it a known thing with newer kernels? What is
> the best way to make it use the ethaddr again?

I think it is something peculiar about the ethernet driver in this kernel. But let's fix this first.

There are 2 ways to make sure the real MAC address is used. Chose approach 1 for a foolproof setup but less flexible.

1. Add it to your /etc/network/interfaces

For example,
# cat /etc/network/interfaces
rename /end0=eth0
auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address 192.168.0.224
        netmask 255.255.255.0
        gateway 192.168.0.1
        hwaddress ether XX:XX:XX:XX:XX:XX

Where,

XX:XX:XX:XX:XX:XX is the real MAC address for your box
end0 might be some name assigned using the "predictable naming" scheme in later Debian version.

2. Use the attached script set_persistent_mac_address

This script is part of the rootfs for the MVEBU boxes because some of those boxes have u-boot that does not pass the MAC address to Linux kernel. So they got randomly assigned by the kernel.

Put this script in the /root directory

cp -a set_persistent_mac_address /root/
chmod +x /root/set_persistent_mac_address
And add the execution in the beginning of /etc/rc.local
/root/set_persistent_mac_address

Note that you can also add this script to /etc/network/if-pre-up.d/ as recommended here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - set_persistent_mac_address (857 bytes)
Re: Pogoplug Pro random MAC address after upgrading to kernel 5.15.158
October 13, 2025 04:03PM
bodhi,

> There are 2 ways to make sure the real MAC address
> is used. Chose approach 1 for a foolproof setup
> but less flexible.
>
> 1. Add it to your /etc/network/interfaces
>
> 2. Use the attached script
> set_persistent_mac_address

Tested both methods, and either solves the problem, thank you. I like the idea of putting the script in /etc/network/if-pre-up.d/ to ensure it gets called before it brings up the interface. I remember doing something similar years ago on Arch for an E02 that had a bad block in the environment after I had flashed uBoot. As I recall you assisted me on the Arch forums for that one! That E02 is still around running Arch (no more updates). I still have a few kirkwood plugs running Arch that I need to move over to Debian. They just keep running so they've been on the back burner.

Maybe could consider putting that script in the Oxnas rootfs, though it does mask the problem.

If called from rc.local I think you'd have to remove the first line in the script.

Thanks!
Re: Pogoplug Pro random MAC address after upgrading to kernel 5.15.158
October 13, 2025 06:50PM
nwestfal,

> Tested both methods, and either solves the
> problem, thank you.

Cool!

>I like the idea of putting
> the script in /etc/network/if-pre-up.d/ to ensure
> it gets called before it brings up the interface.
> I remember doing something similar years ago on
> Arch for an E02 that had a bad block in the
> environment after I had flashed uBoot. As I
> recall you assisted me on the Arch forums for that
> one!

Wow, that must have been a long time ago! I recognized your handle as someone who has been around here and at ALARM, but forgot about my specific activities on Arch forum.

> That E02 is still around running Arch (no
> more updates). I still have a few kirkwood plugs
> running Arch that I need to move over to Debian.
> They just keep running so they've been on the back
> burner.
>
> Maybe could consider putting that script in the
> Oxnas rootfs, though it does mask the problem.

I think it is OK to include in the rootfs, since the script loudly logs the kernel message about setting MAC address in dmesg.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: