Interface rename

When looking at dmesg, I see this:
[ 8.565731] [ T743] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0

This is not cool. :slight_smile: Seriously, I can never remember that name so I’d rather the system leave the default alone so I have wlan0 instead of some random generated name.

Anyway to do this on OpenSUSE? I already added net.ifnames=0 biosdevname=0 to the bootconfig, but that doesn’t do anything and the 70-persistent-net.rules is empty and I find it strange I would have to add anything to stop it from doing something.

Any idea how I can ‘fix’ this?

What is “bootconfig”?

@throttlemeister It’s not random? Have a read here https://documentation.suse.com/smart/network/html/network-interface-predictable-naming/index.html

Infamous Host Erlangen has no ‘fix’, but a choice:

erlangen:~ # grep net.ifnames=0 /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet plymouth.enable=0 net.ifnames=0 mitigations=off"
erlangen:~ # 
erlangen:~ # journalctl -b -g 'net.ifnames=0|wlan0' --no-pager 
Mar 16 18:26:12 erlangen kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-6.13.6-1-default root=UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344 quiet plymouth.enable=0 net.ifnames=0 mitigations=off
Mar 16 18:26:12 erlangen kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.13.6-1-default root=UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344 quiet plymouth.enable=0 net.ifnames=0 mitigations=off
Mar 16 18:26:12 erlangen dracut-cmdline[349]: Using kernel command line parameters:  rd.driver.pre=btrfs root=UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344 rootfstype=btrfs rootflags=rw,relatime,ssd,discard=async,nospace_cache,subvolid=7092,subvol=/@/.snapshots/3979/snapshot,subvol=@/.snapshots/3979/snapshot   BOOT_IMAGE=/boot/vmlinuz-6.13.6-1-default root=UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344 quiet plymouth.enable=0 net.ifnames=0 mitigations=off
Mar 16 18:26:20 erlangen NetworkManager[1335]: <info>  [1742145980.5369] device (wlan0): driver supports Access Point (AP) mode
Mar 16 18:26:20 erlangen NetworkManager[1335]: <info>  [1742145980.5373] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
...

Does this mean you set

GRUB_CMDLINE_LINUX_DEFAULT="... net.ifnames=0 biosdevname=0 ..."

in /etc/default/grub? If so, did you update /boot/grub2/grub.cfg afterwards?

On my machine this works fine:

# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.13.6-1-default net.ifnames=0 biosdevname=0 security=apparmor mitigations=auto
#
# nmcli d
DEVICE             TYPE      STATE                   CONNECTION  
wlan0              wifi      connected               Router
lo                 loopback  connected (externally)  lo          
eth0               ethernet  unavailable             --          
# 

@susejunky OP could be using systemd-boot :wink: it’s different…

So his answer to my question

would be “No”, wouldn’t it?

@susejunky or they could say yes, and be using systemd-boot… I was trying to imply asking this first since it’s available now and may not realize… So many options today, grub, apparmor, selinx and systemd-boot…

Systemsettings> Wi-Fi & Internet

Then select your connection and edit connection name and click apply.

Thanks for all the replies. I have managed to fix this. Adding just net.ifnames=0 to the boot config didn’t work, as indicated. Adding package biosdevname in addition to that bootconfig did the trick.

Yes, I am using sdboot. Adding that is done through sudo pbl --add-option net.ifnames=0 && sudo sdbootutil add-all-kernels, for those wondering.

Now I have interface names I can actually remember.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.