Skip to content
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

rpi-cmdline: Fix being renamed of network interfaces #1305

Merged
merged 1 commit into from
May 28, 2024

Conversation

alperak
Copy link
Contributor

@alperak alperak commented Apr 9, 2024

Added net.ifnames=0 kernel parameter into CMDLINE.

If we boot the kernel this way, the network interfaces will not be renamed. Otherwise it will be renamed.

Without parameter:

root@raspberrypi3-64:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enu1u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
link/ether b8:27:eb:d9:fd:59 brd ff:ff:ff:ff:ff:ff
3: wlxb827eb8ca80c: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether b8:27:eb:8c:a8:0c brd ff:ff:ff:ff:ff:ff

root@raspberrypi3-64:~# journalctl | grep wlan
Feb 27 17:26:08 raspberrypi3-64 kernel: brcmfmac mmc1:0001:1 wlxb827eb8ca80c: renamed from wlan0
Feb 27 17:26:10 raspberrypi3-64 kernel[296]: [ 8.711897] brcmfmac mmc1:0001:1 wlxb827eb8ca80c: renamed from wlan0

With parameter:

root@raspberrypi3-64:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
link/ether b8:27:eb:d9:fd:59 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
link/ether b8:27:eb:8c:a8:0c brd ff:ff:ff:ff:ff:ff

recipes-bsp/bootfiles/rpi-cmdline.bb Outdated Show resolved Hide resolved
Add net.ifnames=0 kernel parameter into CMDLINE and make it possible to override.

If we boot the kernel this way, the network interfaces will not be renamed. Otherwise it will be renamed.

Without parameter:

root@raspberrypi3-64:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enu1u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
    link/ether b8:27:eb:d9:fd:59 brd ff:ff:ff:ff:ff:ff
3: wlxb827eb8ca80c: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether b8:27:eb:8c:a8:0c brd ff:ff:ff:ff:ff:ff

root@raspberrypi3-64:~# journalctl | grep wlan
Feb 27 17:26:08 raspberrypi3-64 kernel: brcmfmac mmc1:0001:1 wlxb827eb8ca80c: renamed from wlan0
Feb 27 17:26:10 raspberrypi3-64 kernel[296]: [    8.711897] brcmfmac mmc1:0001:1 wlxb827eb8ca80c: renamed from wlan0

With parameter:

root@raspberrypi3-64:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
    link/ether b8:27:eb:d9:fd:59 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel qlen 1000
    link/ether b8:27:eb:8c:a8:0c brd ff:ff:ff:ff:ff:ff

Signed-off-by: alperak <[email protected]>
Copy link
Owner

@agherzan agherzan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what introduced this?

@kraj
Copy link
Collaborator

kraj commented Apr 29, 2024

Do we know what introduced this?

Yeah this is combination of latest kernel 6.1 and systemd which causes this and infact is the default behavior to use this scheme but it will take some time so for now with this patch we revert back to original behavior for now

@agherzan
Copy link
Owner

@kraj this is approved on your side too?

Copy link
Collaborator

@kraj kraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@agherzan agherzan merged commit 0f46a1d into agherzan:master May 28, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants