How to get eth0 and wlan0 back on Ubuntu Mate 18.04?

Tom H tomh0665 at gmail.com
Sun Jan 31 18:19:13 UTC 2021


On Sun, Jan 31, 2021 at 12:15 AM Bo Berglund <bo.berglund at gmail.com> wrote:
> On Fri, 29 Jan 2021 16:39:39 +0100, Tom H <tomh0665 at gmail.com> wrote:
>> On Wed, Jan 27, 2021 at 10:20 AM Bo Berglund <bo.berglund at gmail.com>
>> wrote:
>>>
>>> I have a repurposed laptop running Ubuntu Mate 18.04.5 LTS and I
>>> need to run a lot of scripts on this, but they fail because for
>>> some reason eth0 and wlan0 are no longer available...
>>>
>>> How can I re-enable the use of these standard names instead of the
>>> new strange names?
>>>
>>> I have searched the net and found some instructions here:
>>> https://www.itzgeek.com/how-tos/mini-howtos/change-default-network-name-ens33-to-old-eth0-on-ubuntu-16-04.html
>>>
>>> But the first part of this instruction is not clear since it says
>>> to "add" to /etc/default/grub like this:
>>>
>>> Look for “GRUB_CMDLINE_LINUX” and add the following
>>>”net.ifnames=0 biosdevname=0“.
>>>
>>> From:
>>> GRUB_CMDLINE_LINUX=""
>>> To:
>>> GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
>>>
>>> However, my existing entry is not empty, instead it has this:
>>> GRUB_CMDLINE_LINUX="resume=UUID=<long guid string>"
>>>
>>> So how can I handle the rename of the network and still not
>>> destroy whatever the existing entry is meant to do?
>>
>> GRUB_CMDLINE_LINUX="resume=UUID=<long guid string> net.ifnames=0
>> biosdevname=0"
>
> Thanks a lot, I will try this.

You're welcome.

Two more things.

1) AIUI, "biosdevname=0" is only going to be useful on Ubuntu for
certain Dell pizza boxes.

2) If I were you, I'd rename my NICs to "netX" or some other non
"ethX" name because, if you have more than one NIC, there's always the
possibility that eth0 becomes eth1 and eth1 becomes eth0 after a
reboot.


> Another follow-up question:
> Do I have to reboot the laptop for it to take effect or is there
> some quicker way to make it happen?
> Since it is for GRUB I assume it needs a reboot operation, riht?

There are two problems.

3) At some point in the 230s, udevd lost the ability to rename to "ethX".

4) I've just tried to bypass (3) in a VM by bringing down ens3
completely (de-configure the network and run "ip l set down ...") and
setting NIC naming to "kernel" and to "keep kernel". I couldn't get
the NIC name to change with "udevadm" or by restarting
"systemd-udevd".




More information about the ubuntu-users mailing list