rpi-cmdline: Fix being renamed of network interfaces #1305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added
net.ifnames=0
kernel parameter intoCMDLINE
.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