You are not logged in.

#1 2019-12-28 13:41:37

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

[SOLVED] wireless interface renamed after installation

hi,

Just reinstalled Arch Linux (I like to do this once in a while smile ), but during installation with the most recent iso, my wireless interface was named 'wlan0' while it used to be 'wlp1s0'.

Now I have an install script and during installation I have to use the 'wlan0' interface, but the script configures "wpa_supplicant" and "dhcpcd" with the current interface name. The problem: after reboot my interface was renamed to 'wlp1s0' so "wpa_supplicant" and "dhcpcd" needed to be reconfigured manually.

Is there a way to rename the interface during installation to 'wlp1s0'? Or maybe some other solution?

thx

Last edited by chrisdb (2020-01-01 14:56:24)


Failure is success in progress.
A.E.

Offline

#2 2019-12-28 13:47:16

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: [SOLVED] wireless interface renamed after installation

The interface is called "wlan0" during installation, because the iso contains iwd. iwd is unable to cope with interface renaming, so the package disables that for wireless devices.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2019-12-28 14:19:46

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

progandy wrote:

The interface is called "wlan0" during installation, because the iso contains iwd. iwd is unable to cope with interface renaming, so the package disables that for wireless devices.

Strange, I did not have the same problem with previous installations....

What would be my best option then?


Failure is success in progress.
A.E.

Offline

#4 2019-12-28 14:50:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: [SOLVED] wireless interface renamed after installation

It's not strange that you didn't have this problem with previous installations as previous isos didn't have iwd.  Arch is a rolling release.  If you don't want anything to ever change, you are using the wrong distro.

The best option is to not use poorly written install scripts that make faulty assumptions about the hardware.

Or an even better option would be to stop reinstalling.  There should never be a need to reinstall.

Last edited by Trilby (2019-12-28 14:53:46)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2019-12-28 15:30:21

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

Trilby wrote:

It's not strange that you didn't have this problem with previous installations as previous isos didn't have iwd.

Where can I find this info?

Trilby wrote:

If you don't want anything to ever change, you are using the wrong distro.

I never said that.

Trilby wrote:

Or an even better option would be to stop reinstalling.  There should never be a need to reinstall.

Fair enough


Failure is success in progress.
A.E.

Offline

#6 2019-12-28 16:52:03

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: [SOLVED] wireless interface renamed after installation

chrisdb wrote:
Trilby wrote:

It's not strange that you didn't have this problem with previous installations as previous isos didn't have iwd.

Where can I find this info?

There is no special place to announce the archiso contents. The current package list is available in the archiso git repository:
https://git.archlinux.org/archiso.git/t … ges.x86_64

Is there a way to rename the interface during installation to 'wlp1s0'? Or maybe some other solution?

You could disable the renaming on the installed system as well or build the name based on the systemd rules:

https://github.com/systemd/systemd/blob … t_id.c#L20

Last edited by progandy (2019-12-28 16:55:35)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2019-12-28 18:03:45

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

progandy wrote:
chrisdb wrote:
Trilby wrote:

It's not strange that you didn't have this problem with previous installations as previous isos didn't have iwd.

Where can I find this info?

There is no special place to announce the archiso contents. The current package list is available in the archiso git repository:
https://git.archlinux.org/archiso.git/t … ges.x86_64

Is there a way to rename the interface during installation to 'wlp1s0'? Or maybe some other solution?

You could disable the renaming on the installed system as well or build the name based on the systemd rules:

https://github.com/systemd/systemd/blob … t_id.c#L20

Thx for your reply progandy smile

I wonder though, if I would have noticed this during installation... Will the 'new' name be already visible during the arch-chroot step?


Failure is success in progress.
A.E.

Offline

#8 2019-12-30 06:37:39

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

chrisdb wrote:

I wonder though, if I would have noticed this during installation... Will the 'new' name be already visible during the arch-chroot step?

Just checked this and no, the new interface name is not yet available. The problem is I'm using 'dhcpcd' in combination with 'wpa_supplicant' and 'wpa_supplicant' requires an interface to be started (systemd) if I want a connection at boot.

From the wiki:

To enable wireless at boot, enable an instance of one of the above services on a particular wireless interface. For example, enable the wpa_supplicant@interface systemd unit.

At boot (systemd)
The wpa_supplicant package provides multiple systemd service files:

wpa_supplicant.service - uses D-Bus, recommended for NetworkManager users.
wpa_supplicant@interface.service - accepts the interface name as an argument and starts the wpa_supplicant daemon for this interface. It reads a /etc/wpa_supplicant/wpa_supplicant-interface.conf configuration file.
wpa_supplicant-nl80211@interface.service - also interface specific, but explicitly forces the nl80211 driver (see below). The configuration file path is /etc/wpa_supplicant/wpa_supplicant-nl80211-interface.conf.
wpa_supplicant-wired@interface.service - also interface specific, uses the wired driver. The configuration file path is /etc/wpa_supplicant/wpa_supplicant-wired-interface.conf.

How can I get around this without disabling the renaming ?

Last edited by chrisdb (2019-12-30 06:39:20)


Failure is success in progress.
A.E.

Offline

#9 2019-12-31 01:35:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: [SOLVED] wireless interface renamed after installation

Just enable the service for what the name will be.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2019-12-31 06:22:44

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

Trilby wrote:

Just enable the service for what the name will be.

I know the wireless will be named 'wlp1s0', but is there a way to be certain (maybe the logic for naming can change in the near future)?
Could I get the future name by exploring the udevadm tool?

Last edited by chrisdb (2019-12-31 06:24:48)


Failure is success in progress.
A.E.

Offline

#11 2019-12-31 10:13:33

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: [SOLVED] wireless interface renamed after installation

but is there a way to be certain (maybe the logic for naming can change in the near future)?

It has changed atleast once since persistant naming was introduced.

The only way i can think of to make sure the name is predictable forever is to use your own naming scheme and put that in custom udev rules.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2019-12-31 12:40:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: [SOLVED] wireless interface renamed after installation

Funny how "wlan0" hadn't changed for god knows how long.  Then systemd came up with "better" and "persistent" names which occasionally change and now no one can predict.

I don't have a system with the renaming disabled to test this on, but the following may show the new name in the ID_NET_NAME_PATH field, or perhaps in the ID_NET_NAME_SLOT (as one two macines I have one uses the former and the other the latter):

udevadm test-builtin net_id /sys/class/net/wlan0

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2020-01-01 14:55:59

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] wireless interface renamed after installation

Trilby wrote:

Funny how "wlan0" hadn't changed for god knows how long.  Then systemd came up with "better" and "persistent" names which occasionally change and now no one can predict.

I don't have a system with the renaming disabled to test this on, but the following may show the new name in the ID_NET_NAME_PATH field, or perhaps in the ID_NET_NAME_SLOT (as one two macines I have one uses the former and the other the latter):

udevadm test-builtin net_id /sys/class/net/wlan0

Thx that did the trick:

ID_NET_NAMING_SCHEME=v243
ID_NET_NAME_MAC=wlx646e69e577e7
ID_OUI_FROM_DATABASE=Liteon Technology Corporation
ID_NET_NAME_PATH=wlp1s0

So according to precedence I will have to take 'ID_NET_NAME_PATH'


Failure is success in progress.
A.E.

Offline

Board footer

Powered by FluxBB