Op donderdag 2 maart 2017 14:59:16 CET schreef Roger Oberholtzer:
> On Thu, Mar 2, 2017 at 12:11 PM, Andreas Färber <[email protected]> wrote:
> > Am 02.03.2017 um 08:19 schrieb Roger Oberholtzer:
> >> I have just updated my previously working RI 3 to the latest kernel
> >> for openSUSE 42.2
> >> 
> >> It seems that the device now generates a unique MAC address on the
> >> wired Ethernet connection each time it is powered on. Could this
> >> happen? If so, how can I change it back to use a fixed MAC address?
> > 
> > I noticed a similar DHCP issue on RPi2 with Tumbleweed recently - so far
> > no one knew why. U-Boot should pass the MAC address to the kernel in the
> > device tree so that this doesn't happen - TW and Leap should be using
> > different U-Boot versions, so that hints at a kernel regression.
> 
> I changed the Raspberry to use a static address. Now I can access it
> over the network.
> 
> I'm not sure how to proceed to get back using an address if gets via dhcp.
> 
> The kernel command line is:
> 
> BOOT_IMAGE=/boot/Image-4.9.6-1-default
> root=UUID=7c83a65d-25cb-4a95-a693-349caca50955
> root=/dev/disk/by-id/mmc-SU32G_0x815062d3-part2
> disk=/dev/disk/by-id/mmc-SU32G_0x815062d3
> resume=/dev/disk/by-id/mmc-SU32G_0x815062d3-part3 quiet splash=silent
> plymouth.enable=0 console=ttyS0,115200n8 quiet

You can use a hack by using a systemd file generated by the following shell 
script:

----------- start of script ------
#! /bin/bash
# the address after the following = needs to be your own invented MAC address
# like the one you get randomly after the first boot
lladdr=ab:cd:ef:01:23:45
cat <<EOF > /etc/systemd/system/[email protected]
[Unit]
Description=MAC Address Change %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
ExecStart=/usr/sbin/ip link set dev %i address $lladdr
ExecStart=/usr/sbin/ip link set dev %i up

[Install]
WantedBy=multi-user.target
EOF
ln -s /etc/systemd/system/[email protected] /etc/systemd/system/multi-
user.target.wants/[email protected]
----------- end of script ------

-- 
fr.gr.

member openSUSE
Freek de Kruijf

--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to