How to use ID_NET_NAME_PATH with NetworkManager in Leap Micro 5.5

I would like to use ID_NET_NAME_PATH style naming of network interfaces (e.g. enp1s0) with Network manager. When I install fresh Leap Micro I see network interfaces names like this:

# ip l
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:53:96:36 brd ff:ff:ff:ff:ff:ff
    altname enp0s3
...

I see the ID_NET_NAME_PATH name there as altname but Network manager profile is not applicable to this name (only to eth0). So I tried to change “net.ifnames” from 0 to 1 in /etc/default/grub. But when I try to update /boot/grub2/grub.cfg, I’m getting this:

# grub2-mkconfig -o /boot/grub2/grub.cfg
/usr/sbin/grub2-mkconfig: line 305: /boot/grub2/grub.cfg.new: Read-only file system

Probably something specific to Leap Micro.

I also tried to find out how to rename it by udev rules but I am unable to use it because there is no suitable attribute to work with in udevadm info -ap /sys/class/net/eth0.
I don´t want to work with MAC interface address because I have multiple machines so I will have multiple MACs.

Could you please give me advice how to do it?

Yes. Any reason you use Leap Micro in the first place?

Anyway, on immutable openSUSE you need to use transactional-update to make changes. In this case

transactional-update grub.cfg
1 Like

It worked. Thanks a lot. I completely missed this option of transactional-update command.

The reason to use Leap Micro is that I needed a lightweight and easy to maintain distro for my containers and this openSUSE seems to be the best fit for it.

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